Need Help: Burning Arduino Mega 2560 Bootloader

Hi all,

I am a real newbie here and I really need the arduino experts to help me.

Would anyone please give me any instruction of how to burn the arduino mega 2560 bootloader? It has been over 1 month since I can't upload any sketches from the arduino IDE.

I have tried to burn it through the IDE to no avail, and I have tried to burn it through the AVR Studio with no result.

I can only burn it through the AVR Studio 4 with AVR ISP external programmer.

Would anyone please give advice for this matter? What fuse and lockbit setting should I burn the bootloader?

Regards,
lkm253

Hi to you.
I wouldn't class myself as an Arduino expert, and I don't have an Atmega2560, but I have had success burning bootloaders to Atmega328 (Duemilanove) by following the instructions here -
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
Atmega 2560 is in the list of supported devices in the Avrdude-gui, so it might work. You will need to work out which pins are for the SPI interface, and wire accordingly.
Can't help with definitive fuse info, but this may help - http://frank.circleofcurrent.com/fusecalc/fusecalc.php
Good luck.

Fuse setting for the mega2560 are given in the boards.txt file:

##############################################################

mega2560.name=Arduino Mega 2560

mega2560.upload.protocol=stk500v2
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200

mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F

mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=16000000L
mega2560.build.core=arduino

##############################################################

Lefty

hi guys,

I'll have to try it first this week.. a bit busy but it seems that I have to install avrdude to do it..

Avrdude is installed by default with the Arduino package, but if you try the method detailed by Kimio (the link above), you will actually be using avrdude-serjtag, and avrdude-gui which is not the same. Full details on getting and installing everything needed is in the Kimio guide, which needs careful reading. I struggled for some time before getting it right, but it was worth it.
I repeat that it worked with my setup, and I can't guarantee that it will work with the Mega 2560.
Perhaps anyone who has been successful (or unsuccessful!) with this or any other method would care to respond.
I take it you don't want to get an external progammer.

I've just had a look at the schematic for the 2560. The bad news is that I don't think the 'Kimio' bitbang method will work. It depends on the USB chip faking the RS232 signals CTS, DSR, DCD and RI, which the FT232RL USB chip does.
USB has been implemented differently on the 2560, and appears not to fake these signals. Would love to hear if anyone knows for sure.
Back to the drawing board!

you will actually be using avrdude-serjtag, and avrdude-gui which is not the same. Full details on getting and installing everything needed is in the Kimio guide, which needs careful reading. I struggled for some time before getting it right, but it was worth it.

I too set up the same but using a USBtiny programmer. It really is a nice simple yet powerful standalone GUI AVR programming enviroment for windows users (only) and I highly recommend it. You then have the means to set/reset any fuse settings, lock bit, chip erase, flash read and save or compair, eeprom read or write, etc.

But then again I'm a command line challenged kind of guy. :wink: