Debug Gdb Openocd logo

Debug Gdb Openocd

Community
LeoKemp223
debug-gdb-openocd

当需要通过 OpenOCD 启动或附着 GDB 会话,调用自带脚本完成固件下载、在线调试或崩溃现场检查时使用。

Overview

PublisherLeoKemp223
Repositoryembed-ai-tool
Skill namedebug-gdb-openocd
Stars
995
Forks
168
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by LeoKemp223 on GitHub. Read the source before you install it.

Installation

Install the Debug Gdb Openocd AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/LeoKemp223/embed-ai-tool/tree/master/skills/debug-gdb-openocd
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LeoKemp223/embed-ai-tool.git /tmp/embed-ai-tool
mkdir -p .claude/skills
cp -r /tmp/embed-ai-tool/skills/debug-gdb-openocd .claude/skills/debug-gdb-openocd
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Debug Gdb Openocd in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Debug Gdb Openocd on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Debug Gdb Openocd is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

GDB OpenOCD 调试

适用场景

  • 用户希望通过 OpenOCD 调试 Cortex-M 类目标。
  • 工作区中已有 ELF 和与 OpenOCD 兼容的探针信息。
  • 烧录或串口监视流程表明,需要进一步查看断点、停核控制、寄存器或回溯信息。
  • 需要在调试前确认 OpenOCD 和 GDB 环境是否就绪。

必要输入

  • 一份带符号的 ELF,或包含 artifact_path 的 Project Profile。
  • OpenOCD 配置信息,或足以安全解析配置的工作区线索。
  • 可选调试模式:download-and-halt、attach-only、crash-context。
  • 可选的 GDB 可执行文件路径。

自动探测

  • 默认模式为 download-and-halt;只有用户显式要求附着调试或崩溃现场检查时才切换。
  • GDB 由脚本自动探测,优先级为:显式用户输入、Project Profile、arm-none-eabi-gdb、gdb-multiarch。
  • 探针由脚本自动探测,优先级与 flash-openocd 保持一致。
  • 做符号级调试必须有 ELF。若只有 HEX 或 BIN,应阻塞并要求提供匹配 ELF。

执行步骤

  1. 先阅读 references/debug-playbook.md 中的决策树,判断应使用条件断点、普通断点还是 OpenOCD Telnet。
  2. 再阅读 references/usage.md,确认本次是环境探测,还是执行调试会话。
  3. 若不确定环境是否就绪,先运行自带脚本 scripts/gdb_debugger.py 的 --detect 模式确认。
  4. 根据用户意图选择调试模式:download-and-halt(默认)、attach-only 或 crash-context。
  5. 使用 --elf 指定符号文件,配合 --interface + --target 或 --config 启动调试。
  6. 读取脚本输出的调试结果,重点关注寄存器状态、回溯帧和 Fault 寄存器(crash-context 模式)。
  7. 将调试配置和关键观察写回 Project Profile,并在需要时交给下游 skill。

失败分流

  • 当缺少 openocd 或兼容 GDB 时,返回 environment-missing。
  • 当没有可用的 ELF 时,返回 artifact-missing。
  • 当 OpenOCD 或 GDB 无法连接目标板时,返回 connection-failure。
  • 当 OpenOCD 配置或符号文件与目标不一致时,返回 project-config-error。
  • 当会话可以建立,但无法停核、加载或得到可信回溯时,返回 target-response-abnormal。
  • 当存在多个同样合理的探针、配置或符号文件时,返回 ambiguous-context。

平台说明

  • 自带脚本使用 Python 标准库和 subprocess 调用 openocd 和 gdb,因此调试调度路径本身是跨平台的。
  • 输出中应将 OpenOCD 与 GDB 命令分开列出,方便用户在其他 shell 或 IDE 中复现。
  • Windows 宿主机可能需要解析 .exe 后缀,但逻辑流程与其他平台一致。

输出约定

  • 输出调试模式、OpenOCD 命令、GDB 可执行文件、ELF 路径和关键观察结论。
  • 在 Project Profile 中保留 artifact_path、artifact_kind、gdb_executable、openocd_config。
  • 当复位后或继续运行后下一步是观察运行行为时,推荐 serial-monitor。

交接关系

  • 当目标恢复运行后,需要继续观察运行期日志时,将成功会话交给 serial-monitor。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Debug Gdb Openocd AI skill do?

当需要通过 OpenOCD 启动或附着 GDB 会话,调用自带脚本完成固件下载、在线调试或崩溃现场检查时使用。

Why use Debug Gdb Openocd on TypingMind?

Because you install it once and use it with any model. Debug Gdb Openocd is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Debug Gdb Openocd in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LeoKemp223/embed-ai-tool/tree/master/skills/debug-gdb-openocd. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Debug Gdb Openocd?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Debug Gdb Openocd?

As many as you like. As long as a model supports skills, you can use Debug Gdb Openocd with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Debug Gdb Openocd AI skill free?

It is published on GitHub by LeoKemp223. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇