firmware-debugger

firmware-debugger is a skill for Claude Code, Codex from captainluzik/oh-my-embedded. It costs 38 tokens per session (4,526 once invoked), scanned A, original, MIT.

A firmware debugging guide for embedded devices such as ESP32 and STM32 boards. It uses GDB, a program for inspecting running code, together with serial output and hardware debug probes.

In plain words
What is it for?
Use it to connect to a device, set breakpoints, inspect memory, read stack traces, flash firmware, and debug through JTAG or SWD. A debug probe is required.
Why use it?
It gives a systematic way to investigate crashes, hard faults, memory problems, and intermittent bugs instead of relying on guesswork.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/captainluzik/oh-my-embedded/firmware-debugger
Any agent
npx skills add captainluzik/oh-my-embedded --skill firmware-debugger
Clone the repo
git clone --depth 1 https://github.com/captainluzik/oh-my-embedded

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for firmware-debugger

README.md
[![agentmods](https://agentmods.dev/badge/skills/captainluzik/oh-my-embedded/firmware-debugger.svg)](https://agentmods.dev/skills/captainluzik/oh-my-embedded/firmware-debugger)
Your own site
<a href="https://agentmods.dev/skills/captainluzik/oh-my-embedded/firmware-debugger"><img src="https://agentmods.dev/badge/skills/captainluzik/oh-my-embedded/firmware-debugger.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,526 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.04526
Opus 5 $0.00019 $0.02263
Sonnet 5 $0.00008 $0.00905
Haiku 4.5 $0.00004 $0.00453

Measured 5d ago against content hash 39c950f45e41, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

firmware-debugger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/firmware-debugger/SKILL.md · 530 lines

How it starts

The opening of the file, as written. The whole thing — 530 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a firmware debugging specialist. You find bugs in embedded systems using GDB, serial output, logic analyzers, and systematic reasoning. You know how to read a crash dump, decode a hard fault, and find a race condition that only happens once a week in production.

You work with ESP32 (Xtensa and RISC-V), STM32 (Cortex-M), and other ARM Cortex-M targets. You use OpenOCD, J-Link, and ESP-PROG as debug probes. You know GDB deeply.

When debugging, you work systematically: gather data first, form hypotheses, test them. You don't guess. You don't suggest "try restarting" as a first step.


GDB Fundamentals for Embedded

Connecting to a Target

OpenOCD + GDB for STM32:

# Terminal 1: start OpenOCD
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg

# Terminal 2: connect GDB
arm-none-eabi-gdb build/firmware.elf
(gdb) target remote :3333
(gdb) monitor reset halt
(gdb) load                    # flash the firmware
(gdb) monitor reset init
(gdb) continue

OpenOCD + GDB for ESP32:

# Terminal 1:
openocd -f board/esp32-wrover-kit-3.3v.cfg

# Terminal 2:
xtensa-esp32-elf-gdb build/project.elf
(gdb) target remote :3333
(gdb) monitor reset halt
(gdb) continue

J-Link:

# Terminal 1:
JLinkGDBServer -device STM32F407VG -if SWD -speed 4000

# Terminal 2:
arm-none-eabi-gdb build/firmware.elf
(gdb) target remote :2331

ESP-IDF integrated debugging:

idf.py openocd    # starts OpenOCD with correct config
idf.py gdb        # starts GDB connected to OpenOCD

Essential GDB Commands

Navigation:

(gdb) continue          # c - run until breakpoint or halt
(gdb) step              # s - step into function
(gdb) next              # n - step over function
(gdb) finish            # run until current function returns
(gdb) until 42          # run until line 42
(gdb) return            # return from current function immediately

Breakpoints:

(gdb) break main.c:42           # break at line
(gdb) break sensor_read         # break at function
(gdb) break *0x08001234         # break at address
(gdb) tbreak sensor_read        # temporary breakpoint (fires once)
(gdb) rbreak ^sensor_           # regex breakpoint (all functions starting with sensor_)
(gdb) info breakpoints          # list all breakpoints
(gdb) delete 2                  # delete breakpoint 2
(gdb) disable 2                 # disable without deleting
(gdb) condition 2 i > 10        # conditional breakpoint

Read the full file on GitHub · 530 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 530 lines · 38 tokens per session scan A 39c950f45e41

Subscribe to this mod's changes

firmware-debugger is a skill published in the GitHub repository captainluzik/oh-my-embedded (23 stars, last pushed 6mo ago), licensed MIT. It adds 38 tokens to every session and 4,526 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

m5stack-cap-lora-1262

Hardware reference and firmware helper for the M5Stack Cap LoRa-1262 (SKU U214) — a snap-on cap for the Cardputer Adv (K132-Adv) and CardputerZero that carries a Semtech SX1262 sub-GHz LoRa radio (868–923 MHz, +22 dBm TX, external RP-SMA antenna) and an ATGM336H-6N GNSS receiver (GPS/QZSS/BeiDou/Galileo/GLONASS, UART…

iot-forge/m5stack-skills · 254 tokens

new-device-skill

Build or update an M5Stack hardware skill in this marketplace — a Controller (a board that runs firmware, like Core2 or AtomS3), a Unit (a peripheral you drive from a Controller, like a ToF sensor or a relay), or a Chip (an Espressif SoC capability layer, like esp32-c6). Use whenever adding a new board/unit/chip to…

iot-forge/m5stack-skills · 171 tokens

m5stack-tab5

Hardware reference and development helper for the M5Stack Tab5 (product code C145) — an ESP32-P4-based 5" touchscreen IoT/industrial terminal with an ESP32-C6 wireless co-processor, MIPI-DSI display, MIPI-CSI camera, ES8388 audio codec, BMI270 IMU, RX8130CE RTC, RS485, and a removable NP-F550 battery. Use this skill…

iot-forge/m5stack-skills · 236 tokens

m5stack-core2

Hardware reference and development helper for the M5Stack Core2 family — a 2.0" touchscreen ESP32 (classic, Xtensa LX6) Controller built around an AXP192 power management IC, ILI9342C display, FT6336U capacitive touch, BM8563 RTC, and (on original/1.1/1.3 revisions) an MPU6886 or BMI270 IMU. Covers the plain Core2…

iot-forge/m5stack-skills · 328 tokens

esp32-c6

Chip-level ESP-IDF capability reference for the ESP32-C6 SoC (single-core RISC-V HP core + RISC-V LP core, WiFi 6 + BLE 5.3 + Thread/Zigbee) — what the chip can do, distinct from any board's wiring. Use when a user wants to exploit ESP32-C6 hardware — WiFi 6/BLE/802.15.4 radio coexistence (Thread Border Router, Zigbee…

iot-forge/m5stack-skills · 307 tokens

esp32-p4

Chip-level ESP-IDF capability reference for the ESP32-P4 SoC (dual-core RISC-V HP cores + a RISC-V LP core) — what the chip can do, distinct from any board's wiring. Use when a user wants to exploit ESP32-P4 hardware — MIPI-CSI/DSI with the on-chip ISP, hardware JPEG encode/decode, hardware H.264 encode, PPA/2D-DMA…

iot-forge/m5stack-skills · 270 tokens