Secondary boot loader + internal boot loader
Hello,
I am considering to develop a small secondary boot loader for STM32F030xx.
My idea is this BL checks the CRC of the application image and jumps to it if CRC matches. A second fallback image would be jumped to should the primary one be invalid (e.g. previous update attempt failed due to power loss) so that the device would be capable of minimally work to allow for a new update attempt.
The BL would call STM32 built-in BL if it detected a magic value on the USART data register. Update could also be started by the application itself, which could directly call the built-in BL or pass a magic number to the secondary BL for it to call the built-in BL.
However, I would not like to reinvent the wheel. Is there some BL that does something similar that I could adapt?
FWIW I looked at AN4657 and I noticed it uses ymodem protocol instead of using the built-in BL. Any reason for that? Is there any advantage of the former of the latter?
Thank you
