I have implemented the avr-gcc butterfly bootloader port on an ATmega16.
As Michael Giambalvo wrote:
> I've been looking for a bootloader for my atmega16 board for some time
> now. I tried the one here (
> http://www.siwawi.arubi.uni-kl.de/avr_projects/#avrprog_boot ).
> However, I had several problems with it.
> 1) The signature was reported backwards ( correct bytes, just in
> reverse order )
I didn't let this bother me. Maybe I should, but since it didn't seem to
interfere with the device reprogramming, I didn't worry about it.
> 2) It reads every eeprom location as 3f
Try using the butterfly programmer-id instead of the avr910 programmer-id.
> 3) This bootloader, which is supposed to be AVRPROG and AVR910
> compatible, gives the atmega16 dev code 0x75 and the atmega169 code as
> 0x79, while in the avrdude.conf file these are 0x74 and 0x75 for the
> avr910, respectively.
I changed chipdef.h for __AVR_ATmega16__ to 0x74
#define devtype 0x74 // Mega16 device code
This matches avrdude.conf avr910_devcode:
#------------------------------------------------------------
# ATmega16
#------------------------------------------------------------
part
id = "m16";
desc = "ATMEGA16";
stk500_devcode = 0x82;
avr910_devcode = 0x74;
> I'm hoping these problems are all indicative of some simple mistake
> I'm making. Also, is there some way for me to see exactly what
> avrdude is putting out and getting back over the serial port? Even -v
> -v doesn't seem to get me that info.
Brian Dean pointed out that to get full verbosity use -v -v -v -v
> Finally, can anyone recommend a bootloader that works with avrdude,
> compiles under gcc, and works on atmega16s? That would solve all my
> problems straight away.
I recommend Martin Thomas' port that you tried. I banged my head on it
for a while myself. I am still trying to get it working in FreeBSD (See
my previous post today). The hang up for me was that I was trying to use
the -c avr91- programmer-id. You have to use the butterfly programmer
id. The butterfly bootloader is based on the Atmel AVR109 application
note, not the AVR910 app note.
Here is the avrdude command I have used to successfully program the
device from avrdude in windows once the bootloader is started:
avrdude -p m16 -c butterfly -D -u -U flash:w:newprogram.hex
I would appreciate hearing about any other golden nuggets that you come
up with along these lines.
-cbailey
_______________________________________________
avrdude-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev