Arduino Leonardo and Flip bootloader

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I have some question - i have Arduino Leonardo with ATmega 32u4. I want to burn Flip bootloader on it.

Default, lock bits are set to 0x2F. Should I erase all memory and set it to 0x3F? Or can I just burn Flip with this lock settings? Of course i Set fuses to 0xFF (l), 0xD8 (h), 0xF7 (e).

I don't want to break Leonardo so please, help. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To burn new code you have to erase the chip, when you do that the lock bits will be returned to datasheet default anyway.

You do realise though, that if you do any form of ISP to the 32U4 that changes anything (the fuses, the lockbits, the bootloader code) that the board will no longer be usable as an Arduino? (you can restore things if this happens by putting the Arduino bootloader back and restoring the fuse and lock settings to what they are now so all is not lost).

I guess the real question is "why do you think it's advantageous to put DFU in the chip?" (personally I cannot think of any good reason to do it as you are about to destroy a perfectly working Arduino!).

(BTW Flip is the name of the PC software, the bit that goes in the AVR is called DFU - named after the USB Device Firmware Upgrade (DFU) class).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for reply, your last sentence was very helpful. :)

I don't like Arduino language and I just want to be able to burn my own .hex files from AVR Studio. :)

I bought Arduino only because I didn't have to solder, it's solid and ready to work. :)

I have one more question: how can I lead my ATmega32u4 to factory condition? Is some fast, simply way?

Have someone original Atmel batch with DFU?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I don't like Arduino language and I just want to be able to burn my own .hex files from AVR Studio.

Then leave the board exactly as it is now. Build your code using AS6, when you have a .hex file use avrdude to talk to the existing bootloader and program the code into the chip. There are many many tutorials about how to use an Arduino board in this way.

Forget Flip/DFU it's got nothing to do with what you are trying to achieve here (you can't run Flip from inside AS6 anyway).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is how I burn hex files into my mega2560: This file is called avrdudecom17.bat:
@rem file avrdudecom17.bat Aug 6 13 Bob G for jpegcam
avrdude -c stk500v2 -P com17 -b 115200 -p m2560 -U flash:w:jpegcam.hex
pause

Imagecraft compiler user