riscv-mcu-debug

riscv-mcu-debug is a skill for Claude Code, Codex from easyzoom/aix-skills. It costs 44 tokens per session (1,414 once invoked), scanned A, original, MIT.

A debugging guide for RISC-V microcontrollers, the small chips used in embedded devices, and their bare-metal or real-time firmware.

In plain words
What is it for?
Use it with OpenOCD, GDB, JTAG, linker scripts, startup code, trap state, or RISC-V control registers during firmware bring-up.
Why use it?
It provides a systematic way to investigate flashing failures, startup hangs, traps, missing logs, and debugger connections before changing low-level code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it with OpenOCD, GDB, JTAG, linker scripts, startup code, trap state, or RISC-V control registers during firmware bring-up.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/easyzoom/aix-skills/riscv-mcu-debug
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.

Any agent
npx skills add easyzoom/aix-skills --skill riscv-mcu-debug
Clone the repo
git clone --depth 1 https://github.com/easyzoom/aix-skills

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 riscv-mcu-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/easyzoom/aix-skills/riscv-mcu-debug/github.svg)](https://agentmods.dev/skills/easyzoom/aix-skills/riscv-mcu-debug)
Your own site
<a href="https://agentmods.dev/skills/easyzoom/aix-skills/riscv-mcu-debug"><img src="https://agentmods.dev/badge/skills/easyzoom/aix-skills/riscv-mcu-debug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for riscv-mcu-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/easyzoom/aix-skills/riscv-mcu-debug"><img src="https://agentmods.dev/badge/skills/easyzoom/aix-skills/riscv-mcu-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,414 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00044 $0.01414
Opus 5 $0.00022 $0.00707
Sonnet 5 $0.00009 $0.00283
Haiku 4.5 $0.00004 $0.00141

Measured 9d ago against content hash 7ebed0c33ca4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

riscv-mcu-debug 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 9d 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/riscv-mcu-debug/SKILL.md · 159 lines

How it starts

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

RISC-V MCU Debug

Overview

Use this skill to debug RISC-V MCU firmware systematically. Identify the exact core, SoC, debug module, toolchain, memory map, and trap state before changing startup code, linker scripts, flash settings, or machine-mode configuration.

When To Use

Use this skill when:

  • The target is a RISC-V MCU or bare-metal RISC-V SoC.
  • The user mentions OpenOCD, GDB, JTAG, RISC-V debug module, mstatus, mcause, mepc, mtvec, trap handlers, startup code, or linker scripts.
  • Firmware cannot flash, stops before main, traps, hangs, or has no UART/log output.

Do not use this skill for Cortex-M, 8051, embedded Linux application debugging, or general C code review without target evidence.

First Questions

Ask for:

  • Exact chip, board, and core if known, such as RV32IMAC, RV32E, RV64, F/D extension, or vendor core name.
  • Toolchain: GCC, LLVM, vendor IDE, Zephyr, RT-Thread, or bare metal.
  • Debug path: OpenOCD, vendor GDB server, J-Link, WCH-Link, onboard probe, or UART bootloader.
  • Current symptom: cannot connect, cannot flash, no boot, trap, hang, no log, or peripheral failure.
  • Available artifacts: ELF, MAP, linker script, startup file, OpenOCD config, UART log, trap dump, or GDB transcript.

Workflow

  1. Confirm the target profile. RISC-V MCU behavior depends on XLEN, extensions, privilege mode, vendor CSRs, debug module, and memory map.

  2. Classify the failure phase. Use connect, flash, reset/startup, trap, runtime hang, peripheral bring-up, or RTOS scheduling.

  3. Establish a non-destructive debug session. Prefer halt/reset-halt and symbol loading before flash erase or startup rewrites.

  4. Collect trap and reset evidence. Record pc, sp, mstatus, mcause, mepc, mtval, mtvec, and key memory addresses.

  5. Check linker and startup alignment. Confirm reset address, vector/trap base, RAM origin, stack top, .data copy, .bss zeroing, and main call path.

  6. Ask before risky operations. Mass erase, option bytes, boot mode, security locks, and vendor flash config changes require explicit approval.

Read the full file on GitHub · 159 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. 9d ago First seen · 159 lines · 44 tokens per session scan A 7ebed0c33ca4

Subscribe to this mod's changes

riscv-mcu-debug is a skill published in the GitHub repository easyzoom/aix-skills (31 stars, last pushed 1mo ago), licensed MIT. It adds 44 tokens to every session and 1,414 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.