STM32 Development with CMake and VSCode
A practical STM32 tooling path for developers who want explicit project files, command-line builds, version-control-friendly configuration, and VSCode as the editor and debugger front end.
IntermediateDifficulty
9Articles
STM32L433Primary hardware
9 lessons, in order
01
Why Use CMake and VSCode for STM32 Development?
A practical look at why this site uses CMake and VSCode for STM32 firmware instead of making STM32CubeIDE the main project workflow.
02
Installing the STM32 CMake Toolchain on macOS
Install the compiler, build tools, flashing utilities, and VSCode extensions needed for STM32 development with CMake on macOS.
03
Creating a Minimal STM32 CMake Project
Create the smallest useful STM32 CMake project structure before adding startup code, linker scripts, flashing, or debugging.
04
Understanding the STM32 Linker Script
Understand how an STM32 linker script describes flash, RAM, stack, heap, and firmware sections before startup code runs.
05
Adding Startup Code to a Bare-Metal STM32 Project
Add the vector table, reset handler, data initialization, BSS clearing, and main entry path needed by a bare-metal STM32 firmware image.
06
Building and Flashing STM32 Firmware Without CubeIDE
Build a linked STM32 firmware image, generate binary and hex outputs, and flash the Nucleo board from command-line tools instead of STM32CubeIDE.
07
Running STM32 Firmware Under a VSCode Debugger
Configure VSCode to launch an STM32 debug session through OpenOCD, stop in firmware, step through startup code, and inspect target state.
08
Adding STM32CubeMX-Generated Drivers to a CMake Project
Use STM32CubeMX-generated startup, HAL, CMSIS, and device support files from a CMake project without making STM32CubeIDE the owner of the workflow.
09
Organizing Reusable STM32 CMake Projects
Structure an STM32 CMake project so application code, board configuration, startup files, linker scripts, generated vendor code, and reusable drivers have clear ownership.