cancel
Showing results for 
Search instead for 
Did you mean: 

Hex file for production

lee
Associate II
Posted on January 23, 2014 at 15:47

I am using the STM32L100. How I can combine the hex file for my bootloader with the hex file for my application into one hex file for production?

#spi-program
12 REPLIES 12
Posted on January 23, 2014 at 15:54

I am using the STM32L100. How I can combine the hex file for my bootloader with the hex file for my application into one hex file for production?

Use NOTEPAD and merge them, lose the last line of the first file.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
lee
Associate II
Posted on January 23, 2014 at 16:06

OK! I was hoping for something more automated but if that is the simplest way then why not. Thanks.

chen
Associate II
Posted on January 23, 2014 at 16:17

Hi

If they are Intel Hex (or Motorola SRecords) then you can simply use command line :

type file1.txt file2.txt > out.txt

to concatenate the 2 files together. You can even turn it into a batch file.
Posted on January 23, 2014 at 16:20

http://srecord.sourceforge.net/ -> srec_cat

JW

Posted on January 23, 2014 at 17:56

I don't think you want to concatenate them, you need to lose the terminal record, unless the device programmers code is too stupid to see it, or simple ignores it.

Any way the format is pretty simple, I'd expect a college grad to be able to code some automation either explicitly, or using a script in AWK or PERL or something.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
chen
Associate II
Posted on January 23, 2014 at 17:59

Yeah, only spotted what I had posted after I hit send.

Point taken.

trevor23
Associate III
Posted on January 24, 2014 at 10:56

Hate this forum, has eaten my post three times now.......

Not hard to automate as other have said but if you want another option you could program a processor as you need it to be (bootloader and app) and upload a complete image (in hex or binary) from it using something like the ST Flash Loader. Then use that image for production. Programming time is not increased as empty pages are not sent if a global erase was performed first.

ivani
Associate II
Posted on January 24, 2014 at 11:28

Most probably your IDE has such an option.

For IAR Embedded Workbench it could be done by Linker->Input->Raw binary image (the included file should be binary, not Intel Hex but the output could be of any kind). Don't fotget to put the symbol associated with the image in 'Keep symbols' list otherwise the linker will skip it.

lee
Associate II
Posted on January 24, 2014 at 13:07

Very helpful, thanks everyone.