Skip to main content
Version: 2.8

Flash STM32 Devices

Flashing Methods for STM32 Devices

Flashing an STM32WL board takesTAK (Team Awareness Kit). A situational awareness ecosystem. Meshtastic bridges to it by converting mesh messages to and from Cursor on Target format. two steps: get the board ready to flash, then write the firmware. A UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. flash uses the chip's built-in ROM bootloader; an SWDSWD (Serial Wire Debug). A two-pin debug and programming interface, used on STM32 devices to enter bootloader mode and flash firmware. programmer writes to flash directly. Meshtastic firmware for STM32WL targets is distributed as firmware-<target>-X.X.X.xxxxxxx.bin and flashed to 0x08000000; the .elf in the same release also works with STM32CubeProgrammer.

For the BOOT0 pin location, UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. pins, and any board-specific steps, see the documentation for your board.

Getting the Board Ready to Flash

STM32WL has no USBUSB (Universal Serial Bus). The wired connection used to power a device, flash firmware onto it, and communicate with it over serial. DFUDFU (Device Firmware Update). A state in which a device is placed into for it to receive a firmware update. mode. For a UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. flash, the ROM bootloader can be entered from a Meshtastic client or with the BOOT0 pin. For an SWDSWD (Serial Wire Debug). A two-pin debug and programming interface, used on STM32 devices to enter bootloader mode and flash firmware. flash, the programmer resets and connects to the board itself.

Flashing from Web Flasher

Browser-based flashing is a work-in-progress and not available for STM32 targets yet.

Flashing over UART

A USBUSB (Universal Serial Bus). The wired connection used to power a device, flash firmware onto it, and communicate with it over serial.-TTL serial adapter can flash STM32WL over UART without an SWDSWD (Serial Wire Debug). A two-pin debug and programming interface, used on STM32 devices to enter bootloader mode and flash firmware. programmer, once the board is in the ROM bootloader.

Flashing over SWD

An SWDSWD (Serial Wire Debug). A two-pin debug and programming interface, used on STM32 devices to enter bootloader mode and flash firmware. programmer such as an ST-LINK writes firmware straight to flash over the SWD pins, without using BOOT0 or the ROM bootloader.

Flashing over USB

STM32WL has no USBUSB (Universal Serial Bus). The wired connection used to power a device, flash firmware onto it, and communicate with it over serial. peripheral, so there is no USBUSB (Universal Serial Bus). The wired connection used to power a device, flash firmware onto it, and communicate with it over serial. DFUDFU (Device Firmware Update). A state in which a device is placed into for it to receive a firmware update. mode. A UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. flash (through the ROM bootloader) and an SWDSWD (Serial Wire Debug). A two-pin debug and programming interface, used on STM32 devices to enter bootloader mode and flash firmware. flash are the only options.

Any USBUSB (Universal Serial Bus). The wired connection used to power a device, flash firmware onto it, and communicate with it over serial. port connects to an internal USBUSB (Universal Serial Bus). The wired connection used to power a device, flash firmware onto it, and communicate with it over serial.-to-UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. bridge and can be used for UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge. flashing, unless that bridge is not wired to a bootloader UARTUART (Universal Asynchronous Receiver-Transmitter). A serial interface used to communicate with a device over its pins or through a USB-to-serial bridge.. On the Wio-E5 it is not, though two jumper wires can bridge it to one; see the Wio-E5 page.

Removing Readout Protection

Some boards, such as the Wio-E5, ship with flash readout protection enabled. STM32CubeProgrammer connects but cannot read or write flash until readout protection is removed.