2023-03-24 06:50 AM
In previous development project we were able to place several variables with a magic number and checksum of the application at the end of the interrupt vector table that the bootloader could use to check if a valid application existed.
Since the STM32CubeIDE generates the startup code this is not possible. Is anyone aware of a way for the STM32CubeIDE to place values such as the CRC into flash memory automatically during the build process??
2023-03-24 07:05 AM
Maybe the knowledbase article How to calculate and generate post-build CRC? helps?
Regards
/Peter
2023-03-24 08:33 AM
You can edit startup.s and modify however you choose.
Many tools, like Keil, allow you to run tools on the output files, post-link stage of the build.
Tend to use that here to package and sign firmware images in a form we can distribute.
2023-03-24 08:35 AM
I'm using the STM32CubeIDE that doesn't have the tools to do this. Also the IDE generates code so I'm not able to modify the startup.s file since the code will be overwritten if I generate code in future.