Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 2 column 88
---
name: jlink-debug
description: Operate SEGGER J-Link for embedded bring-up and hardware-in-the-loop loops: detect probes, flash firmware, start/stop GDB server, resolve RTT address from map files, and capture RTT logs. Use when a user asks to burn/download firmware, run real-board debug sessions, or automate compile→flash→RTT verification on STM32/MCU projects.
---
Use this skill to run J-Link flashing and RTT debugging in a deterministic, agent-friendly way.
- Ensure
JLinkExe,JLinkGDBServer, andJLinkRTTLoggerare installed and in PATH. - Build target firmware first (
.hex+.map). - Run
scripts/jlink_agent.pywith--jsonfor machine-readable output.
# 1) list connected probes
python3 scripts/jlink_agent.py probe --json
# 2) flash firmware
python3 scripts/jlink_agent.py flash \
--device STM32H747XI_M7 \
--serial <JLINK_SN> \
--firmware <path/to/firmware.hex> \
--json
# 3) resolve RTT address from map
python3 scripts/jlink_agent.py rtt-addr \
--map <path/to/firmware.map> \
--json
# 4) capture RTT logs
python3 scripts/jlink_agent.py rtt-capture \
--device STM32H747XI_M7 \
--serial <JLINK_SN> \
--address <0xADDR> \
--out /tmp/rtt.log \
--duration 20 \
--json- build firmware
flashrtt-addrrtt-capture- parse logs and classify pass/fail
- Never flash without explicit board-to-SN mapping.
- If RTT log is empty, diagnose infra first (wrong SN, wrong RTT address, logger timing).
- Prefer JSON output in automation.
scripts/jlink_agent.py— main CLI wrapper.scripts/jlink_nfc_ab.sh— example orchestration script for one-board flash+RTT.