Flash STM32 through an ST-LINK or CMSIS-DAP probe

SWD over WebUSB or WebHID with an ST-LINK/V2, V2-1, V3 or any CMSIS-DAP probe: halt, erase, program, verify, reset and run.

How to use it

  1. Connect an ST-LINK or a CMSIS-DAP probe to SWDIO, SWCLK, GND and the target’s 3.3 V (VTref); NRST helps.
  2. Press Connect and choose the probe in the browser’s list; the tool halts the core and reads the chip.
  3. Open a HEX, S19 or BIN, then erase, program and verify, and reset to run.

Questions

Which probes work?

ST-LINK/V2, V2-1 (on Nucleo and Discovery boards) and V3 with ST’s firmware, CMSIS-DAP probes (DAPLink boards, the Raspberry Pi Debug Probe, picoprobe, MCU-Link, J-Link OB in CMSIS-DAP mode), and a SEGGER J-Link through the Floating ECU bridge.

Which browsers work?

Chrome and Edge on a computer, which have WebUSB and WebHID. On Linux, give your user access to the probe’s USB device with a udev rule. On Windows, close STM32CubeIDE or other tools that hold the probe.

Is my firmware uploaded?

No. The file is read by your browser in this tab and never sent anywhere; there is no server that could receive it.

Related tools

  • Flash STM32, ESP32 and RP2040 from the browser: Program HEX/S19/BIN/UF2 into an STM32 (UART bootloader, USB DFU, ST-LINK or CMSIS-DAP), an ESP32 or ESP8266 (ROM loader) or an RP2040/RP2350 (PICOBOOT or UF2); verify and read back.
  • STM32 USB DFU flasher in the browser: Program an STM32 in DFU mode (0483:DF11) over WebUSB: reads the flash layout the bootloader reports, erases by sector, writes, verifies, reads back and leaves DFU to run.
  • ESP32 and ESP8266 flasher in the browser: esptool’s write_flash over Web Serial: auto-reset into the ROM loader, bootloader, partition table and app at their offsets, compressed writes, MD5 verify, faster baud rates.
  • RP2040 and RP2350 flasher: PICOBOOT and UF2: Flash a Raspberry Pi Pico or Pico 2 in BOOTSEL mode over WebUSB (PICOBOOT) with verify and read-back, or turn a HEX/BIN into a UF2 to copy onto the drive.
  • Cortex-M debugger in the browser (ST-LINK, CMSIS-DAP): Halt, step and reset an Arm Cortex-M; watch and write global variables from the ELF live with plots; SEGGER RTT terminal; live SVD peripheral registers; breakpoints, watchpoints and HardFault capture. Over WebUSB, nothing to install.
  • Firmware file tool (HEX / S19 / BIN): View, convert, merge, fill gaps, crop, relocate and compare firmware images; insert CRC-32/CRC-16/sums.
  • Register viewer (SVD): CMSIS-SVD peripherals, registers and bit fields; decode a value; find the register at an address; C defines.

Also useful for: swd flash, st-link flash, stlink web, st-link utility alternative, cmsis-dap flash, debug probe, pyocd, openocd flash, nucleo flash.