Embedded Debug
FastLED/FastLED
Firmware crash analysis, stack trace decoder, and register dump interpreter for ESP32/ARM/AVR platforms.
Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills assembly-riscv --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/low-level-programming/assembly-riscv .claude/skills/assembly-riscv && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "assembly-riscv" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv into .claude/skills/assembly-riscv/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assembly-riscv", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscvType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills assembly-riscv --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/low-level-programming/assembly-riscv .agents/skills/assembly-riscv && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "assembly-riscv" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv into .agents/skills/assembly-riscv/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assembly-riscv", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills assembly-riscv --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/low-level-programming/assembly-riscv .cursor/skills/assembly-riscv && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "assembly-riscv" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv into .cursor/skills/assembly-riscv/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assembly-riscv", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mohitmishra786/low-level-dev-skills.git --path skills/low-level-programming/assembly-riscv--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills assembly-riscv --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/low-level-programming/assembly-riscv .gemini/skills/assembly-riscv && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "assembly-riscv" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv into .gemini/skills/assembly-riscv/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assembly-riscv", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mohitmishra786/low-level-dev-skills assembly-riscvInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/low-level-programming/assembly-riscv .github/skills/assembly-riscv && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "assembly-riscv" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv into .github/skills/assembly-riscv/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assembly-riscv", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mohitmishra786/low-level-dev-skills assembly-riscv --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/low-level-programming/assembly-riscv .opencode/skills/assembly-riscv && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "assembly-riscv" agent skill from https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/low-level-programming/assembly-riscv into .opencode/skills/assembly-riscv/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "assembly-riscv", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
assembly-riscvReference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging.
This skill covers writing and reading RISC-V assembly for RV32 and RV64. It lists the 32 integer registers with their ABI names, roles and which side saves them, the floating-point registers, basic instruction forms and a minimal function that follows the psABI calling convention, with arguments in a0 and a1 and the return value in a0.
It also explains how extension letters combine after the base ISA, from I, M, A, F, D and C to G as shorthand for IMAFD, plus the vector, Zicsr, Zifencei, bit-manipulation and Ztso extensions. The description adds inline assembly with GCC and Clang, compressed instructions, and simulating a program with QEMU while debugging it through GDB remote. A reference file on the RISC-V ABI is included.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit bdc5847. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
apt-getFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
RISC-V Assembly Guide loads about 1.8k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 352 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from mohitmishra786/low-level-dev-skills at commit bdc5847, republished under its MIT licence (© mohitmishra786). 352 words, ~1,817 tokens.
.claude/skills/assembly-riscv/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Guide agents through RISC-V assembly programming: RV32/RV64 instruction sets, register naming and calling conventions (psABI), ISA extension naming, inline assembly with GCC/Clang, compressed (RVC) instructions, and QEMU-based simulation with GDB remote debugging.
RISC-V has 32 integer registers (x0–x31) with ABI names:
| Register | ABI name | Role | Saved by |
|---|---|---|---|
| x0 | zero | Hard-wired zero | — |
| x1 | ra | Return address | Caller |
| x2 | sp | Stack pointer | Callee |
| x3 | gp | Global pointer | — |
| x4 | tp | Thread pointer | — |
| x5–x7 | t0–t2 | Temporaries | Caller |
| x8 | s0/fp | Frame pointer | Callee |
| x9 | s1 | Saved register | Callee |
| x10–x11 | a0–a1 | Arguments / return values | Caller |
| x12–x17 | a2–a7 | Arguments | Caller |
| x18–x27 | s2–s11 | Saved registers | Callee |
| x28–x31 | t3–t6 | Temporaries | Caller |
Floating-point registers (F extension): f0–f31 (fa0–fa7 for arguments).
# Arithmetic (R and I type)
add a0, a1, a2 # a0 = a1 + a2
sub a0, a1, a2 # a0 = a1 - a2
addi a0, a1, 42 # a0 = a1 + 42 (immediate)
mul a0, a1, a2 # a0 = a1 * a2 (M extension)
div a0, a1, a2 # signed divide (M extension)
rem a0, a1, a2 # remainder (M extension)
# Logical
and a0, a1, a2 # bitwise AND
or a0, a1, a2 # bitwise OR
xor a0, a1, a2 # bitwise XOR
sll a0, a1, a2 # shift left logical
srl a0, a1, a2 # shift right logical (unsigned)
sra a0, a1, a2 # shift right arithmetic (signed)
# Load / store
lw a0, 0(sp) # load word (32-bit)
ld a0, 0(sp) # load doubleword (64-bit, RV64)
lh a0, 4(sp) # load halfword (sign-extended)
lbu a0, 8(sp) # load byte (zero-extended)
sw a0, 0(sp) # store word
sd a0, 0(sp) # store doubleword (RV64)
# Branches (compare and branch)
beq a0, a1, label # branch if equal
bne a0, a1, label # branch if not equal
blt a0, a1, label # branch if less than (signed)
bltu a0, a1, label # branch if less than (unsigned)
bge a0, a1, label # branch if ≥ (signed)
# Jumps
j label # unconditional jump (pseudoinstruction: jal x0, label)
jal ra, func # jump and link (call)
jalr zero, ra, 0 # jump to ra (return: pseudoinstruction: ret).section .text
.global add_numbers
# int add_numbers(int a, int b); — a in a0, b in a1, return in a0
add_numbers:
add a0, a0, a1 # result = a + b
ret # return (jalr zero, ra, 0)
.global factorial
# long factorial(int n); — n in a0
factorial:
addi sp, sp, -16 # allocate stack frame
sd ra, 8(sp) # save return address (RV64)
sd s0, 0(sp) # save s0 (callee-saved)
mv s0, a0 # s0 = n
li a0, 1 # default return 1
blez s0, .done # if n <= 0, return 1
addi a0, s0, -1 # a0 = n - 1
call factorial # recursive call: factorial(n-1)
mul a0, a0, s0 # a0 = result * n
.done:
ld ra, 8(sp) # restore ra
ld s0, 0(sp) # restore s0
addi sp, sp, 16 # deallocate
retRISC-V extensions are combined as a string after the base ISA:
| Letter | Extension | Description |
|---|---|---|
| I | Integer | Base 32/64-bit integer (RV32I, RV64I) |
| M | Multiply | Integer multiply and divide |
| A | Atomic | Atomic memory operations (lr/sc, AMOs) |
| F | Float | Single-precision float |
| D | Double | Double-precision float |
| C | Compressed | 16-bit compressed instructions |
| G | General | = IMAFD (shorthand) |
| V | Vector | Vector instructions (SIMD) |
| Zicsr | CSR | Control/status register access |
| Zifencei | Fence.i | Instruction-fetch fence |
| Zba/Zbb/Zbc/Zbs | Bit manipulation | Bit ops (B extension set) |
| Ztso | TSO | Total Store Ordering memory model |
Common targets:
rv32imac — no floating point, with atomics and compressedrv64gc — full general + compressedrv64gcv — + vector// Read a CSR register (e.g., cycle counter)
static inline uint64_t read_cycle(void) {
uint64_t val;
asm volatile ("rdcycle %0" : "=r"(val));
return val;
}
// Atomic swap
static inline int atomic_swap(int *ptr, int new_val) {
int old;
asm volatile (
"amoswap.w.aqrl %0, %2, (%1)"
: "=r"(old)
: "r"(ptr), "r"(new_val)
: "memory"
);
return old;
}
// Memory fence
static inline void memory_fence(void) {
asm volatile ("fence rw, rw" ::: "memory");
}
// CSR read/write
#define csr_read(csr) ({ \
uint64_t _v; \
asm volatile ("csrr %0, " #csr : "=r"(_v)); \
_v; \
})
uint64_t mstatus = csr_read(mstatus);RVC replaces common 32-bit instructions with 16-bit versions when:
c. versions)# Enable C extension in GCC
riscv64-linux-gnu-gcc -march=rv64gc prog.c -o prog
# Check if compressed instructions were generated
riscv64-linux-gnu-objdump -d prog | grep "c\."
# c.addi, c.ld, c.sw, c.j, etc.
# Disable compressed (for debugging or targets without C)
riscv64-linux-gnu-gcc -march=rv64g prog.c -o prog# Install QEMU RISC-V
apt-get install qemu-user qemu-system-riscv64
# User-mode emulation (run RV64 binary on x86 host)
qemu-riscv64 ./prog
# System emulation (full bare-metal VM)
qemu-system-riscv64 \
-machine virt \
-nographic \
-kernel firmware.elf \
-gdb tcp::1234 \
-S # start paused
# GDB remote session
riscv64-linux-gnu-gdb prog
(gdb) target remote :1234
(gdb) load
(gdb) break main
(gdb) continueFor the RISC-V psABI calling convention details, see references/riscv-abi.md.
skills/low-level-programming/assembly-arm for AArch64 comparisonskills/low-level-programming/assembly-x86 for x86-64 assemblyskills/embedded/openocd-jtag for real hardware RISC-V debuggingskills/compilers/cross-gcc for RISC-V cross-compilation setup© mohitmishra786, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/low-level-programming/assembly-riscv of mohitmishra786/low-level-dev-skills.
Open the folder on GitHubat commit bdc5847
RISC-V Assembly Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| RISC-V Assembly Guide this skillmohitmishra786/low-level-dev-skills | 252 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Embedded DebugFastLED/FastLED | 7.5k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Commodore64 Vice Debuggingidolpx/meatloaf | 128 | — | ~4.8k | Automated safety check: Pass | GPL-3.0 | |
| ExecuTorch on Zephyrpytorch/executorch | 5.1k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| C64 Meatloaf Debugidolpx/meatloaf | 128 | — | ~12k | Automated safety check: Pass | GPL-3.0 | |
| Meatloaf Networkingidolpx/meatloaf | 128 | — | ~7.1k | Automated safety check: Pass | GPL-3.0 |
FastLED/FastLED
Firmware crash analysis, stack trace decoder, and register dump interpreter for ESP32/ARM/AVR platforms.
idolpx/meatloaf
Debug Commodore 64 programs running under the VICE emulator through its binary monitor: BASIC, cc65-compiled C, and 6502 assembly.
pytorch/executorch
Sets up ExecuTorch as a Zephyr RTOS module, adds board support and debugs west build failures such as linker memory overflow on embedded boards.
idolpx/meatloaf
Debug Commodore 64 BASIC programs, cc65-compiled C PRGs, and Meatloaf ESP32 firmware in tandem, using the Ultimate 64's REST API and Meatloaf's UART serial debug output.
idolpx/meatloaf
Reference for the Meatloaf full-mode HTTP client protocol — the line-oriented command language (m, h, b, s, status, r-h, r-b, j, c) that an ESP32-based Meatloaf device accepts over the C64's IEC bus…
FastLED/FastLED
Generate a structured implementation contract before making any code changes to FastLED.
mohitmishra786/low-level-dev-skills
Guides reading and writing AArch64 and ARM Thumb assembly: compiler output, inline asm, registers, the AAPCS calling convention and NEON or SVE basics.
mohitmishra786/low-level-dev-skills
Explains x86-64 registers, the System V AMD64 calling convention, and how to read compiler-generated or inline assembly.
mohitmishra786/low-level-dev-skills
Guides your agent through Bazel for C/C++ projects: BUILD files, Bzlmod dependencies, toolchain registration, remote execution, dependency queries and sandbox debugging.
mohitmishra786/low-level-dev-skills
Binary hardening skill for security-hardened C/C++ builds. An agent skill from mohitmishra786/low-level-dev-skills.
mohitmishra786/low-level-dev-skills
GNU binutils skill for binary manipulation and analysis. An agent skill from mohitmishra786/low-level-dev-skills.
mohitmishra786/low-level-dev-skills
Build acceleration skill for C/C++ projects. An agent skill from mohitmishra786/low-level-dev-skills.
Categories
Reference for RISC-V assembly on RV32 and RV64: register names and calling convention, extension naming, GCC and Clang inline asm, and QEMU with GDB debugging. This skill covers writing and reading RISC-V assembly for RV32 and RV64. It lists the 32 integer registers with their ABI names, roles and which side saves them, the floating-point registers, basic instruction forms and a minimal function that follows the psABI calling convention, with arguments in a0 and a1 and the return value in a0.
RISC-V Assembly Guide fits situations like: writing a RISC-V assembly routine that follows the calling convention; working out what an extension string such as rv64gc means; embedding inline assembly in C for a RISC-V target; running and debugging RISC-V code under QEMU and GDB.
Run `npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a claude-code`. Or copy the skill folder (skills/low-level-programming/assembly-riscv in mohitmishra786/low-level-dev-skills) into .claude/skills/assembly-riscv in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a codex`. Or copy the skill folder (skills/low-level-programming/assembly-riscv in mohitmishra786/low-level-dev-skills) into .agents/skills/assembly-riscv in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitmishra786/low-level-dev-skills --skill assembly-riscv -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/assembly-riscv, .gemini/skills/assembly-riscv, .github/skills/assembly-riscv and .opencode/skills/assembly-riscv in your project.
Going by SKILL.md and its folder, RISC-V Assembly Guide needs the command-line tools its instructions call (apt-get). Our summary lists: QEMU and GDB for simulation and debugging.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
RISC-V Assembly Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 909 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with RISC-V Assembly Guide: Embedded Debug (FastLED/FastLED, 7.5k stars), Commodore64 Vice Debugging (idolpx/meatloaf, 128 stars), ExecuTorch on Zephyr (pytorch/executorch, 5.1k stars) and C64 Meatloaf Debug (idolpx/meatloaf, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mohitmishra786 (a GitHub user) maintains it in mohitmishra786/low-level-dev-skills, which has 252 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on June 27, 2026.
Source: mohitmishra786/low-level-dev-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.