Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


You are viewing a reply to Bootloader CRC check  

Bootloader CRC check

I’d recommend using the open-source utility “srec_cat” to embed a CRC into your object file. It’s also capable of doing a lot of other things related to manipulating object code files.

http://srecord.sourceforge.net/Question

I recently wrote a bootloader for a project I worked on recently, and I had do come up with a way to do exactly what you describe - insert a CRC of the image into a fixed location within the object code file. I used srec_cat to accomplish this.

You will want to run the srec_cat utility as part of your post-build process. I’d suggest making a small shell script (batch file) that runs the srec_cat program, and run the script/batch containing all the utilities you want to run (including srec_cat) as your post-build step.

Learning how to use the SRecord utilities can be a bit dauting. They can do a lot of nice things related to manipulating object code files, but this flexibility comes at the expense of ease of use. Fortunately, the author does provide comprehensive documentation.

I can provide some assistance in using srec_cat and setting up a post-build script to do this if you need it.