Go Down

Topic: Arduino Mega 2560 bootloader (Read 4 times) previous topic - next topic

micro_c

Hi.

Yes, that is one option and it must work. Since I need to have the AVR Studio installed and its related drivers, is it possible to burn the Arduino bootloader using the AVR Studio? If yes, how can I do it?

Thanks in advance.
-MicroC

CrossRoads

Under Tools:AVR Programmer, I think you browse to the bootloader file & go from there.

I find it quicker to just burn it within the IDE tho.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

micro_c

Hi CrossRoads,

In order to summarize what is my understanding from the posts:
1. erase the chip memory
2. burn the fuses
3. burn the lock bits
4. burn the file stk500boot_v2_mega2560.hex under the folder arduino-1.0.2\hardware\arduino\bootloaders\stk500v2?

Should the fuses and lock bits be set as:
0xFF = fuse low
0xD8 = fuse high
0xFD = fuse extended
0xCF = lock bits

Is this a complete procedure? Am I missing something?

Thanks in advance,
- MicroC

CrossRoads

I'm trying to fire up my version of AVR Studio5.1 to check - it doesn't seem to want to recognize my MKii since I changed the drivers for it to work with the IDE. Downloading 6.0 to see if that fixes it.

Sounds about right tho.  Fuses look to agree with the settings in boards.txt:
Code: [Select]

mega2560.name=Arduino Mega 2560 or Mega ADK

mega2560.upload.protocol=wiring
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
mega2560.build.variant=mega


That's why I do this in the IDE:
Burn the bootloader, which sets the fuses
Download the sketch via File: Upload Using Programmer, wipes out the bootloader, leaves the fuses, and  the sketch starts immediately after a  reset.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

CrossRoads

Well, I downloaded & installed Studio 6, still not seeing my MKii.
Arduino IDE does, bootloaded a '328P as I descibe above.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up