Build, flash, and verify debug instrumentation on embedded hardware. Supports multiple probes via MCU auto-selection.
Build firmware, flash to hardware, run briefly, then read debug variables from memory to verify they are being updated correctly.
Arguments: $ARGUMENTS
stm32f4_os). Required.stm32f407vg, stm32h750xx). Optional — auto-resolved.Prefer MCP tools over CLI commands. They provide structured JSON and automatic halt→read→resume.
Pre-flight — use MCP cleanup_processes and probe_list.
Build — use MCP build_target with the target name.
build_target auto-fallbacks from release to debug on failure.modefallback_fromDetermine MCU — if not specified, read the target's xmake.lua for set_values("embedded.mcu", ...).
Find binary and ELF — locate outputs dynamically:
find build/$0 -name "$0.bin" -type f
find build/$0 -name "$0" -not -name "*.bin" -not -name "*.hex" -type f
Discover debug symbols — use MCP resolve_symbol with common patterns:
resolve_symbol(elf, "dbg::*")
Use project-specific debug symbol prefixes (e.g., umi::dbg::*, app::dbg::*).
If no symbols found, search the ELF:
arm-none-eabi-nm --demangle <elf> | grep -i 'dbg\|debug\|counter\|hist'
Flash — use MCP flash with binary path and MCU.
Read debug counters — use MCP read_symbol / read_symbols with discovered symbols:
read_symbols_series(elf, symbols_csv, repeat, interval_ms, mcu, halt=false)Report pass/fail: