/debug-trace:debug-embedded <attach|halt|fault-analyze|trace> [options]from debug-trace
Attaches a debugger, halts and inspects target state, decodes fault registers, or configures ITM/SWO/ETM trace for embedded systems.
Ships in debug-trace. Installing the plugin adds it to Claude Code.
Embedded debug command: fault analysis, GDB sessions, trace setup, stack inspection.
/debug-embedded <action> [options]
attachGenerate OpenOCD or J-Link connection commands.
/debug-embedded attach --probe stlink --target stm32f4x
/debug-embedded attach --probe jlink --device STM32F407VG --speed 4000
/debug-embedded attach --probe pyocd --target stm32f407
haltStop the target and inspect state.
/debug-embedded halt --dump-registers
/debug-embedded halt --dump-stack --depth 32
fault-analyzeDecode fault registers from a running or halted target.
/debug-embedded fault-analyze --cfsr 0x00020000
/debug-embedded fault-analyze --cfsr 0x00008200 --bfar 0x00000004
/debug-embedded fault-analyze --hfsr 0x40000000
Outputs: fault type in plain English, common causes, suggested fix, addr2line command.
traceConfigure ITM/SWO or ETM trace.
/debug-embedded trace --itm-printf --cpu-freq 168000000 --swo-freq 2000000
/debug-embedded trace --dwt-cycles --instrument my_function
/debug-embedded trace --watchpoint --addr 0x20001234 --type write
CFSR = 0x00020000
UFSR[17] = INVSTATE = 1
Meaning: CPU tried to execute an instruction in ARM state (Thumb bit = 0 in xPSR).
Common cause: function pointer missing Thumb bit (should be addr | 1).
Fix: ensure function pointers are loaded from elf/symbol table, not cast from integer.
arm-none-eabi-gdb -ex "target remote :3333" \
-ex "monitor reset halt" \
-ex "load" \
-ex "break HardFault_HandlerC" \
-ex "continue" \
firmware.elf
arm-none-eabi-addr2line -e firmware.elf -f -i 0x08003A24
# → sensor_init at src/sensor.c:142
# Flash and run
pyocd flash -t stm32f407 firmware.elf
# GDB server on port 3333
pyocd gdb -t stm32f407
# Commander (interactive)
pyocd commander -t stm32f407
>> halt
>> reg
>> read32 0xE000ED28 # CFSR
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub ormus-solutions/libreembed-claude-code --plugin debug-traceOther plugins' commands for the same job