Digital Controller

让单片机(如STM32)在编译时自动嵌入固件CRC32,以实现Bootloader对固件的完整性检查

Let the microcontroller (such as STM32 MCU) compiler automatically embed the CRC32 value for firmware integrity check in bootloader. 通过在FLASH存储空间的最末尾设置两个int32大小的crc32Value和crc32Value2来实现嵌入式程序Bootloader自检。检查过程可以统一为,检查crc32Value的值是否正确,若不正确,检查crc32Value2的值是否正确。若都不正确,则程序错误,进行bootloader错误处理阶段。