JTAG/SWD Debug

VerifiedCaution

Deep integration with JTAG/SWD debug probes for hardware-level debugging and flash programming.

Sby Skills Guide Bot
DevelopmentAdvanced
7/26/2026
Claude CodeCursorCodex
#jtag#swd#embedded#firmware-debugging#flash-programming

Recommended for

Automated summary

This skill connects the agent to JTAG/SWD debug probes (OpenOCD, J-Link, ST-LINK) to inspect memory, set hardware breakpoints, and program a microcontroller's flash memory.

Strengths

  • Runs real OpenOCD, J-Link, and ST-LINK commands with concrete flash-programming and memory-read examples
  • Covers fault analysis, stack unwinding, and core state inspection (registers, PC, stack)
  • Includes SWO/ITM trace output and semihosting for real-time execution analysis
  • Provides a clear configuration block for probe type, interface (SWD/JTAG), speed, and target

Limitations

  • Assumes OpenOCD/J-Link/ST-LINK binaries are installed and a physical probe is connected
  • Does not describe recovery steps when the target is locked or the connection is unstable
  • Commands depend heavily on the specific target and its configuration files
When to use it

Use it when you need hardware-level firmware debugging, flash programming, or crash analysis on a Cortex-M target.

When not to use it

Avoid it when no physical probe is attached or the task is purely software debugging without hardware access.

Security analysis

Caution
Quality score82/100

The skill is legitimate embedded debugging documentation and does not contain malicious or exfiltrating instructions. It is rated caution because it grants Bash access to powerful hardware-programming tools and describes operations that can alter or erase attached devices.

Findings
  • •Uses Bash to invoke hardware debug tools such as OpenOCD and JLinkExe, which can flash, reset, halt, and modify embedded targets.
  • •Includes flash programming and direct memory/register write operations that could erase firmware or render a device temporarily unusable if misdirected.
  • •No evidence of secret exfiltration, obfuscated payloads, destructive host commands, or safety-disabling behavior.
How this analysis is made

Examples

Programmer la flash
Programme firmware.elf sur ma carte STM32F4 via ST-LINK en SWD à 4000 kHz, avec vérification et reset après programmation.
Inspecter les registres du cœur
Halte le cœur de la cible, affiche tous les registres CPU et le PC, puis reprends l'exécution.
Analyser une faute
Attache la sonde J-Link à la cible, mets un point d'arrêt matériel dans le HardFault_Handler et inspecte la pile pour identifier l'origine du plantage.

name: jtag-swd-debug description: Deep integration with JTAG/SWD debug probes for hardware-level debugging and flash programming category: Hardware Debugging allowed-tools:

  • Bash
  • Read
  • Write
  • Edit
  • Glob
  • Grep graph: domains: [domain:embedded-systems] specializations: [specialization:embedded-systems] skillAreas: [skill-area:rtos-programming, skill-area:firmware-development] roles: [role:embedded-engineer]

JTAG/SWD Debug Skill

Overview

This skill provides deep integration with JTAG/SWD debug probes for hardware-level debugging, flash programming, and real-time firmware analysis. It enables direct hardware interaction through industry-standard debug interfaces.

Capabilities

Debug Probe Operations

  • Execute OpenOCD, J-Link, and ST-LINK commands
  • Configure debug probe connections and interfaces
  • Manage multiple debug probe types and adapters
  • Handle transport protocols (JTAG, SWD, cJTAG)

Memory Operations

  • Read/write memory-mapped registers
  • Direct memory inspection and modification
  • Real-time memory watch and modification
  • Flash programming and verification
  • Memory dump and analysis

Debugging Features

  • Set hardware breakpoints and watchpoints
  • Core state inspection (registers, stack, PC)
  • Single-step execution control
  • Fault handler analysis and debugging
  • Call stack unwinding

Trace and Output

  • Semihosting input/output support
  • SWO trace output configuration
  • ITM stimulus port configuration
  • Real-time trace buffer analysis

Target Processes

  • hardware-bring-up.js - Initial board validation and debug setup
  • bootloader-implementation.js - Bootloader debugging and flash operations
  • device-driver-development.js - Driver debugging with hardware access
  • field-diagnostics.js - Field debugging and analysis

Dependencies

  • OpenOCD (Open On-Chip Debugger)
  • J-Link software (Segger)
  • ST-LINK utilities (STMicroelectronics)
  • Debug probe hardware (J-Link, ST-LINK, CMSIS-DAP)

Usage Context

This skill is invoked when tasks require:

  • Direct hardware debugging through JTAG/SWD
  • Flash memory programming operations
  • Low-level register and memory inspection
  • Fault analysis and crash debugging
  • Hardware breakpoint management

Configuration

debug_probe:
  type: jlink | stlink | openocd | cmsis-dap
  interface: swd | jtag
  speed: 4000  # kHz
  target: cortex-m4 | cortex-m7 | etc.

Example Operations

Flash Programming

openocd -f interface/stlink.cfg -f target/stm32f4x.cfg \
  -c "program firmware.elf verify reset exit"

Memory Read

JLinkExe -device STM32F407VG -if SWD -speed 4000 \
  -CommanderScript read_memory.jlink

Register Inspection

openocd -f board/stm32f4discovery.cfg \
  -c "init; halt; reg; resume; exit"

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/jtag-swd-debug-ms1aw4b0' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/jtag-swd-debug-ms1aw4b0/download' --output '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md.part' && mv '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md.part' '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Dependencies
  • OpenOCD (Open On-Chip Debugger)
  • J-Link software (Segger)
  • ST-LINK utilities (STMicroelectronics)
  • Debug probe hardware (J-Link, ST-LINK, CMSIS-DAP)

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md' && test -s '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/jtag-swd-debug' && cp -R '.skill-downloads/jtag-swd-debug-ms1aw4b0' '.claude/skills/jtag-swd-debug'

Cursor
test -f '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md' && test -s '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/jtag-swd-debug' && cp -R '.skill-downloads/jtag-swd-debug-ms1aw4b0' '.cursor/skills/jtag-swd-debug'

Codex
test -f '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md' && test -s '.skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/jtag-swd-debug' && cp -R '.skill-downloads/jtag-swd-debug-ms1aw4b0' '.agents/skills/jtag-swd-debug'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/jtag-swd-debug-ms1aw4b0'

openskills read 'jtag-swd-debug-ms1aw4b0'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/jtag-swd-debug-ms1aw4b0/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills