How is the burning of bootloader done in 0010

Anyone can enlighten me on how the burning of bootloader is done in the Arduino-0010 IDE? I couldn’t find a batchfile of config file with information about that.

I am currently using uisp to burn hex files, but that doesn’t seem to work correctly. I don’t get errors after flash, but for example the bootloader or a blinking led firmware doesn’t work.

When the bootloader is burnt from within the IDE, it does work…

I hope someone can help!

I think if you set upload.verbose to true in your preferences file, you'll be able to see the command lines used (along with lots of other information).

Thanks Mellis, I will try that!

Unfortunately, it looks like there is nothing shown when setting upload.verbose to true. I am expecting this to see in the bottom part of the IDE or in the DOS box that opens when you start run.bat

Any ideas?

Which file did you edit? You want the on in your home directory, not the one in the Arduino application directory.

It took some time, but I have finally found out that setting upload.verbose to true does work.

I copy/pasted the contents of the output window to Notepad and was able to find 2 AVRDude commands:

C:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm168 -cstk200 -e -Ulock:w:0x3F:m -Uefuse:w:0x00:m -Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m

C:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm168 -cstk200 -Uflash:w:hardware\bootloaders\atmega168\ATmegaBOOT_168_ng.hex:i -Ulock:w:0x0F:m

Is it correct that the first command unlocks the processor (fuses?) for burning and the second command burns the bootloader and sets the fuses again?

I should be able to use the 2nd command, replace ATmegaBOOT_168_ng.hex with my own .hex file, to burn .HEX files generated by the compiler in the IDE?

The first line unlocks the processors, sets the fuses (which control things like clock type, brown out detection, etc). The second line burns the bootloader code itself, and relocks the bootloader segment. You should be able to use the same command lines with a different .hex file, yes.


Thanks for your help Mellis!