Skip to content

Interactive OpenOCD workflow for probing, flashing, erasing, resetting, GDB Server, Telnet debugging, and Semihosting capture.

CCM score
58 of 100
skills.sh installs
785
GitHub stars
815
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers probe, flash, erase, reset, and read-only target queries, with board or interface plus target configs resolved from the workspace
  • Includes GDB Server startup, one-shot GDB commands (backtrace, locals, break, step, watch), and Telnet halt, resume, step, register, and memory access
  • Provides hardware breakpoints (bp, rbp, run-to) and ITM/SWO capture through TPIU parameters in .embeddedskills/config.json
  • Designed for embedded developers using ST-Link, CMSIS-DAP, DAPLink, or FTDI probes with the Python scripts and a configured openocd executable

Install

$ npx -y skills add zhinkgit/embeddedskills --skill openocd -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

OpenOCD 下载与调试

本 skill 提供 OpenOCD 的探针探测、固件烧录、Flash 擦除、GDB Server 启动、目标复位、 Telnet 在线调试、GDB 源码级调试和 Semihosting 输出捕获能力。

运行依赖

Windows 或 Linux,Python 3.10+、OpenOCD、目标和适配器配置。源码调试需要对应的 GDB。

配置

环境级配置(skill/config.json)

skill 目录下的 config.json(可按需从 config.example.json 复制创建)包含环境级配置(工具路径、端口号等),工具未加入 PATH 时可在此配置 exe:

{
  "exe": "openocd",
  "scripts_dir": "",
  "gdb_port": 3333,
  "telnet_port": 4444,
  "gdb_exe": "",
  "operation_mode": 1
}
  • exe:openocd.exe 路径或命令名(必填)
  • scripts_dir:OpenOCD 配置脚本目录,为空时使用 OpenOCD 内置路径
  • gdb_port:GDB Server 端口,默认 3333
  • telnet_port:Telnet 端口,默认 4444
  • gdb_exe:arm-none-eabi-gdb 路径,GDB 调试子命令(run/backtrace/locals)需要
  • operation_mode:1 直接执行 / 2 输出风险摘要但不阻塞 / 3 执行前确认

工程级配置(.embeddedskills/config.json)

board/interface/target 等工程参数统一在工作区的 .embeddedskills/config.json 中管理:

{
  "openocd": {
    "board": "",
    "interface": "interface/stlink.cfg",
    "target": "target/stm32f4x.cfg",
    "adapter_speed": "4000",
    "transport": "swd",
    "tpiu_name": "stm32f4x.tpiu",
    "traceclk": "168000000",
    "pin_freq": "2000000"
  }
}

Details

Repository
github.com/zhinkgit/embeddedskills
Categories
Debugging, CLI & Terminal
First seen
Jun 3, 2026

Questions

What does the openocd skill do?

The openocd skill lets an AI agent drive OpenOCD for probing targets, flashing firmware, erasing Flash, starting a GDB Server, and resetting the target chip. It also covers Telnet online debugging with halt, resume, step, register, memory and breakpoint commands, plus Semihosting and ITM output capture.

How do I install the openocd skill?

Run npx -y skills add zhinkgit/embeddedskills --skill openocd -y in your project to install the openocd skill. Once installed, the openocd skill lets the agent flash, debug and inspect a connected embedded board through OpenOCD.

Which debug probes and firmware formats does the openocd skill support?

The openocd skill is triggered by mentions of ST-Link, CMSIS-DAP, DAPLink and FTDI debug adapters and is intended for projects that use OpenOCD. It flashes .elf, .hex and .bin firmware, and the openocd skill requires a .bin file to come with a flash address.

What does the openocd skill need before it runs?

The openocd skill needs Windows or Linux, Python 3.10 or newer, and an installed OpenOCD with board, interface and target configuration. Source-level debugging with the openocd skill also needs a matching GDB such as arm-none-eabi-gdb.

Where does the openocd skill sit in the Debugging category?

The openocd skill is in the Debugging category, alongside diagnosing-bugs, azure-messaging, safe-debug, systematic-debugging and sentry-cli. The openocd skill stands apart by controlling an OpenOCD-supported hardware probe directly on the board, with Telnet, GDB Server and Semihosting commands.

More from zhinkgit/embeddedskills

All 9

Similar to Openocd

More Debugging