MCPInstall

debug-platformio

当需要通过 PlatformIO 内置调试功能对目标板进行 GDB 调试时使用,支持下载暂停、附加和崩溃现场分析。

Installs
562
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/leokemp223/embed-ai-tool --skill debug-platformio
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads debug-platformio automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

PlatformIO 调试

适用场景

  • Project Profile 中标明 build_system: platformio 或工作区中存在 platformio.ini。
  • 用户需要对目标板进行在线调试(单步、断点、查看寄存器和变量)。
  • 需要分析崩溃现场(HardFault 寄存器、调用栈)。

必要输入

  • PlatformIO 工程目录(包含 platformio.ini)。
  • 可选的环境名称和调试模式。

自动探测

  • 自动定位 pio CLI。
  • 解析 platformio.ini 中的 debug_tool 配置。
  • PlatformIO 自动管理调试服务器(OpenOCD/pyOCD/J-Link GDB Server),无需手动配置。

执行步骤

  1. 先阅读 references/usage.md,确认本次操作。
  2. 探测调试环境:
    python scripts/pio_debugger.py --detect --project-dir <工程目录> --env <环境名>
    
  3. 执行调试:
    python scripts/pio_debugger.py --project-dir <工程目录> --env <环境名> --mode download-and-halt
    

调试模式

  • download-and-halt:下载固件到目标板,暂停在入口点,输出寄存器和回溯信息。
  • attach-only:附加到正在运行的目标,不下载固件,输出当前状态。
  • crash-context:暂停目标,读取寄存器、完整回溯和 Cortex-M Fault 寄存器(CFSR/HFSR/MMFAR/BFAR)。

失败分流

  • connection-failure:调试器未连接或设备无响应。
  • debug-not-supported:板卡不支持调试或未配置 debug_tool。
  • debug-failure:调试会话异常终止。

输出约定

示例输出格式:

调试完成 ✅
  工程: ESP32_DEV → 环境: esp32dev
  板卡: esp32dev | 调试工具: esp-prog
  模式: download-and-halt
  关键观察: 5 条(寄存器、回溯帧)

交接关系

  • 从 build-platformio 接收编译成功的工程信息。
  • 调试发现问题后可回交给 build-platformio 修改代码重新编译。

FAQ

What does the debug-platformio skill do?

当需要通过 PlatformIO 内置调试功能对目标板进行 GDB 调试时使用,支持下载暂停、附加和崩溃现场分析。

How do I install debug-platformio?

Run npx skills add https://github.com/leokemp223/embed-ai-tool --skill debug-platformio in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/debug-platformio/ (personal) or .claude/skills/debug-platformio/ (project).

Which AI agents can use debug-platformio?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is debug-platformio safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains debug-platformio?

It is published by leokemp223 in leokemp223/embed-ai-tool. It has 562 recorded installs.

More from leokemp223/embed-ai-tool

View all →

serial-monitor

leokemp223/embed-ai-tool

当需要识别正确串口、调用自带脚本抓取日志,并分析嵌入式固件运行状态时使用。

585 installs

build-keil

leokemp223/embed-ai-tool

当需要通过 Keil MDK 命令行编译嵌入式工程,调用自带脚本解析工程文件、执行构建并定位固件产物时使用。

572 installs

build-platformio

leokemp223/embed-ai-tool

当需要通过 PlatformIO 命令行编译嵌入式工程,调用自带脚本解析环境配置、执行构建并定位固件产物时使用。

568 installs

workflow

leokemp223/embed-ai-tool

当需要串联多个 skill 完成编译+烧录+监控或编译+烧录+调试等流水线任务时使用。

flash-keil

leokemp223/embed-ai-tool

当需要通过 Keil MDK 内置调试器烧录固件到目标板时使用,利用工程中已配置的调试器和 Flash 算法执行下载。

566 installs

build-cmake

leokemp223/embed-ai-tool

当需要配置或构建基于 CMake 的嵌入式固件工程,调用自带脚本执行构建并定位固件产物时使用。

564 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.