Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>STM32 Build Analyzer (Enhanced)New to Visual Studio Code? Get it now.
STM32 Build Analyzer (Enhanced)

STM32 Build Analyzer (Enhanced)

niwciu

|
2,328 installs
| (7) | Free
STM32 Build Analyzer for VSCode - Fork of ATwice291/stm32-build-analyzer with additional features...
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

STM32 Build Analyzer (Enhanced) 🚀

License: MIT VS Code

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

Main UI View


❓ 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

  1. Node.js installed
  2. npm installed
  3. vsce installed:
    npm install -g @vscode/vsce
    

Build and Install manual

  1. Clone the repository:

    git clone https://github.com/niwciu/stm32-build-analyzer.git
    cd stm32-build-analyzer
    
  2. Install dependencies:

    npm install
    
  3. Build the .vsix package using vsce:

    npm run vsix
    
  4. This will generate a file like: stm32-build-analyzer-enhanced-1.1.9.vsix

  5. Install the extension in VS Code:

    code --install-extension stm32-build-analyzer-enhanced-1.1.9.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

  1. If either mapFilePath or elfFilePath is configured, both settings must point to readable files. A valid explicit pair is used directly and skips scanning; an incomplete or inaccessible pair produces a clear configuration error.
  2. When neither explicit path is configured, the extension asynchronously scans every root in a multi-root workspace for .map and .elf files with the same basename and treats each matching pair as a build output. Directory symlinks and common dependency/tooling folders are skipped.
  3. Manual pairs whose output files have not been built yet are skipped. Available manual and automatically discovered pairs remain selectable.
  4. If multiple available pairs are found, you will be prompted to pick the build output. Configure a manual pair when the MAP and ELF names differ.

Toolchain path behavior

When toolchainPath is set, the extension resolves variables and workspace-relative paths, then uses the arm-none-eabi-objdump and arm-none-eabi-nm binaries from that directory. If it is not set, tools are resolved from your system PATH. If a configured directory is missing an individual binary, the extension reports it and falls back to that tool from PATH. Tool execution failures are shown as errors instead of displaying misleading 0 B usage. Changes to path settings take effect automatically without reloading the VS Code window. Unset environment variables and unknown named workspace folders are reported explicitly instead of being replaced with an empty string. mapFilePath and elfFilePath must be configured together, and invalid explicit paths are reported instead of being silently replaced by automatic discovery. Structurally invalid manual entries and unresolved variables are also reported, while valid manual pairs with outputs that have not been built yet are skipped until those files become available.

Settings reference

Setting Type Default Description
stm32BuildAnalyzerEnhanced.mapFilePath string "" Absolute or workspace-relative path to the .map file. Supports ${userHome}, ${workspaceFolder}, ${workspaceFolder:Name}, and ${env:VAR}.
stm32BuildAnalyzerEnhanced.elfFilePath string "" Absolute or workspace-relative path to the .elf file. Supports ${userHome}, ${workspaceFolder}, ${workspaceFolder:Name}, and ${env:VAR}.
stm32BuildAnalyzerEnhanced.toolchainPath string "" Absolute or workspace-relative path to the ARM GNU Embedded toolchain binaries. Supports ${userHome}, ${workspaceFolder}, ${workspaceFolder:Name}, and ${env:VAR}.
stm32BuildAnalyzerEnhanced.manualBuildPairs array [] List of manual map/elf pairs for builds with non-matching names or locations. Unbuilt pairs are skipped. Path fields support the same variables as the individual path settings.
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. Manual pairs are treated as alternative build outputs: a pair is offered only when both configured files are readable. This allows projects with many configurations to analyze whichever outputs are currently built without requiring every configured pair to exist.

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:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature-name)
  3. Commit your changes (git commit -m "Add feature")
  4. Push to branch (git push origin feature-name)
  5. 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!




myEmbeddedWayBanerWhiteSmaller


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft