openocd

Flash firmware and control debugging on embedded devices using OpenOCD.

551|66|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/zhinkgit/embeddedskills --skill openocd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openocd
Source: https://github.com/zhinkgit/embeddedskills/tree/main/openocd
Command: npx skills add https://github.com/zhinkgit/embeddedskills --skill openocd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Embedded developers must manually run OpenOCD commands for probe detection, firmware flashing, flash erasing, target resets, GDB server startup, and telnet debugging, which interrupts the AI‑driven development flow. This skill automates those interactions so AI can directly control the hardware.

Core Features & Use Cases

  • Probe & Connectivity: Detect probe and target connection status.
  • Flash Firmware: Program ELF, HEX or BIN files with optional address specification.
  • Erase Flash: Automatic or explicit mass/sector erase modes.
  • Reset Control: Halt, run, or init reset sequences.
  • GDB Server: Launch and interact with arm-none-eabi-gdb for source‑level debugging.
  • Telnet Debugging: Halt, resume, step, read/write registers and memory, set hardware breakpoints, run‑to address.
  • Semihosting & ITM: Capture printf output and SWO/ITM traces.
  • Configuration Management: Uses skill/config.json and project .embeddedskills/config.json for environment and project settings.

Quick Start

Use the openocd skill to flash the ELF file 'build/app.elf' to the device via the ST‑Link interface.

Frequently Asked Questions about openocd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate flashing firmware to an STM32 using OpenOCD?

You can automate flashing firmware to an STM32 by using an AI skill that directly controls OpenOCD to program ELF, HEX, or BIN files. This eliminates manual command execution and requires the OpenOCD executable and appropriate interface configuration files.

What do I need to start source-level debugging with arm-none-eabi-gdb and OpenOCD?

To start source-level debugging, you need the OpenOCD executable, target configuration files, and optionally arm-none-eabi-gdb. The AI skill launches the GDB server automatically, allowing you to interact directly for debugging embedded devices.

Can I capture semihosting printf output and SWO traces during embedded debugging?

Yes, you can capture semihosting printf output and SWO/ITM traces during embedded debugging. The AI skill automates these OpenOCD interactions, allowing you to retrieve trace data without manually running telnet commands.

How does AI control probe detection and flash erasing for MCUs?

AI controls probe detection and flash erasing by automating OpenOCD commands for connectivity checks and mass or sector erases. This allows direct hardware manipulation within an AI-driven development workflow without manual terminal input.

Does the OpenOCD skill support hardware breakpoints and register access via telnet?

Yes, the OpenOCD skill supports telnet-based debugging to set hardware breakpoints, run-to addresses, and read or write registers and memory. It automates these interactions to maintain seamless AI control over the target MCU.