embedded-debugger
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "embedded-debugger" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-236ad26b0a8b8cfaa2f442ac30beccdadee3313dfcca0690ad4368e37257a114. Verify the upstream source and version against https://github.com/Adancurusul/embedded-debugger-mcp before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Workflow for embedded hardware debugging of probe-rs targets using embedded-debugger-mcp. Applicable when Codex or Claude Code needs to check debug probes, validate embedded debugger setup, start an MCP server, guide users through ARM Cortex-M or RISC-V flash/debug/RTT workflows, or operate via CLI prompts when the MCP client is not installed.
Introduction source: third_party · Adancurusul · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Embedded hardware debugging workflow for probe-rs targets using embedded-debugger-mcp. Use when Codex or Claude Code needs to inspect debug probes, validate embedded debugger setup, start the MCP server, guide a user through ARM Cortex-M/RISC-V flashing/debugging/RTT workflows, or operate without installing an MCP client by using the CLI plus prompts.
- Testing
- Not tested
Browse files
Frontmatter
name: embedded-debugger
description: Embedded hardware debugging workflow for probe-rs targets using embedded-debugger-mcp. Use when Codex or Claude Code needs to inspect debug probes, validate embedded debugger setup, start the MCP server, guide a user through ARM Cortex-M/RISC-V flashing/debugging/RTT workflows, or operate without installing an MCP client by using the CLI plus prompts.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
- If the user has an MCP client configured, start or verify the server:
embedded-debugger-mcp serve - If the user wants no MCP install, use CLI-first mode:
embedded-debugger-mcp doctor,embedded-debugger-mcp probes list, andembedded-debugger-mcp skill print-prompt. - 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-runningopenocdover its GDB port viaopenocd_address(default127.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_faultandunwind_exceptionare 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".
- Start openocd with
The AI uses the same tools regardless of backend; only connect differs.
MCP Workflow
Use MCP tools for session-based operations:
list_probesconnect(addbackend: "openocd"andopenocd_addressto use OpenOCD)- Read-only checks such as
probe_info,get_status, andread_memory - 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 callunwind_exceptionwithelf_pathto map the crash to a source line (full DWARF backtrace on probe-rs; faulting PC/LR on OpenOCD). - Mutating operations only after the user confirms target, file path, and risk:
write_memory,flash_erase,flash_program,run_firmware(probe-rs) - RTT operations after firmware is running:
rtt_attach,rtt_channels,rtt_read,rtt_write,rtt_detach(probe-rs) disconnect
Fetch authoritative info yourself
You are a capable model: prefer fetching ground truth over relying on memorized or hardcoded chip data. This skill points you to sources; it does not embed register tables. In order of authority:
- The target itself (runtime, most authoritative for this exact chip):
registers are self-described by the GDB target description; memory is read
with
read_memory; core identity from CPUID / the connected target. - The firmware ELF (what is actually running): symbols and source lines come
from DWARF — use
unwind_exception(pasself_path) to map addresses tofile:line. - The chip datasheet / reference manual (external, per-chip): for a peripheral
or fault register, find the peripheral's base in the memory-map chapter, add
the register offset, then
read_memory. Search the vendor document for the exact value; do not guess addresses from memory. CMSIS-SVD files are a machine-readable source for register maps. - ARM Cortex-M architecture registers (SCB fault regs, CPUID) are fixed by the
ARM architecture and identical across vendors —
diagnose_faultreads them. They do not exist on non-Cortex-M targets (e.g. Xtensa ESP32).
Do not hardcode or invent register/peripheral addresses. If a value is not recoverable from the target, the ELF, or a cited datasheet, say so.
Know your versions
Behavior and target support depend on tool versions — check them before concluding something is unsupported or broken:
- probe-rs version determines which chips and architectures are supported
(e.g. Xtensa support is comparatively new). Check
embedded-debugger-mcp doctor. - OpenOCD version and fork matter: the Espressif fork (openocd-esp32) is needed
for Xtensa ESP32, and some targets need flags like
gdb_memory_map disable. Checkopenocd --version. - Probe firmware (ST-Link / J-Link) can affect connectivity;
probes listreports the connected probe.
Safety Rules
- Treat flash erase, flash program, memory write, reset, run, and RTT write as mutating hardware operations.
- Prefer read-only discovery before mutation.
- Respect project configuration limits for file paths, file sizes, memory ranges, and flash erase permissions.
- Do not claim hardware success from command text alone; cite the command or MCP tool result that produced the evidence.
Prompt Reference
For a reusable CLI+Skill prompt, read
references/default-prompt.md.
Version history
-
v0.3.0
GitHub ↗
Original release notes
Dual debug backend and AI-facing crash diagnosis. ### Added - **Dual backend** behind a single `DebugBackend` trait, selected at `connect`: - `probe-rs` (default) — native probe-rs; full flash and RTT support. - `openocd` (experimental) — talks to an already-running `openocd` over the GDB Remote Serial Protocol (`openocd_address`, default `127.0.0.1:3333`). The AI uses the same tool set for both; only `connect` differs. - `diagnose_fault` — reads the Cortex-M SCB fault registers (CFSR/HFSR/MMFAR/BFAR/SHCSR/CPUID) plus PC/SP/LR in one call and returns a compact structured evidence bundle with the set fault bits. Reports raw evidence; it does not assert a root cause. - `unwind_exception` — maps a crash to source lines. On the probe-rs backend it returns a full DWARF backtrace via probe-rs's own unwinder; on the OpenOCD backend it reads the Cortex-M exception stack frame and maps the faulting PC/caller LR. Requires an `elf_path` built with debug info. - 24 MCP tools total (added `diagnose_fault`, `unwind_exception`). ### Validated on real hardware - OpenOCD backend verified end-to-end on a real **ESP32-S3** (openocd-esp32): connect, memory read/write, halt/run/step/reset, and register reads (PC/SP/LR) are correct. ### Notes / limitations - OpenOCD register reads use `monitor reg <name>` (openocd resolves names per architecture), so PC/SP/LR work across ARM/Xtensa/RISC-V. Start openocd with `gdb_memory_map disable` or it may reject the GDB connection. - `diagnose_fault` and `unwind_exception` are Cortex-M specific and do not apply to Xtensa (ESP32) targets. Their probe-rs paths delegate to probe-rs's tested DWARF/register code; they are unit-tested but not yet exercised on a physical Cortex-M crash.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的嵌入式硬件调试工作流,支持 ARM Cortex-M 和 RISC-V 架构
- 集成 probe-rs 和 OpenOCD 双后端,覆盖烧录、调试、RTT、故障诊断等核心功能
- 面向开发者高频刚需场景,实用价值高
Highlights
- 触发描述精准完整,覆盖 MCP 模式与 CLI 模式多种使用场景
- 边界清晰,明确指出适用 Codex/Claude Code 等 AI 助手的调试需求
Areas to improve
-
缺少 When to Use 显式章节和端到端完整示例 Reported severity: Minor
文档结构良好但缺少显式的 When to Use 章节和完整的端到端操作示例
Recommendation: 建议补充 When to Use 章节和至少一个完整的从连接探针到调试的端到端示例
Highlights
- 文档结构清晰,分模块描述 CLI 和 MCP 工作流
- 包含安全规则和版本检查建议,提升执行规范性
Highlights
- 工具来源明确,参数说明详细,覆盖主要异常场景
- 对不可逆操作(如 flash erase/program)强调用户确认,安全性高
- 提供版本检查建议,避免因工具版本导致执行失败
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.