DFU Bootloader for STM32 chips logo

DFU Bootloader for STM32 chips

Free

Open-source USB DFU bootloader for STM32 microcontrollers

FreeFree tier
Type
Open Source

About DFU Bootloader for STM32 chips

dapboot is an open-source USB Device Firmware Upgrade (DFU) bootloader designed specifically for STM32 microcontrollers. It currently officially supports the STM32F103x series and provides pre-configured targets for popular development boards such as the Blue Pill, Maple Mini, ST-Link clones, and others. The bootloader can be built and flashed using standard make commands and OpenOCD, with support for both CMSIS-DAP and ST-Link debugging probes. It offers a standard 8 KiB bootloader occupying lower flash and experimental 'high memory' variants that reside in the top 7 KiB of ROM, allowing applications to run without an offset. The project is configurable via make variables and local.mk overrides, making it adaptable for custom hardware.

Key Features

USB Device Firmware Upgrade (DFU) bootloader for STM32 devices
Officially supports STM32F103x series
Pre-configured targets for Blue Pill, Maple Mini, ST-Link clones, Olimex STM32-H103, Blue Pill Plus, BigTreeTech SKR MINI E3
Standard bootloader (first 8 KiB of flash) and experimental high memory variants (_HIGH, _HIGH_128, _HIGH_256) to avoid application offset
Built with libopencm3, open-source firmware library
Configurable via make variables and local.mk file
Flashed using OpenOCD with support for CMSIS-DAP or ST-Link probes
Free and open-source under a permissive license (MIT implied by repository)

Pros & Cons

Pros
  • Open-source and free to use
  • Supports multiple popular STM32 development boards
  • High memory variant allows applications to run without offset, simplifying linker scripts
  • Configurable build options for custom hardware
  • Active GitHub repository with community contributions
Cons
  • Currently only officially supports the STM32F103x series (limited microcontroller range)
  • Command-line only; no graphical user interface
  • Requires familiarity with make, OpenOCD, and linker scripts
  • Documentation is primarily the README file with limited examples

Best For

Firmware updates for STM32-based embedded devicesDevelopment and prototyping with STM32F103x boardsCustom bootloader solutions for STM32 projects needing DFU capabilityEducational projects learning USB DFU and bootloader development

FAQ

What microcontrollers does dapboot support?
dapboot officially supports the STM32F103x series. Experimental support may be added for other chips through custom targets.
What is the high memory bootloader variant?
The high memory bootloader resides in the top 7 KiB of ROM instead of the lower 8 KiB, allowing applications to be written without an address offset. Variants exist for 64 KiB, 128 KiB, and 256 KiB flash chips.
How do I flash the bootloader to a board?
Use the 'make flash' command with OpenOCD. By default, it assumes a CMSIS-DAP probe; you can override the interface using OOCD_INTERFACE, e.g., 'make OOCD_INTERFACE=interface/stlink-v2.cfg flash'.
Is dapboot free?
Yes, dapboot is open-source and free to use. The source code is available on GitHub under a permissive license.