2019-11-05 09:18 PM
Hello All,
We have designed a Custom Board with STM32F777 MCU chip and are using Atollic Truestudio with ST Micro's CubeMX for development.
I have implemented a USB boot loader for the same hardware which is working fine with the Custom Board.
Now i want to implement CRC check in the Boot loader.
My application code which is to be loaded using boot loader is generated using atolic so is there any method/Tool/ setting available from which CRC is generated and attached to the end of the application binary file.
Also if there is any method/Tool/ setting please let me Know in detail what is that method so that i can implement it in my Bootloader
Thanks and regards
Utkarsh
2019-11-05 11:25 PM
Pre-calculate the CRC for your application code, and write to a fixed/known target address. This is usually done in a post-build step. An *.HEX of *.S19 file is easier to patch then a binary file.
At runtime, calculate the CRC in your bootloader, and compare with the stored CRC. Exclude the loaded CRC from calculation, of course.