
Openocd
This is a comprehensive OpenOCD wrapper that handles the full embedded debugging workflow: probe detection, firmware flashing, Flash erase, GDB server management, and live Telnet debugging with halt/resume/step/breakpoint control. It bridges OpenOCD's command line interface with structured JSON output and maintains project-level config in `.embeddedskills/config.json` for board/interface/target settings. The implementation covers both one-shot operations and persistent GDB sessions, plus semihosting and ITM trace capture for printf debugging. Ships with five Python scripts using stdlib only, so no dependency hell. If you're doing ARM Cortex development with ST-Link, CMSIS-DAP, or FTDI probes and want OpenOCD accessible without memorizing flags, this handles the orchestration. The risk-aware operation modes are a nice touch for destructive commands.
- skills.sh installs
- 707
- GitHub stars
- 791
- last updated
- Aug 21, 2026
Install
$ npx -y skills add zhinkgit/embeddedskills --skill openocd --agent claude-codeInstalls into .claude/skills of the current project.
Files
OpenOCD 下载与调试
本 skill 提供 OpenOCD 的探针探测、固件烧录、Flash 擦除、GDB Server 启动、目标复位、 Telnet 在线调试、GDB 源码级调试和 Semihosting 输出捕获能力。
配置
环境级配置(skill/config.json)
skill 目录下的 config.json 包含环境级配置(工具路径、端口号等),首次使用前确认 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 端口,默认 3333telnet_port:Telnet 端口,默认 4444gdb_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"
}
}
Sponsors
Details
- Repository
- github.com/zhinkgit/embeddedskills
- Category
- Backend & APIs
- First seen
- Jun 3, 2026