Debug Jlink logo

Debug Jlink

Community
LeoKemp223
debug-jlink

当需要通过 J-Link GDB Server 启动或附着 GDB 会话,完成固件下载、在线调试或崩溃现场检查时使用。

Overview

PublisherLeoKemp223
Repositoryembed-ai-tool
Skill namedebug-jlink
Stars
995
Forks
168
Bundled files
3
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.

  • 3 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 Jlink 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-jlink
  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-jlink .claude/skills/debug-jlink
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Debug Jlink 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 Jlink 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 Jlink 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.

J-Link GDB 调试

适用场景

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

必要输入

  • 一份带符号的 ELF,或包含 artifact_path 的 Project Profile。
  • --device 参数指定目标芯片型号(J-Link GDB Server 要求必须指定)。
  • 可选调试模式:download-and-halt、attach-only、crash-context。
  • 可选的 GDB 可执行文件路径。

自动探测

  • 默认模式为 download-and-halt;只有用户显式要求附着调试或崩溃现场检查时才切换。
  • GDB 由脚本自动探测,优先级为:显式用户输入、Project Profile、arm-none-eabi-gdb、gdb-multiarch。
  • JLinkGDBServer 按配置文件、PATH、常见安装路径顺序查找。
  • 做符号级调试必须有 ELF。若只有 HEX 或 BIN,应阻塞并要求提供匹配 ELF。

执行步骤

  1. 先阅读 references/usage.md,确认本次是环境探测,还是执行调试会话。
  2. 若不确定环境是否就绪,先运行自带脚本 scripts/jlink_debugger.py 的 --detect 模式确认。
  3. 根据用户意图选择调试模式:download-and-halt(默认)、attach-only 或 crash-context。
  4. 使用 --elf + --device 启动调试,可选 --interface 和 --port。
  5. 需要 SWO 输出时,使用 --swo 参数。
  6. 读取脚本输出的调试结果,重点关注寄存器状态、回溯帧和 Fault 寄存器。

失败分流

  • 当缺少 JLinkGDBServerCLExe 或兼容 GDB 时,返回 environment-missing。
  • 当没有可用的 ELF 时,返回 artifact-missing。
  • 当 JLinkGDBServer 无法连接目标板时,返回 connection-failure。
  • 当设备名不被 J-Link 识别或配置不一致时,返回 project-config-error。
  • 当会话可以建立,但无法停核、加载或得到可信回溯时,返回 target-response-abnormal。
  • 当 --device 缺失且无法从工作区推断时,返回 ambiguous-context。

平台说明

  • JLinkGDBServer 在 Linux/macOS 下为 JLinkGDBServerCLExe,Windows 下为 JLinkGDBServerCL.exe。
  • 默认 GDB 端口为 2331(J-Link 默认),可通过 --port 修改。
  • 自带脚本使用 Python 标准库和 subprocess,跨平台兼容。
  • SWO 功能为 J-Link 独有,可捕获 ITM printf 输出。

输出约定

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

交接关系

  • 当目标恢复运行后,需要继续观察运行期日志时,将成功会话交给 serial-monitor。
  • 当用户需要 RTOS 线程感知调试时,将会话交给 rtos-debug。

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 Jlink AI skill do?

当需要通过 J-Link GDB Server 启动或附着 GDB 会话,完成固件下载、在线调试或崩溃现场检查时使用。

Why use Debug Jlink on TypingMind?

Because you install it once and use it with any model. Debug Jlink 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 Jlink in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LeoKemp223/embed-ai-tool/tree/master/skills/debug-jlink. 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 Jlink?

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 Jlink?

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

Is the Debug Jlink 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 👇