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-code

Installs 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 端口,默认 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"
  }
}

Sponsors

Details

Repository
github.com/zhinkgit/embeddedskills
Category
Backend & APIs
First seen
Jun 3, 2026

More from zhinkgit/embeddedskills

All 9
1dotnet avatarmcp-csharp-testdotnet/skillsTest C# MCP servers at multiple levels: unit tests for individual tools and integration tests using the MCP client SDK. USE FOR: unit testing MCP tool methods, 706skills.sh installs
2patternsdev avatarview-transitionspatternsdev/skillsTeaches the View Transitions API for animating DOM changes. Use when you want smooth animated transitions between pages or UI states without manual animation co699skills.sh installs
3mukul975 avataranalyzing-android-malware-with-apktoolmukul975/anthropic-cybersecurity-skillsPerform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, 697skills.sh installs
4aliyun avataralibabacloud-ecs-diagnosealiyun/alibabacloud-aiops-skillsComprehensive Alibaba Cloud ECS instance diagnostics skill. Performs systematic troubleshooting including cloud platform status checks and GuestOS internal diag695skills.sh installs
5AgriciDaniel avatarads-pinterestAgriciDaniel/claude-adsAudit Pinterest Ads measurement, Pinterest Tag and Conversions API, catalog and shopping readiness, visual creative, audiences, Performance+ intent, budgets, br689skills.sh installs
6mindrally avatarnetlify-developmentmindrally/skillsNetlify development best practices for serverless functions, edge functions, Blobs storage, build configuration, and deployment workflows.688skills.sh installs