Customizable Bootloader for STM32 microcontrollers. logo

Customizable Bootloader for STM32 microcontrollers.

Free

Customizable bootloader for STM32 microcontrollers

FreeFree tier
Type
Open Source

About Customizable Bootloader for STM32 microcontrollers.

The STM32 Bootloader is a customizable open-source bootloader for STM32 microcontrollers, designed to enable in-application programming (IAP) of firmware from an external SD card using the FAT32 file system. It features configurable application space, flash erase and programming with verification, checksum validation, flash protection handling, and extended error handling for fail-safe operation. The bootloader supports firmware updates and full chip re-programming by entering ST's built-in bootloader from software. It includes serial tracing over SWO for debugging and is easy to port to different STM32 MCUs. The repository provides multiple example projects for STM32L4 series boards (e.g., STM32L476-CustomHw, STM32L496-Discovery) with dedicated README files.

Key Features

Configurable application space
Flash erase, programming, and verification
Checksum verification of firmware
Flash protection check and write protection enable/disable
Extended error handling with fail-safe design
Bootloader firmware update and full chip re-programming (enter ST bootloader from software)
Serial tracing over SWO for debugging
Easy to customize and port to other microcontrollers
Supports FAT32 file system on external SD card
Open source with multiple example projects for STM32L4 series

Pros & Cons

Pros
  • Open source (MIT license) and freely customizable
  • Well-documented with generated API docs and per-example READMEs
  • Supports multiple STM32L4 development boards and custom hardware
  • Fail-safe design with checksum verification and error handling
  • Includes ability to invoke ST's built-in bootloader for recovery
Cons
  • Currently only provides examples for STM32L4 series microcontrollers
  • Requires external SD card with FAT32 file system for firmware storage
  • No graphical user interface; all configuration done via source code
  • Limited to STM32 ecosystem; not a generic bootloader

Best For

In-application firmware updates via SD cardField firmware upgrades for STM32-based productsCustom bootloader development for embedded systemsPrototyping and evaluation of STM32 IAP capabilities

FAQ

What microcontrollers does this bootloader support?
The repository includes example projects for STM32L476VG, STM32L496VG, and STM32L496AG (Discovery board). The bootloader library is designed to be portable to other STM32 microcontrollers.
How does the bootloader update firmware?
It reads a new firmware binary from an external SD card formatted with FAT32 file system, then programs and verifies it in the microcontroller's flash memory.
What development tools are supported?
The STM32L496-Discovery example supports both IAR EWARM and the GNU Arm Embedded Toolchain (ARM GCC) out-of-the-box.
Where can I find documentation?
Complete documentation of the bootloader library source code is available at https://akospasztor.github.io/stm32-bootloader.