NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Bootloader error

December 25, 2011
by theHU
theHU's Avatar

Hello!

So finally i got my little Case for the Atmega ready and so i wanted to start setting up some Chips with the Bootlaoder.

I am using the parallelport for installing it and i get that error: (I found some answers on the internet, but i diont know what to to with them. :/ (they are talking about burning an hex file and so on. ;) ))

ok herse the code:


C:\Dokumente und Einstellungen\theHU\Eigene Dateien\Microcontroller\NERDKIT\Code\bootloader168>make
avrdude -c dapa -pm168 -U lock:w:0x2f:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406
avrdude: reading input file "0x2f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x2f:
avrdude: load data lock data from input file 0x2f:
avrdude: input file 0x2f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

avrdude -c dapa -pm168 -U efuse:w:0x00:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9406
avrdude: reading input file "0x00"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x00:
avrdude: load data efuse data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

avrdude -c dapa -pm168 -U hfuse:w:0xd5:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9406
avrdude: reading input file "0xd5"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd5:
avrdude: load data hfuse data from input file 0xd5:
avrdude: input file 0xd5 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

avrdude -c dapa -pm168 -U lfuse:w:0xf7:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9406
avrdude: reading input file "0xf7"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xf7:
avrdude: load data lfuse data from input file 0xf7:
avrdude: input file 0xf7 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

avrdude -c dapa -pm168 -U flash:w:foodloader.hex:a

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "foodloader.hex"
avrdude: input file foodloader.hex auto detected as Intel Hex
avrdude: writing flash (15372 bytes):

Writing | ################################################## | 100% 6.81s

avrdude: 15372 bytes of flash written
avrdude: verifying flash memory against foodloader.hex:
avrdude: load data flash data from input file foodloader.hex:
avrdude: input file foodloader.hex auto detected as Intel Hex
avrdude: input file foodloader.hex contains 15372 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 6.31s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x3800
         0x0c != 0xff
avrdude: verification error; content mismatch
`

So maybe can give me some hint to solve that problem. :(

thx, HU

December 27, 2011
by theHU
theHU's Avatar

no Idea? :(

December 27, 2011
by Rick_S
Rick_S's Avatar

How do you have your circuit setup for programming? I have written a step by step for installing a bootloader. It can be found in the Library Howto for installing the bootloader. The circuit needed to install is sligtly different than that of the standard Nerdkit setup.

Rick

December 27, 2011
by theHU
theHU's Avatar

Hi Rick!

I got the Circuit per mail from Humberto :


Here you go. You need five wires between various parallel port pins and the breadboard. You also need your new chip wired up as usual, with the crystal and all.

The bootloader source code, which is fairly complicated, is included in the source code in the downloads section of our site. That involves removing the wire on MCU pin 1 (the RESET line), and plugging the parallel port wires in as follows: LPT pin 1 ==> MCU pin 19 LPT pin 2 ==> MCU pin 17 LPT pin 11 ==> MCU pin 18 LPT pin 16 ==> MCU pin 1 LPT pin 19 ==> GND After that, you can go into the "bootloader" directory, and type "make". Hopefully, you'll get a successful verification from avrdude. Note that this will remove that default "Congratulations" program, so now you need to remove the parallel port header, replace the wire on the RESET line, and use the serial port to upload the "initialload" code. If on Windows you may also need to set the port name to LPT1, and also to install the "giveio" driver which is included with the WinAVR package.

January 04, 2012
by theHU
theHU's Avatar

Ok. Good News. It didn work for me on Windows. So i installed xubuntu and hoped it would work... AND it did! wihout any problems. :)

Yeah.

best regards theHU

Post a Reply

Please log in to post a reply.

Did you know that a motor's no-load current at a given voltage is much less than it's resistance would suggest? Learn more...