2025-12-08 2:37 AM
Hi,
ich have a STM32H723 board with an SD-card slot. So it is possible to place the firmware on the SD-card which allows fast an easy update also for an end-user with no programmer.
One possibility would be to have some kind of bootloader which reads the firmware from the Sd-card, loads it into the RAM and then jumps to its entry point. This does not work as my firmware has a size of about 500 kBytes - too less ram available on the MCU.
An other possibility would be, to do all the fixed hardware initialisation and stuff within the bootloader which would make the remaining firmware, which has to be loaded to RAM, much smaller. But here I have doubts if a) moving the initialisation to the loader would make the remaining firmware small enough and b) if development of that firmware would become incredibly complicated as the initialisation-part has to come from the bootloader even durign debugging.
The last possibility is to let the bootloader check if a new firmware version is available on the flash. In this case the bootloader can read the firmware form the SD-card, wite it to the flash and then jump to the beginning of the firmware. In case of no new firmware being available on the SD-card, the bootloader drops the flashing-part and jumps into the already existing firmware.
So my question: is this a procedure somebody already has tried? Or even better: are there any official information available about such a procedure and specifically about a bootloader which is able to write to the flash of the STM32H723 without deleting itself?
Any information I could use as starting point?
Thanks!