CatalogSTM32 Debug2026

STM32 Debug

Debug & flash STM32 from the CLI: OpenOCD+GDB, st-link tools, probe-rs, J-Link, SWD/SWO/RTT, semihosting, GDB mastery, and writing your own flash/debug tooling.

/ · esc
8 guides
01Stm32 Debug

Writing Your Own Flash/Debug Tools & Automation

Build reproducible, CI-friendly flash + verify + reset automation for the STM32L4R5 from OpenOCD Tcl, GDB batch scripts, Python (pyOCD / pylink), and the on-chip USART/USB-DFU bootloader.

8 sectionsTOOLING
Open guide
02Stm32 Debug

arm-none-eabi-gdb — Embedded Debugging Mastery

A field manual for driving the ARM cross-GDB on an STM32L4R5 (Cortex-M4F): connect to a GDB server, flash, set hardware breakpoints and watchpoints, poke peripheral registers by raw address, and dissect a HardFault from the SCB fault registers.

9 sectionsGDB
Open guide
03Stm32 Debug

SEGGER J-Link — Commander & GDBServer CLI

Flash, run and inspect an STM32L4R5ZI from the terminal — JLinkExe, JLinkGDBServer + arm-none-eabi-gdb, SEGGER RTT, and scripted batch flashing.

8 sectionsJ-LINK
Open guide
04Stm32 Debug

OpenOCD + GDB — Flash & Debug STM32 from the CLI

Program and step-debug an STM32L4R5 over SWD with nothing but openocd, arm-none-eabi-gdb, and an ST-Link — no IDE required.

8 sectionsOPENOCD
Open guide
05Stm32 Debug

probe-rs — Modern CLI Flash/Debug (RTT, cargo-embed)

One host-side toolchain that replaces OpenOCD + GDB + ST-LINK Utility: flash an ELF, stream RTT/defmt logs, and catch panics on a Cortex-M4F — over ST-Link, J-Link, or CMSIS-DAP.

9 sectionsPROBE-RS
Open guide
06Stm32 Debug

ARM Semihosting — printf via the Debugger

Get stdout on an STM32L4R5 with zero UART wiring — BKPT-based host syscalls, newlib rdimon, and OpenOCD, from first build to first character.

9 sectionsSEMIHOSTING
Open guide
07Stm32 Debug

stlink Tools — st-flash / st-info / st-util CLI

The open-source stlink toolset (stlink-org, formerly texane) for probing, flashing, dumping, GDB-debugging and SWO-tracing an STM32L4R5 over SWD — with exact commands, address maps and a copy-pasteable firmware example.

8 sectionsST-LINK
Open guide
08Stm32 Debug

SWD, SWO Trace & RTT — printf-Debug over the Probe

Get real, non-intrusive logging out of an STM32L4R5 over the debug probe — SWD wiring, ITM/SWO stimulus printf, SEGGER RTT, and the exact host-side CLI capture commands.

8 sectionsSWO/RTT
Open guide