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.

How to use it

  1. Wire the probe to the target: SWDIO, SWCLK, GND, and the target’s 3.3 V to the probe’s VTref pin. Power the target.
  2. Connect: ST-LINK (V2, V2-1 on Nucleo and Discovery boards, V3) or any CMSIS-DAP probe, over WebUSB. Load the program’s ELF so variables and functions have names.
  3. Halt, step, set breakpoints and watchpoints in Core; watch variables live, read RTT output, browse peripheral registers or catch a fault in the other views.

Questions

Which probes work?

ST-LINK/V2 (firmware J17 or later), ST-LINK/V2-1 on every Nucleo and Discovery board, STLINK-V3, and any CMSIS-DAP probe: DAPLink boards, the Raspberry Pi Debug Probe and picoprobe, NXP MCU-Link, J-Link OB in CMSIS-DAP mode, ESP-Prog. A SEGGER J-Link works through the Floating ECU bridge, which talks to it with SEGGER’s own library (install the J-Link Software and pylink on the bridge’s PC).

Which chips?

Any Arm Cortex-M on SWD: M0, M0+, M3, M4, M7, M23, M33, M55, M85, from ST, NXP, Nordic, Microchip, Infineon, Renesas, Raspberry Pi and others. Breakpoints and watchpoints use the core’s own units, so they work in flash.

Which browsers work?

Chrome and Edge on a computer (WebUSB, and WebHID for older CMSIS-DAP probes). On Windows an ST-LINK needs ST’s USB driver, which STM32CubeProgrammer installs; CMSIS-DAP v2 probes need none. On Linux, give your user access to the probe with a udev rule.

Does it replace GDB?

Not for source-level stepping: it does not read DWARF line tables yet. It covers what a debugger is used for most days without an IDE: is the program running, what are its variables now, what did it print, what is that register, where did it fault.

Does reading variables slow the firmware down?

No. The probe reads memory through the debug port while the core keeps running (background memory access); the core does not stop. Only halting, stepping and breakpoints stop it.

Can I try it without a board?

Yes: “Simulated board” connects to a simulated Cortex-M4 running a motor speed controller, behind a simulated probe that speaks real CMSIS-DAP commands. Its ELF is loaded for you.

Straight to a job

  • Live variable watch and plot from an ELF: Pick global variables from the ELF and read them through ST-LINK or CMSIS-DAP while the firmware runs: values, min/max, writes, strip-chart plots and CSV recording.
  • SEGGER RTT viewer in the browser: Find the RTT control block in RAM and read every up channel while the core runs; send input to the down buffer. Works with ST-LINK and CMSIS-DAP, not only J-Link.
  • Live peripheral registers from an SVD: Read every register of a peripheral through the probe and decode its fields and enumerations from the SVD, live; write a field.
  • Catch a Cortex-M HardFault on the target: Stop the core when it faults (vector catch), read CFSR, HFSR and the fault address, unwind the stacked frame and name the faulting function from the ELF.
  • Microcontroller memory viewer and editor: Read RAM, flash or peripheral space through the probe as a hex dump that highlights what changed; write 8, 16 or 32-bit values; save a dump.

Related tools

Also useful for: online debugger, web debugger, stlink, daplink, swd, gdb, ozone, stm32cubemonitor, stmstudio, live watch.