cancel
Showing results for 
Search instead for 
Did you mean: 

To add a CRC32 result to the end of a bin file,

zhaowhong
Associate III

hi

To append a CRC32 calculation result, which is computed by the hardware CRC ,

I want make the crc result  at the end of the bin file , for the purpose of verification during program upgrade.

please Give a method,

It is best to directly generate the bin file with crc, instead of passing through the generated bin file, and add it in other Script

6 REPLIES 6
Pavel A.
Evangelist III

It is best to directly generate the bin file with crc, instead of passing through the generated bin file, and add it in other Script

It depends on your manufacturing and QA process.  IMHO "passing through the generated bin file, and add it in other Script" is good enough. Because you may want to do other things with the bin besides of adding CRC, for example encrypt or add a signature or some data. 

 

And as software people we can write software..

objcopy doesn't do it, but could use SRECORDS as a secondary step

IAR has some integrated methods 

Shown several times how to embed lengths with KEIL and GNY/GCC

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

Currently stm32cubeide does not have this function, right?

Thank you

If I use a script to add crc32 to the end of the bin file, and if the 4 bytes of crc32 are also written at the end of the bin file and written into the flash together, will it have any impact on the application? Or can it only be written without  crc bin file

What impact will the bin file with crc verification and the bin file without crc verification have on the program running if it is burned into the flash. Is there an error in the program because there is a crc verification part in the program running area?

Adding crc to the end of the bin file does not affect program operation