This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compute CRC of code with armlink

I'm starting to write a bootloader for my Cortex-M4 processor.

At start I need to check integrity of application in flash, for this I need the compute
the CRC of the content of the flash and compare with the correct one.

I want to know if it is possible to ask armlink to generate the CRC of the code (RO)
and add it to the binary at a specific location in flash.

The idea is to read this CRC generated by armlink (application) by the bootloader,
then compute the CRC of the content of the flash and then compare the two CRC.

Thanks
Christophe

Parents
  • I'm a pretty proficient coder, and can process ELF/AXF files. The tools Keil provides can get you to a HEX or BIN, but in most cases OTA type files need to be packaged specially anyway (compressed, encrypted, signed, etc). As Per observes for debugging where the U-Link, et al, injects code I usually just place a marker in the vector table to indicate this is a debug build, and the bootloader is smart enough to recognize that. The bootloader is what burns the OTA image, not the JTAG interface.

Reply
  • I'm a pretty proficient coder, and can process ELF/AXF files. The tools Keil provides can get you to a HEX or BIN, but in most cases OTA type files need to be packaged specially anyway (compressed, encrypted, signed, etc). As Per observes for debugging where the U-Link, et al, injects code I usually just place a marker in the vector table to indicate this is a debug build, and the bootloader is smart enough to recognize that. The bootloader is what burns the OTA image, not the JTAG interface.

Children
No data