STM32 for VS Code Community is the community-maintained successor to the original STM32 for VS Code extension.
It provides a Makefile-based workflow for configuring, building, flashing, and debugging STM32 projects in Visual Studio Code. It works with STM32CubeMX, the GNU Arm toolchain, Make, OpenOCD, and Cortex-Debug.
The project is maintained by Dark-Matter7232. It preserves the original extension's workflow while adding continued maintenance, build profiles, artifact reporting, diagnostics, automatic SVD configuration, and a full ELF/MAP memory analyzer.

Migration from the original extension
This is a separately published successor, not an update of the original Marketplace package. Because the extension package ID has changed, existing installations will not update automatically.
- Install STM32 for VS Code Community from its new Marketplace listing or install the packaged
.vsix manually.
- Disable or uninstall the original STM32 for VS Code extension to avoid duplicate activity-bar entries and commands.
- Open your existing STM32 workspace and build once with the successor.
Existing project configuration remains compatible. The STM32-for-VSCode.config.yaml file, generated Makefile, command IDs, and stm32-for-vscode.* settings namespace are intentionally retained. Build profiles and the latest memory report are regenerated by the successor after a successful build.
Features
- Generate and maintain a Makefile for STM32CubeMX projects.
- Build debug and release profiles with configurable optimization settings.
- Build and flash through OpenOCD.
- Configure and launch STM32CubeMX from VS Code.
- Import STM32CubeIDE projects and STM32CubeMX examples.
- Detect and install the GNU Arm toolchain, Make, and OpenOCD when desired.
- Configure IntelliSense for C and C++ projects.
- Automatically download and configure the matching STM32 CMSIS-SVD file for Cortex-Debug when needed.
- Support C++ projects by adding or renaming the application entry point to
main.cpp.
- Report generated ELF, HEX, BIN, MAP, and listing artifacts after successful builds.
- Display RAM and FLASH usage in the STM32 activity view.
- Analyze ELF and MAP files with an expandable RAM/FLASH hierarchy.
- Inspect memory regions, linker sections, and demangled symbols.
- Search and filter regions, sections, and symbols with optional case sensitivity.
- Sort symbols by name, address, or size within each section.
- Open a symbol's exact source file and line from the analyzer.
- Use color-coded memory usage bars and used/free capacity indicators.
- Lazy-load build commands to improve extension startup time.

Requirements
Your CubeMX project must be generated as a Makefile project under Project Manager → Project → Toolchain/IDE. Leave Copy all used libraries into the project folder enabled when creating the project.
The extension requires:
The extension can install supported build tools automatically. Alternatively, configure their paths manually in the VS Code settings.
Getting started
- Open an STM32CubeMX Makefile project in VS Code.
- Select the STM32 for VS Code Community icon in the Activity Bar.
- Allow the extension to install or locate the required build tools.
- Select a build profile under Build.
- Use Flash to build and program the target through OpenOCD.
The standard build commands remain available from the Command Palette and can still be used by existing keybindings and tasks. Cmd/Ctrl+Shift+B can be used to start a build after the project has been configured.
Build profiles
Build and flash profiles are configured in STM32-for-VSCode.config.yaml:
defaultProfile: debug
profiles:
debug:
debug: true
optimization: Og
release:
debug: false
optimization: O3
Set optimization to the desired GCC level (O0, O1, O2, O3, Os, or
Og) in each profile. The selected profile value is used for that build;
debug builds additionally include debug information flags. You can also pass
OPTIMIZATION=O2 or OPTIMIZATION=-O2 to Make.
The Build and Flash groups in the activity view expand to show the configured profiles. Existing Build, Build Release, Flash, and Flash Release commands remain available for tasks and keybindings.
Build artifacts and memory usage
After a successful build, the extension reports generated artifacts when present:
- ELF executable
- Intel HEX image
- Binary image
- Linker MAP file
- Disassembly/listing output
The activity view also shows the latest RAM and FLASH usage, including used bytes, configured region capacity, free space, and percentage used. Clean Build clears the previous report, and a successful rebuild replaces it.
Memory analyzer
Use STM32: Open Memory Analyzer from the Command Palette or open Memory Analysis in the activity view.
The analyzer reads the latest ELF/MAP pair and presents data in a compact expandable hierarchy:
RAM
├── .data
├── .bss
└── ._user_heap_stack
FLASH
├── .isr_vector
├── .text
├── .rodata
└── .data
Expand a region to view its linker sections, then expand a section to view its sized symbols. The analyzer provides:
- Separate RAM and FLASH capacity summaries.
- Color-coded usage bars with accurate percentage calculations.
- Used and free memory for each region.
- Section and symbol addresses and sizes.
- Demangled symbol names where available.
- Clickable source locations for symbols containing debug information.
- Per-section sorting by symbol name, address, or size.
- Search across regions, sections, and symbols.
- Optional case-sensitive searching.
- Selection controls and collapse-all behavior.
The analyzer refreshes automatically after a successful build. Source navigation requires debug information in the ELF and source paths that are available to VS Code.
Automatic SVD Configuration
When a generated Cortex-Debug launch configuration does not already specify an
SVD file, the extension downloads the matching STM32 CMSIS-SVD file and adds it
to the workspace configuration. The same path is supplied as both svdFile
and svdPath, allowing Cortex-Debug and the XPERIPHERALS/mcu-debug viewer to
use the file. A manually supplied SVD value is preserved.
Configuration
The recommended way to customize builds is the STM32-for-VSCode.config.yaml file. It can be used to add flags, files, directories, libraries, and build profiles.
The following settings are available under STM32 for VS Code Community:
stm32-for-vscode.openOCDPath
stm32-for-vscode.makePath
stm32-for-vscode.makeConcurrentJobs
stm32-for-vscode.armToolchainPath
stm32-for-vscode.cubeMXPath
The settings namespace intentionally remains stm32-for-vscode so existing workspaces continue to work after migration.
Development
npm install
npm run lint
npm run test:unit
npm run compile:production
See CONTRIBUTING.md for development requirements and workflow details.
Lineage and attribution
STM32 for VS Code Community is a fork and successor of the original project by Bureau Moeilijke Dingen. The original MIT License and copyright notices are retained; see NOTICE.md.
The memory analyzer UI and interaction model were inspired by STM32 Build Analyzer by niwciu. Its MIT License and authorship are acknowledged in NOTICE.md. This extension's analyzer is integrated into its existing Makefile and ARM toolchain workflow and is not a bundled copy of that project.
License and support
This project is distributed under the MIT License.
For bugs, questions, and feature requests, open an issue in the community repository.