LowPowerLab Forum

Hardware support => Moteino => Topic started by: eca on February 03, 2016, 05:15:57 PM

Title: Burning DualOptiboot bootloader - Unsupported format
Post by: eca on February 03, 2016, 05:15:57 PM
I'm trying to burn DualOptiboot_V5.0_atmega328_BlinkD9.hex, downloaded from https://github.com/LowPowerLab/DualOptiboot.git (https://github.com/LowPowerLab/DualOptiboot.git)

I'm using Atmel Studio with MKII.

Fuses have been setup : ext:FD, hi:DC, lo:DE.

When programming I've got : Unable to parse objectfile C:\Temp\DualOptiboot_V5.0_atmega328_BlinkD9.hex: Unsupported format

Burning is OK with C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders\optiboot\optiboot_atmega328.hex
Title: Re: Burning DualOptiboot bootloader - Unsupported format
Post by: Felix on February 03, 2016, 08:32:51 PM
Sorry, not sure what that is. The HEX is fine, it was used in production.
What software do you use?
Did you download the ZIP of the repository then extract the HEX?
Title: Re: Burning DualOptiboot bootloader - Unsupported format
Post by: eca on February 05, 2016, 08:29:09 AM
I'm using Atmel Studio 7.0 (build 582).

I did download the ZIP of the repository then extract the HEX, as well as git / mirror the repo.

Flash is OK when using Pocket AVR Programmer.

I'll install the latest Atmel Studio 7.0 build (634) to see if this help.
Title: Re: Burning DualOptiboot bootloader - Unsupported format
Post by: Spexx on February 16, 2016, 03:34:07 AM
I got the same error with Atmel Studio 7, but when downgrading back to Atmel Studio 6 it works fine...

Felix, after comparing your hex-file with the original optiboot-bootloader hex-file I found out, that you use in your hex file for the end-of-line only a linefeed, while normally a carriage return + linefeed will be used.

I suppose that this is a problem in case of using Atmel Studio v7.
Title: Re: Burning DualOptiboot bootloader - Unsupported format
Post by: Felix on February 16, 2016, 09:19:24 AM
End of line characters are up to interpretation depending on what OS you are on. Windows usually uses carriage return + line feed.
But otherwise it's completely irrelevant. The HEX was produced by gcc not by hand, so I am not going to edit the file manually to add an end of line character. Maybe you need to do that to make atmel studio 7 work, I would almost consider it a bug on the part of AS 7.
Title: Re: Burning DualOptiboot bootloader - Unsupported format
Post by: Jon on February 17, 2016, 05:21:12 PM
I had the same issue, so copied the file to my Unix NAS, ran unix2dos against it and copied it back to windows and it worked fine.
Title: Re: Burning DualOptiboot bootloader - Unsupported format
Post by: Felix on February 18, 2016, 08:37:03 AM
Yup so I think that would just convert the end of line from unix format to windows format (ie ensure it has both end of line and carriage return).