End-to-end STM32 firmware workflow using STM32CubeMX + CMake + OpenOCD + ST-Link + GDB. Use when creating a new STM32 project, migrating from IDE-managed build to CMake, generating or updating CubeMX code, configuring OpenOCD flashing/debug, attaching GDB to ST-Link, or troubleshooting build/flash/debug issues for STM32 MCUs.
Use this skill to build a reproducible STM32 development pipeline around CubeMX-generated sources and a CMake-based build, then flash and debug with OpenOCD, ST-Link, and GDB.
Prefer deterministic command-line workflows over IDE-only flows so builds and debug sessions are scriptable in CI and on different machines.
arm-none-eabi-* tools.arm-none-eabi-gdb remote target.Collect this before making changes:
.ioc path and target MCU/board (for example STM32F103C8 or STM32H743ZI)arm-none-eabi-gcc, cmake, ninja/make, openocd, arm-none-eabi-gdb)stlink, swd/jtag)STM32xxxx_FLASH.ld).ioc as source of truth for pin/peripheral config.Debug during bring-up (-Og -g3), then switch profiles intentionally.Core/, Drivers/, and startup_*.s..ioc changes and reconcile CMake source lists..hex and .bin.For concrete templates and commands, read references/integration-playbook.md.
program <elf> verify reset exit or GDB load.arm-none-eabi-gdb to localhost:3333.Use the issue-to-fix table in references/integration-playbook.md.
When executing this skill, produce: