0
Offline
Jr. Member
Karma: 0
Posts: 91
Why is it so?
|
 |
« on: August 09, 2011, 05:49:42 am » |
having issues with using an AVRISP-MKII to burn a bootloader for an ATMEGA328-AU (the same as on the Pro and Pro Mini) Error: avrdude: Expected signature for ATMEGA328P is 1E 95 0F I have a schema here  any thoughts?
|
|
|
|
|
Logged
|
|
|
|
|
Bristol, UK
Offline
Edison Member
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
|
 |
« Reply #1 on: August 09, 2011, 06:00:21 am » |
'avrdude' checks the signature bytes in the target processor against what it expects, given the processor that you told it about. So, if the actual processor is a 328-AU and it's expecting a 328P, the signature won't match. Can you select a different processor from the menu?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Why is it so?
|
 |
« Reply #2 on: August 09, 2011, 10:27:54 am » |
i take it i can add a new board to the boards.txt file. like so [new board name].build.mcu=atmega328p
where can i change the mcu listing type. i can't find how to add the AU
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4673
|
 |
« Reply #3 on: August 09, 2011, 11:01:13 am » |
Looks like the atmega328 (without the P) isn't in the config file for avrdude. Locate file avrdude.conf, open it in an editor and locate the atmega328p section, which starts like this:
#------------------------------------------------------------ # ATmega328 #------------------------------------------------------------
part id = "m328p"; desc = "ATMEGA328P"; has_debugwire = yes; flash_instr = 0xB6, 0x01, 0x11; eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, 0x99, 0xF9, 0xBB, 0xAF; stk500_devcode = 0x86; # avr910_devcode = 0x; signature = 0x1e 0x95 0x0F;
If you change the final signature byte from 0x0F to 0x14 then it should recognise your chip (but not a atmega328p). Or you could try copying the whole atmega328p definition and in the copy change the id, desc and signature byte fields, then use the new id or desc to identify the chip in boards.txt, but I don't know whether this works.
|
|
|
|
« Last Edit: August 09, 2011, 04:04:38 pm by dc42 »
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Why is it so?
|
 |
« Reply #4 on: August 09, 2011, 11:13:29 am » |
Okay, so turns out i actually have an ATMEGA328-AU-ND not an ATMEGA328P-AU-ND
any suggestions?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 167
|
 |
« Reply #5 on: August 09, 2011, 01:40:43 pm » |
everything after the first dash is irrelevant, dc42 still has exactly the answer you need.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Why is it so?
|
 |
« Reply #6 on: August 09, 2011, 03:18:56 pm » |
silly question but where do i find the avrdude.conf on PC
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4673
|
 |
« Reply #7 on: August 09, 2011, 04:03:02 pm » |
I installed the arduino software into C:\arduino-0022. My conf file is C:\arduino-0022\hardware\tools\avr\etc\avrdude.conf.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Why is it so?
|
 |
« Reply #8 on: August 10, 2011, 04:54:45 am » |
Creating a new entry worked beautifully #------------------------------------------------------------ # ATmega328-AU-ND #------------------------------------------------------------
part id = "m328au"; desc = "ATMEGA328-AU-ND"; has_debugwire = yes; flash_instr = 0xB6, 0x01, 0x11; eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, 0x99, 0xF9, 0xBB, 0xAF; stk500_devcode = 0x86; # avr910_devcode = 0x; signature = 0x1e 0x95 0x14; and then in boards.txt .build.mcu=m328au thanks again for all your helps
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 2
Posts: 219
|
 |
« Reply #9 on: August 13, 2011, 09:55:00 pm » |
Hm, I am attempting to program an ATMEGA-328-PU-ND using an Arduino Duemilanove w/ ArduinoISP loaded onto it. I just added the entries as stated by 32teeth to my avrdude.conf and board.txt file, but I got the following error message when I tried to upload my sketch: unknown MCU 'm328au' specified Known MCU names: avr2 at90s2313 at90s2323 at90s2333 at90s2343 attiny22 attiny26 at90s4414 at90s4433 at90s4434 at90s8515 at90c8534 at90s8535 avr25 attiny13 attiny13a attiny2313 attiny24 attiny44 attiny84 attiny25 attiny45 attiny85 attiny261 attiny461 attiny861 attiny43u attiny87 attiny48 attiny88 at86rf401 avr3 at43usb320 at43usb355 at76c711 avr31 atmega103 avr35 at90usb82 at90usb162 attiny167 attiny327 avr4 atmega8 atmega48 atmega48p atmega88 atmega88p atmega8515 atmega8535 atmega8hva at90pwm1 at90pwm2 at90pwm2b at90pwm3 at90pwm3b at90pwm81 avr5 atmega16 atmega161 atmega162 atmega163 atmega164p atmega165 atmega165p atmega168 atmega168p atmega169 atmega169p atmega32 atmega323 atmega324p atmega325 atmega325p atmega3250 atmega3250p atmega328p atmega329 atmega329p atmega3290 atmega3290p atmega32hvb atmega406 atmega64 atmega640 atmega644 atmega644p atmega645 atmega6450 atmega649 atmega6490 atmega16hva at90can32 at90can64 at90pwm216 at90pwm316 atmega32c1 atmega64c1 atmega16m1 atmega32m1 atmega64m1 atmega16u4 atmega32u4 atmega32u6 at90scr100 at90usb646 at90usb647 at94k avr51 atmega128 atmega1280 atmega1281 atmega1284p atmega128rfa1 at90can128 at90usb1286 at90usb1287 m3000f m3000s m3001b avr6 atmega2560 atmega2561 avrxmega3 atxmega32a4 avrxmega4 atxmega64a3 avrxmega5 atxmega64a1 avrxmega6 atxmega128a3 atxmega256a3 atxmega256a3b avrxmega7 atxmega128a1 avr1 at90s1200 attiny11 attiny12 attiny15 attiny28 /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:1: error: MCU ‘m328au’ supported for assembler only /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c: In function ‘attachInterrupt’: /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:90: error: ‘EICRA’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:90: error: (Each undeclared identifier is reported only once /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:90: error: for each function it appears in.) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:90: error: ‘ISC00’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:90: error: ‘ISC01’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:91: error: ‘EIMSK’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:91: error: ‘INT0’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:94: error: ‘ISC10’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:94: error: ‘ISC11’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:95: error: ‘INT1’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c: In function ‘detachInterrupt’: /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:135: error: ‘EIMSK’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:135: error: ‘INT0’ undeclared (first use in this function) /home/jason/arduino-0021/hardware/arduino/cores/arduino/WInterrupts.c:138: error: ‘INT1’ undeclared (first use in this function)
I am using Arduino 0021 on a 32-bit Ubuntu 10.04 installation.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 167
|
 |
« Reply #10 on: August 14, 2011, 01:30:48 am » |
Are you sure that avrdude is looking at the correct conf file? it doesn't look like your edit is in the config that it's reading at all.
The only other nitpick is that 328 is the proper device name, 328AU does not exist. But that is entirely a cosmetic change and has no relation to your problem.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 91
Why is it so?
|
 |
« Reply #11 on: August 14, 2011, 07:41:35 am » |
That error looks very odd as if you are missing a part of the .conf file. Did you add an entire duplicate entry or only the portion i posted?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 2
Posts: 219
|
 |
« Reply #12 on: August 14, 2011, 10:24:48 am » |
I only added the bit you posted, so maybe thats the problem. I will try duplicating an entire entry and replacing the relevent section with what you posted.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 2
Posts: 219
|
 |
« Reply #13 on: August 14, 2011, 11:36:07 am » |
I duplicated the entry for ATMEGA328P, then replaced the relevant lines that you posted in avrdude.conf. Then, in boards.txt, I changed the following line: atmega328.build.mcu=atmega328p to atmega328.build.mcu=m328au and now when I try to upload, I get an error saying that the stk500 programmer is not responding. I'm curious, where do you get the .build.mcu identifier from? At first I thought it was the "id" field of the chip you want from avrdude.conf, but when I search that file for atmega328p (the original identifier), it does not match any 'id' field, only a 'desc' field.
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4673
|
 |
« Reply #14 on: August 14, 2011, 03:47:20 pm » |
When to says the stk500 programmer is not responding, it means your Arduino that you have configured as an ISP. Did you load the ArduinoISP sketch on it, before changing the upload.using line? Did you add the capacitor to disable the auto reset on the Uno?
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
|