Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>STM32 One-Click ProgramNew to Visual Studio Code? Get it now.
STM32 One-Click Program

STM32 One-Click Program

COITSILLE

|
884 installs
| (1) | Free
Program STM32 using STM32CubeProgrammer CLI with a single command.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

STM32 One-Click Program

Program STM32 MCUs directly from VS Code using STM32CubeProgrammer CLI.

This extension provides one-click programming, interactive firmware file selection, optional CMake build integration, and a configurable reset-after-program behavior.

Features

  • Firmware file picker — when multiple .elf/.hex/.bin files exist, choose which one to flash.
  • One-click programming — flash firmware to STM32 from VS Code.
  • Build & Program — CMake configure + build + flash in one step.
  • Toggle reset-after-program — quickly switch reset behavior.
  • Status bar button — fast access from the editor.
  • Configurable search — limit firmware scanning to specific directories and file extensions.

Requirements

  • STM32CubeProgrammer installed.
  • CMake Tools extension (ms-vscode.cmake-tools) for Build & Program.
  • A workspace that contains generated .elf or .hex outputs.

Commands

Open Command Palette (Ctrl+Shift+P) and run:

Command Shortcut
STM32-Program-1-Click: Program (No Build) Ctrl+Alt+F
STM32-Program-1-Click: Build & Program Ctrl+Alt+B
STM32-Program-1-Click: Select Firmware File —
STM32-Program-1-Click: Select CubeProgrammer Path —
STM32-Program-1-Click: Toggle Reset After Program —

Configuration

Settings namespace: STM32-Program-1-Click

Setting Type Default Description
programmerPath string "" Path to STM32_Programmer_CLI.exe.
interface enum "SWD" Interface type: SWD or JTAG.
resetAfterProgram boolean true Append -rst after programming.
firmwareExtensions array [".elf", ".hex"] File extensions to search. Order = priority (first = highest). Common: .elf, .hex, .bin, .s19.
elfSearchPaths array [] Directories to scan for firmware (relative to workspace root). Example: ["build", "out/Debug"]. Leave empty to auto-detect.

Typical Workflow

Program only

  1. Build your project using your existing flow.
  2. Run STM32-Program-1-Click: Program (No Build) or press Ctrl+Alt+F.
  3. If multiple firmware files are found, pick one from the list.

Build and program

  1. Ensure CMake project is available (CMakeLists.txt exists).
  2. Run STM32-Program-1-Click: Build & Program or press Ctrl+Alt+B.
  3. Extension runs:
    • cmake.configure
    • cmake.build
    • Auto-detects firmware → STM32CubeProgrammer CLI flash

Firmware search behavior

The extension searches for firmware files in this order:

  1. User-configured paths (elfSearchPaths setting) — fastest.
  2. Common build directories — build/, out/, Debug/, Release/, bin/.
  3. Full workspace scan — last resort, limited to 200 results.

Results are cached and kept up-to-date by a file watcher. Duplicates (same base name, different format) are deduplicated — the highest-priority format (by firmwareExtensions order) wins.

Troubleshooting

STM32CubeProgrammer not found

  • Run STM32-Program-1-Click: Select CubeProgrammer Path.
  • Or install STM32CubeProgrammer from ST website.

Build & Program fails before programming

  • Confirm CMake Tools is installed and enabled.
  • Confirm CMakeLists.txt exists in workspace.
  • Try running CMake: Configure and CMake: Build manually once.

No firmware files found

  • Build the project first.
  • Check firmwareExtensions setting matches your output format.
  • Add your build output directory to elfSearchPaths for faster detection.

Program command returns success but progress characters look strange

  • This is usually a terminal encoding/font display issue.
  • If verification passes, programming is still valid.

Repository

  • Home: https://github.com/COITSILLE/stm32-program-extension
  • Issues: https://github.com/COITSILLE/stm32-program-extension/issues
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft