mcu-debug-probe

Control SWD/JTAG debug probes to flash, reset, and inspect ARM Cortex-M targets via pyOCD.

12|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/0xchaihu/mcu-debug-probe --skill mcu-debug-probe-0xchaihu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcu-debug-probe
Source: https://github.com/0xchaihu/mcu-debug-probe
Command: npx skills add https://github.com/0xchaihu/mcu-debug-probe --skill mcu-debug-probe-0xchaihu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyocd, pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve? Debugging embedded ARM Cortex-M firmware normally requires opening a full IDE, but terminal-based AI agents and headless workflows need a scriptable way to enumerate debug probes, flash firmware, reset chips, halt execution, and read registers or memory over SWD/JTAG. ## Core Features & Use Cases - Probe Discovery and Inspection: Enumerate connected CMSIS-DAP and J-Link probes, report their capabilities, and attach to a specific probe by UID. - Live Debug Operations: Halt, resume, single-step, set breakpoints, read core registers, decode fault registers (CFSR/HFSR/DFSR), dump stack and vector tables, and read or write RAM and peripheral memory. - Flashing and Persistent Sessions: Flash ELF/AXF/BIN images, erase flash, reset targets, and keep a persistent pyOCD session open across multi-step debug flows so breakpoints and halt state survive. - Target Name Resolution: Map project chip names (e.g., LPC55S69JBD100) to pyOCD targets via pyocd-targets.yaml, a local browser wizard, or automatic CMSIS-Pack installation. - Use Case: During board bring-up, ask the agent to enumerate probes, attach to the target, halt the core, and dump the fault registers to diagnose a HardFault without launching an IDE. ## Quick Start Ask the agent to list connected debug probes and show the status of the attached Cortex-M target using the mcu-debug-probe skill.

Frequently Asked Questions about mcu-debug-probe

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I flash firmware to an ARM Cortex-M target from the command line?▼

Run the pyocd_probe.py flash command with the probe UID and image path, for example flash --uid <probe-id> --image build/app.elf --yes. ELF, AXF, and GCC-style .out files are handled automatically, while raw .bin files need a --base-address.

How do I read Cortex-M registers and fault status during debugging?▼

Use the regs command with --halt-on-connect to read pc, sp, lr, and xpsr, and the fault command to decode CFSR, HFSR, DFSR, and related SCB registers. Halting first is recommended because many targets only expose meaningful core registers while halted.

Which debug probes does pyOCD support for SWD and JTAG?▼

pyOCD works with CMSIS-DAPv1 probes over HID, CMSIS-DAPv2 probes that require a working libusb runtime, and J-Link probes that need a Segger J-Link installation. The probe-capabilities command reports how each connected probe is detected.

Why does pyOCD report no probe or fail to connect to the target?▼

Common causes are missing USB permissions or udev rules on Linux, another debugger already owning the probe, unpowered boards, or incorrect SWD wiring. Retry with an explicit --uid, or use --connect-mode under-reset if the target locks up immediately after boot.

What if my chip name does not match a pyOCD target name?▼

Create a pyocd-targets.yaml file mapping your chip model to a pyOCD target, pass --chip-name to generate it, or let the local browser wizard resolve it. If the target is missing locally, the helper attempts CMSIS-Pack auto-install with fuzzy family matching.

When should I use persistent debug sessions instead of one-shot commands?▼

Use debug-open plus debug-* commands when breakpoints or halted state must survive across multiple steps, since one-shot commands open and close a pyOCD session per call. One-shot commands remain suitable for probe discovery, flashing, or single inspections.