embedded-debugger

A hardware-debugging guide for ARM Cortex-M and RISC-V devices, using a debug probe to communicate with the chip.

In plain words
What is it for?
Finding probes, checking configuration, starting the debugger, programming devices, and viewing real-time trace output through probe-rs or OpenOCD.
Why use it?
It helps verify the debugger setup and connected hardware before flashing firmware or inspecting a running device.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/adancurusul/embedded-debugger-mcp/embedded-debugger
Any agent
npx skills add Adancurusul/embedded-debugger-mcp --skill embedded-debugger
Clone the repo
git clone --depth 1 https://github.com/Adancurusul/embedded-debugger-mcp

Made for: Claude Code, Codex.

Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,415 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00075 $0.01415
Opus 5 $0.00037 $0.00707
Sonnet 5 $0.00015 $0.00283
Haiku 4.5 $0.00007 $0.00142

Measured 2d ago against content hash 1cce4fb05f8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

embedded-debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/embedded-debugger/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Embedded Debugger

Use the local embedded-debugger-mcp binary as the source of truth. Prefer CLI checks first, then MCP tools when an MCP client is available.

Entry Decision

  1. If the user has an MCP client configured, start or verify the server: embedded-debugger-mcp serve
  2. If the user wants no MCP install, use CLI-first mode: embedded-debugger-mcp doctor, embedded-debugger-mcp probes list, and embedded-debugger-mcp skill print-prompt.
  3. If hardware access is required, confirm the probe and target are connected before destructive actions such as flash erase or program.

CLI Workflow

Run these in order and report the exact outcome:

embedded-debugger-mcp doctor
embedded-debugger-mcp probes list
embedded-debugger-mcp config show

Use JSON for automation:

embedded-debugger-mcp doctor --json
embedded-debugger-mcp probes list --json

Backends

One tool set runs over two interchangeable engines, chosen at connect:

  • backend: "probe-rs" (default) — native probe-rs; supports flash and RTT.
  • backend: "openocd" (experimental) — talks to an already-running openocd over its GDB port via openocd_address (default 127.0.0.1:3333). Use for chips probe-rs does not cover well (e.g. Xtensa ESP32 via openocd-esp32). Memory access and halt/run/step/reset are validated on real ESP32-S3; flash and RTT are not available on this backend. Register reads currently use ARM gdb register numbers, so PC/SP are wrong on Xtensa (known limitation). diagnose_fault and unwind_exception are Cortex-M specific and do not apply to Xtensa targets.
    • Start openocd with gdb_memory_map disable, otherwise it probes flash on the GDB connect, fails, and REJECTS the connection. Example: openocd -f board/esp32s3-builtin.cfg -c "gdb_memory_map disable".

The AI uses the same tools regardless of backend; only connect differs.

MCP Workflow

Use MCP tools for session-based operations:

  1. list_probes
  2. connect (add backend: "openocd" and openocd_address to use OpenOCD)
  3. Read-only checks such as probe_info, get_status, and read_memory
  4. On a crash or halt, call diagnose_fault: it reads the Cortex-M SCB fault registers (CFSR/HFSR/MMFAR/BFAR/SHCSR/CPUID) plus PC/SP/LR and returns a compact structured evidence bundle in one call. Halt the target first for meaningful values; reason over the set fault bits yourself. Then call unwind_exception with elf_path to map the crash to a source line (full DWARF backtrace on probe-rs; faulting PC/LR on OpenOCD).
  5. Mutating operations only after the user confirms target, file path, and risk: write_memory, flash_erase, flash_program, run_firmware (probe-rs)
  6. RTT operations after firmware is running: rtt_attach, rtt_channels, rtt_read, rtt_write, rtt_detach (probe-rs)
  7. disconnect

Read the full file on GitHub · 127 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 127 lines · 75 tokens per session scan A 1cce4fb05f8a

Subscribe to this mod's changes

embedded-debugger is a skill published in the GitHub repository Adancurusul/embedded-debugger-mcp (171 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 1,415 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.