cancel
Showing results for 
Search instead for 
Did you mean: 

CRC generator for hex file

mmensch
Associate II
Posted on January 09, 2017 at 15:23

Hello,

I am looking for a way to generate a CRC after compilation and add it to the hex file at a specified address so that it can altogether be programmed to flash and at runtime can be compared to a value calculate by the program.

Any idea how to do it, best in an automated way, so that I don't have to fiddle in some value somewhere for every compiler run? I use Atollic True Studio Light and asked something similar there too. uC is STM32L151

Thanks

Martin

4 REPLIES 4
Posted on January 09, 2017 at 15:57

http://srecord.sourceforge.net/

 
Posted on January 09, 2017 at 16:54

Here we've just written small apps to read in .BIN, .HEX or .ELF/AXF type files and process and package firmwares, adding CRC or checksumming as required. Often had to do similar things for legacy hardware using old DOS apps and batch files, folding the process into a single step. The old Motorola and Intel HEX formats aren't inherently complex.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 10, 2017 at 13:26

Thanks for your answers

Jan, I will take a look at SRecord.

Clive, I wonder if you want to make me look forward to you publishing these apps or if you want to encourage me to write my own apps. I'ld welcome if you published yours. :)

Martin

Posted on January 10, 2017 at 16:52

I think they are of relatively low complexity, I'd publish but generally find doing so to be unrewarding.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..