finds.dev← search

// the find

akospasztor/stm32-bootloader

★ 1,039 · C · NOASSERTION · updated Dec 2022

Customizable Bootloader for STM32 microcontrollers. This example demonstrates how to perform in-application-programming of a firmware located on an external SD card with FAT32 file system.

A bootloader library for STM32L4 microcontrollers that handles in-application programming from an SD card over FatFS. It's a working reference implementation, not a production-ready framework — you take the library, adapt the hardware layer to your board, and wire it into your application's startup sequence. Aimed at embedded developers who need a starting point rather than a black box.

The core library (bootloader.c/.h) is cleanly separated from the HAL and FatFS glue code, so porting to a different STM32L4 variant is mostly a matter of swapping out the project folder rather than digging through entangled code. Flash write protection handling is included and correct — many bootloader examples skip this entirely and leave you with a brick the first time write protection is enabled. The ability to trigger ST's built-in ROM bootloader from software (without toggling the BOOT pin) is genuinely useful for full chip re-programming in field scenarios. CRC32 checksum verification over the full binary is built in with sane defaults.

Scope is locked to STM32L476 and STM32L496 — there is nothing here for STM32F4, STM32H7, or any other family, and the HAL dependency makes porting non-trivial. The repo has been dormant since late 2022 and only covers SD card as the transport; if you want UART, USB, or CAN update paths you are building that yourself from scratch. The three example projects are structurally identical, which means three copies of the same BSP code diverging silently — no shared HAL abstraction layer to keep them in sync. No rollback mechanism: if the new firmware is corrupt in a way that passes CRC but fails at runtime, the device is stuck until someone pulls the SD card.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →