[Icc-avr] Including bootloader in main hex file
Tim Mitchell
tim at sabretechnology.co.uk
Tue Sep 18 07:37:06 PDT 2007
Johan Wallström wrote:
> Hi Tim
>
> Here's two possible solutions:
> * Program a device with the first file, then the other file (make
> sure to only erase the device before programming it with the first
> file). Then read out the complete file from the device and save it
> again.
> * Use srec_cat.exe and a batch file. It's a software to merge hex
> files correctly. I can't recall exactly where I got mine from, but I
> can send it if you want. It's quite nice, just run the batch file and
> the files will be merged directly.
>
Thanks for all advice, sreg_cat in the "execute command after successful build" option does the trick nicely, making sure the bootloader is always included in the hex file.
As Stephan said it comes with WinAVR and was already lurking on my pc.
If anyone else is trying to do this the correct format, which took me a while to discover, is:
srec_cat <mainproject>.hex -intel <bootloader>.hex -intel -o <mainproject>.hex -intel
It complains about missing start addresses in the hex files which ICCAVR does not appear to provide, but still works ok.
--
Tim Mitchell
tim at sabretechnology.co.uk http://www.sabretechnology.co.uk
Sabre Technology (Hull) Ltd, 3a Newlands Science Park, Hull HU6 7TQ
Registered in England and Wales no.3131504
t:01482 801003 f:01482 801078
More information about the Icc-avr
mailing list