Flashing STM32 Firmware Directly from VS Code over UART: An Open-Source Extension
Description and use
A VS Code extension enables UART flashing of STM32 boards via a CH340 USB‑UART bridge, eliminating the need for ST‑Link hardware.
Problem
Developers need to flash STM32 boards that lack ST‑Link or native USB, using only a USB‑UART bridge.
Outcome
Flashing is performed entirely within VS Code, eliminating the need for ST‑Link hardware and separate flashing utilities.
Workflow
- Build firmware to .hex or .bin
- Open SerialFlash panel or run "SerialFlash: Open Flasher Panel"
- Select serial port, firmware file, and reset mode
- Click "Flash" or use Cmd+Alt+F (Ctrl+Alt+F)
- Monitor SerialFlash output for bootloader version, product ID, erase, write, verify, and reset
Evidence
If you have ever bought one of those small STM32 boards with a USB-C port, there is a good chance that port goes to a USB-UART chip (often a CH340).
You build your project, press Cmd+Alt+F (Ctrl+Alt+F on Windows and Linux), and it enters the bootloader, erases, writes, verifies and resets the board into the new firmware.
The extension defaults to 115200 baud.
- Record date: 2026-10-21T04:41:24.871Z