Troubleshooting
Probe not listed
- Windows: CMSIS-DAP v2 probes need a WinUSB driver. Use Zadig to replace the driver with WinUSB if the probe does not appear. CMSIS-DAP v1 (HID) probes usually work without a driver.
- Linux: install a udev rule granting access to the USB device (see README), then replug the probe.
- macOS: usually works out of the box; check System Settings > Privacy & Security if the probe is blocked.
Connect fails
- Check the wiring: SWDIO/SWCLK (and nRST when using
under_reset). - Lower the speed:
connect { "speed_khz": 100 }. - Try
under_reset: truefor locked targets. - JTAG fails with
ConnectFailedon targets that do not expose a JTAG TAP; use SWD instead.
Register name errors
Names are case-insensitive and role-aware (pc, sp, fp, lr, ra,
psr, xpsr, msp, psp, fpsr, r0-r15). Other names must match the
architecture register file; use list_core_registers to see what is
available.
Flash tools return DestructiveDisabled
Start the server with --allow-destructive.
Flash algorithm fails to load
- The target YAML must define a RAM region large enough for the algorithm, the header and the stack.
load_addressmust leave room for the 4-byte algorithm header, e.g.0x20000020for a RAM region starting at0x20000000.pc_init,pc_uninit,pc_erase_sector,pc_program_pageandpc_erase_allin the YAML are offsets from the code start address.
File formats and scripts
binfiles have no address information: always passaddress(or the scriptloadbinaddress).axffiles are ELF containers: use formataxforauto; they are parsed with the ELF loader.hexfiles are standard Intel HEX (type 00/04/01); invalid checksums or records returnFileError.- A valid ELF/AXF must contain loadable sections; an ELF with no sections
fails with
FileError(“no loadable segments”). - Scripts stop at the first failing command; check the per-command
statusandoutputin the result.
AI client does not show the tools
- Restart the client after adding the server.
- For Codex,
codex mcp listmust show the server as enabled; the desktop app loads it when a new session starts. - Verify the binary path in the client configuration is correct and executable.
RTT / Event Recorder
RTT attach failed: control block not found— the target firmware must initialize SEGGER RTT (SEGGER_RTT_Init()) and the host must attach after that, not while the core is halted beforemain. Pass--elf(the_SEGGER_RTTsymbol) or--address, and run the monitor fromreplafterreset runso the core is actually executing.evrrequires an address — the firmware must include the CMSIS-View Event Recorder component (symbolEventRecorderInfo). Pass--elfor--address, and initialize the recorder withEventRecorderInitializebefore attaching.- One-shot commands read stale values — every one-shot invocation opens a
new session and probe-rs attaches with the core halted. Use
replwithconnect+reset run, thenwatch run/rtt monitor/evr monitor. - EVR timestamps look scaled — seconds are derived from the firmware’s
ts_freq(EVENT_TIMESTAMP_FREQ); set it to the actual timestamp clock (e.g.SystemCoreClock) for accurate wall time. Ticks themselves are always monotonic.