This system enables firmware updates on STM32F407-based devices simply by copying a .bin file to an SD card. The custom bootloader automatically reads and writes the new firmware to the MCU’s internal flash, without requiring a debugger or additional tools.
This system was tested using the project STM32F407-LCD-Camera-SDCard as the main application.
- Custom bootloader with
.binfile support from SD card - Automatic detection and update when a new firmware file is available
https://youtu.be/p20jer7IenY?si=01RXiO1Az-_TIbf0
- STM32F407VGT6 Board (as per schematic)
- STM32CubeIDE
- SD card (FAT32)
- USB cable (for MSC connection)
.binfile from the main application build
- Build both
BootloaderandMainAppprojects. - Flash the bootloader to the STM32 internal flash using ST-Link or any debugger.
- Copy the
.binfile from theMainAppto the root directory of the SD card. - Insert the SD card into the board and power up the device.
- The bootloader will detect and write the new firmware to the main application address.
- The system will then automatically jump to the main application.
- The
.binfile must be placed in the root directory and named appropriately (e.g.,firmware.bin). - The main application flash address can be configured in the linker script (e.g.,
0x08008000). - After the update, the bootloader performs a clean vector reset jump to the main application.
Moh Sirojudin Munir
Embedded systems developer
LinkedIn | GitHub | YouTube