Program hex to bootloader section

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

Hello,

I have a question how I program a hex file to the bootloader section.
I have a xmega128a1u and want to use the dfu bootloader from avr1916.
I have the hex file from the zip file but the address in the hex file start at 0.
I'm using as7 and a avr ISP MK2 as the programmer.

When I program the hex file I can use flip only once.
I've changed the hex file to a binary to add a offset address in device programming but then I get a error saying that there is no flash application.

Regards

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

Wouldn't the simplest way be to edit the hex file? Just stick an offset line right at the start.

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

Sorry but are you saying that you want the DFU bootloader that's already in the chip to overwrite itself with a new bootloader? Can't be done. You need a physical PDI/JTAG interface to put code there.

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

No, I have a blanc chip and I tried to program the bootloader but after opening the hex file I've found out that the hex file starts at address 0.
I need it to start at the starting address of the bootloader instead of the starting address of flash

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

PS and before some pedant points it out - yes if DFU had been written with self-replacement in mind then it could be done but only if designed that way AND the lock bits on the bootloader section were not set so it could write over itself. AFAIK neither condition is true for DFU