STM32 Build Analyzer (Enhanced) 🚀

Visual memory analyzer for STM32 projects – works with .map and .elf files, no matter what toolchain or build system you use.

❓ Why This Fork?
The original version was depandet with cmake-tool extension.
This fork removes that dependency, adds broader file handling, and enhances the UI for developers using VSCode, CMake, Makefiles, or any other custom setups.
🚀 Key Improvements in This Fork
✅ Removed CMake dependency – Works with any build system (Makefile, CubeIDE, etc.)
✅ Custom build folder support – Easily set via UI button or command
✅ Improved file discovery – More robust handling of .map and .elf files, multi build folders handling,
✅ Optimized UI – Visual memory usage indicators, serach option and sortable symbol view
🔍 Features
- Memory region analysis using
.map and .elf files
- Detailed breakdown of memory sections and symbols
- Clickable links from symbols to source files
- Visual panel with color-coded usage (RAM, Flash)
- Sorting by symbol name/address/size within each section
- Search filter for regions/sections/symbols with optional case sensitivity
- ARM toolchain integration (
arm-none-eabi-objdump, nm)
- Compatible with any build system
- Build multiple folders auto detection
- Option to point manualy to map and elf object (even wihout .elf .map extension)
📦 Installation
From VS Code Marketplace
📥 Marketplace link placeholder
Manual Installation
Requirements
- Node.js installed
- npm installed
vsce installed:
npm install -g @vscode/vsce
Build and Install manual
Clone the repository:
git clone https://github.com/niwciu/stm32-build-analyzer.git
cd stm32-build-analyzer
Install dependencies:
npm install
Build the .vsix package using vsce:
vsce package
This will generate a file like: stm32-build-analyzer-enhanced-1.1.4.vsix
Install the extension in VS Code:
code --install-extension stm32-build-analyzer-enhanced-1.1.4.vsix
🛠 Usage
- Open the Command Palette (
Ctrl+Shift+P) and run:
STM32 Build Analyzer – opens the main view
STM32 Build Analyzer Refresh Paths – re-detects build output folder
STM32 Build Analyzer Add Manual Build Pair – add a manual map/elf pair via prompts
- Analyzer view updates automatically when build output files change.
- Click the button next to Name, Address, or Size headers to sort symbols within a section (click again to toggle ascending/descending).
⚙️ Configuration
The extension auto-detects .map + .elf files in common build folders. If your build outputs use different names or the ELF has no extension, configure a manual pair so the analyzer can still select the correct files.
How auto-detection works
- If both
mapFilePath and elfFilePath are set and point to readable files, the extension uses them directly and skips scanning.
- Otherwise, it scans the entire workspace (including symlinked directories) and collects any folder containing both
.map and .elf files.
- If multiple candidates are found, you will be prompted to pick the build output (or a manual pair).
When toolchainPath is set, the extension uses the arm-none-eabi-objdump and arm-none-eabi-nm binaries from that directory.
If it is not set (or the binaries are not found), it falls back to using those tools from your system PATH.
Settings reference
| Setting |
Type |
Default |
Description |
stm32BuildAnalyzerEnhanced.mapFilePath |
string |
"" |
Absolute path to the .map file (overrides automatic search). |
stm32BuildAnalyzerEnhanced.elfFilePath |
string |
"" |
Absolute path to the .elf file (overrides automatic search). |
stm32BuildAnalyzerEnhanced.toolchainPath |
string |
"" |
Absolute path to the ARM GNU Embedded toolchain binaries. |
stm32BuildAnalyzerEnhanced.manualBuildPairs |
array |
[] |
List of manual map/elf pairs for builds with non-matching names or locations. |
stm32BuildAnalyzerEnhanced.debug |
boolean |
false |
Enable verbose logging for debugging purposes. |
Manual map/elf pairs
Add one or more entries in Settings → STM32 Build Analyzer (Enhanced) → Manual Build Pairs:
"stm32BuildAnalyzerEnhanced.manualBuildPairs": [
{
"label": "Release build",
"folder": "build/Release",
"map": "firmware.map",
"elf": "firmware.out"
}
]
Paths can be absolute or relative. map and elf paths may be relative to the folder when provided.
You can also add a manual pair from the Command Palette using STM32 Build Analyzer Add Manual Build Pair, which writes a new entry into the settings for you.
📜 Changelog
See CHANGELOG.md for full version history.
🤝 Contributing
Contributions are welcome! Please fork the repo and submit a pull request:
- Fork the repository
- Create your feature branch (
git checkout -b feature-name)
- Commit your changes (
git commit -m "Add feature")
- Push to branch (
git push origin feature-name)
- Open a Pull Request
If you find bugs or want to request features, feel free to open an issue.
⚖️ License & Attribution
This extension is licensed under the MIT License.
Originally created by Aleksei Perevozchikov (ATwice291)
Fork maintained by niwciu with enhancements described above.
STM32 build analyzer for memory usage, symbol tracking, and map/elf inspection – compatible with Makefiles, CubeIDE, and other toolchains.
❤️ Thank you for using this version of STM32 Build Analyzer!