Agent skill

Embedded Firmware

by hdl-tools in hdl-tools/digital-chip-design-agents

Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation.

MITAuto-check: notesDevelopment

Install Embedded Firmware

skills CLI
$ npx skills add hdl-tools/digital-chip-design-agents --skill embedded-firmware -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hdl-tools/digital-chip-design-agents embedded-firmware --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hdl-tools/digital-chip-design-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/firmware/skills/embedded-firmware .claude/skills/embedded-firmware && rm -rf skills-src

Use ~/.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/

Facts

Skill name
embedded-firmware
GitHub stars
213
Token cost
~2.6k tokens
SKILL.md length
1,210 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation.

  • Works in 2 steps: memory/firmware/knowledge.md — known… → memory/firmware/run_state.md — current…
  • Writing chip bring-up firmware
  • SKILL.md covers Invocation, Pre-run Context, Purpose and Supported EDA Tools, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Embedded Firmware is an agent skill from hdl-tools/digital-chip-design-agents. Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation. Use when writing chip bring-up firmware, implementing HAL drivers, porting an RTOS, or validating firmware on hardware.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Embedded systems. The repository describes itself as: Digital HDL Design Full-stack Agents. The licence is MIT.

When your agent uses it

  • Writing chip bring-up firmware
  • Implementing HAL drivers
  • Porting an RTOS
  • Validating firmware on hardware

Example prompts

  • “/embedded-firmware”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Bash

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. memory/firmware/knowledge.md — known failure patterns, successful tool flags, PDK/tool quirks.
  2. memory/firmware/run_state.md — current run identity (run_id, design_name, tool,

What it can do on your machine

Read from SKILL.md and the folder at commit 38736b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are c and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Embedded Firmware loads about 2.6k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 1,210 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Bash

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.

SKILL.md

The full file from hdl-tools/digital-chip-design-agents at commit 38736b1, republished under its MIT licence (© hdl-tools). 1,210 words, ~2,604 tokens.

Download SKILL.mdSave it as .claude/skills/embedded-firmware/SKILL.md (or your agent's skills folder).
name
embedded-firmware
description
Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation. Use when writing chip bring-up firmware, implementing HAL drivers, porting an RTOS, or validating firmware on hardware.
allowed-tools
Read, Write, Bash
version
1.0.0
author
chuanseng-ng
license
MIT

Skill: Embedded Firmware & Device Drivers

Invocation

When this skill is loaded and a user presents a firmware or BSP task, do not execute stages directly. Immediately spawn the digital-chip-design-agents:firmware-orchestrator agent and pass the full user request and any available context to it. The orchestrator enforces the stage sequence, loop-back rules, and sign-off criteria defined below.

Use the domain rules in this file only when the orchestrator reads this skill mid-flow for stage-specific guidance, or when the user asks a targeted reference question rather than requesting a full flow execution.

Pre-run Context

Before executing or advising on any stage, read the following files if they exist:

  1. memory/firmware/knowledge.md — known failure patterns, successful tool flags, PDK/tool quirks. Incorporate its guidance into every stage decision. If absent, proceed without it.
  2. memory/firmware/run_state.md — current run identity (run_id, design_name, tool, last_stage). Use this to resume correctly after interruption. If absent, a new run is starting; the orchestrator will create this file before the first stage.

This pre-run read applies whether this skill is loaded by a user or called by the orchestrator mid-flow. It ensures the fix database is consulted before any diagnosis step.

Purpose

Guide BSP creation, peripheral driver development, RTOS integration, and system-level firmware validation. The firmware layer is the first software to run on real silicon — correctness here enables all subsequent SW development.


Supported EDA Tools

Open-Source
  • GCC cross-compiler (arm-none-eabi-gcc, riscv64-unknown-elf-gcc) — bare-metal firmware compilation
  • OpenOCD (openocd) — open-source on-chip debugger; supports JTAG/SWD for bring-up
  • GDB cross-debugger (arm-none-eabi-gdb) — source-level debugging over OpenOCD
  • QEMU (qemu-system-arm, qemu-system-riscv64) — firmware validation before hardware is available
Proprietary
  • J-Link GDB Server (JLinkGDBServer, dialect segger) — high-speed JTAG/SWD probe from SEGGER
  • Lauterbach TRACE32 (t32marm, dialect lauterbach) — hardware trace and debug for bring-up
  • Arm Development Studio (armds, dialect arm) — Eclipse-based IDE with Arm compiler and debugger

Stage: bsp_development

Domain Rules
  1. Startup code (crt0.S/startup.c) must in order:
    • Set stack pointer to __stack_top (from linker script)
    • Copy .data LMA → VMA
    • Zero .bss
    • Call SystemInit()
    • Branch to main()
  2. SystemInit() order: power stable → PLLs → clock mux → peripherals
  3. Interrupt controller: define vector table, IRQ enable/disable API, priority API
  4. memory_map.h: ALL peripheral base addresses and register offsets — no magic numbers
  5. All hardware register accesses: volatile pointer dereference
  6. Atomic read-modify-write on hardware registers: disable IRQ or use atomic ops
  7. Memory barriers (DMB/DSB or equivalent) around hardware access sequences
  8. BSP must be RTOS-agnostic — no OS API calls in BSP layer
QoR Metrics to Evaluate
  • Boot: chip reaches main() within expected startup time
  • Clocks: all PLLs locked; peripherals clocked correctly
  • Interrupts: vector table valid; default handler traps unhandled exceptions
  • Memory: .data initialised; .bss zeroed (verify with memory read)
Common Issues & Fixes
IssueFix
PLL not lockingCheck reference clock source; verify input frequency range
Hang before main()Toggle debug LED at each init step to isolate
Stack overflow at bootIncrease STACK_SIZE in linker script
.data not initialisedVerify crt0 LMA→VMA copy range; check AT clause
Output Required
  • startup.S and system_init.c
  • memory_map.h (complete register definitions)
  • Linker scripts
  • BSP build system

Stage: peripheral_drivers

Driver Architecture (HAL pattern)
c
status_t PERIPH_Init(PERIPH_Type *base, const periph_config_t *config);
status_t PERIPH_WriteBlocking(PERIPH_Type *base, const uint8_t *data, size_t len);
status_t PERIPH_TransferNonBlocking(PERIPH_Type *base, periph_handle_t *h, periph_xfer_t *x);
void     PERIPH_HandleIRQ(PERIPH_Type *base, periph_handle_t *handle);
Domain Rules
  1. All register accesses: via memory_map.h — no inline hex addresses
  2. All polling loops: timeout counter; return error code on timeout
  3. All functions: return status_t — never void for operations
  4. Thread safety: document per-driver; note mutex requirement if not safe
  5. DMA: provide DMA variants for all high-bandwidth peripherals
  6. Power management: suspend()/resume() hooks for low-power modes
  7. Callbacks: callback function pointers for async completion
Required Peripheral Coverage
PeripheralKey Tests
UARTBaud rate, parity, TX/RX loopback, DMA
SPIAll 4 modes, master/slave loopback, DMA
I2C7/10-bit addressing, repeated start, DMA
GPIOInput/output, pull resistors, edge interrupt
TimerPeriodic, one-shot, PWM, input capture
DMAChannel config, completion callback, scatter-gather
WatchdogInit, refresh (kick), triggered reset
QoR Metrics to Evaluate
  • All peripheral loopback tests: PASS
  • DMA transfers: correct data at correct address
  • No infinite loops — all error paths return timeout status
  • All error paths return meaningful status codes
Output Required
  • Driver source files (.c/.h per peripheral)
  • Driver unit test suite
  • Driver API documentation (Doxygen-compatible)

Stage: rtos_integration

FreeRTOS Domain Rules
  1. Port layer: implement portmacro.h for target architecture
  2. Tick timer: hardware timer for RTOS tick (default 1 ms)
  3. Context switch: implement SVC and PendSV handlers or equivalent
  4. Heap: use heap_4.c (best-fit with coalescence)
  5. Stack sizing: profile with uxTaskGetStackHighWaterMark(); add 20% margin
  6. configCHECK_FOR_STACK_OVERFLOW: set to 2 during development
  7. Priority inversion: use mutexes with priority inheritance
Show full SKILL.md (477 more words)Show less
RTOS-Aware Driver Rules
  1. Replace busy-wait with semaphore pend (ISR gives semaphore on completion)
  2. Shared peripheral: wrap with mutex; document max hold time
  3. DMA + RTOS: event flags or semaphore for DMA completion from ISR
  4. NEVER call non-FromISR FreeRTOS API from within ISR
QoR Metrics to Evaluate
  • RTOS boots: idle task runs; tick at correct rate
  • All tasks: created, scheduled, running
  • No stack overflow in 24-hour stress test
  • No deadlocks under concurrent peripheral access
Output Required
  • RTOS port layer files (if custom architecture)
  • FreeRTOSConfig.h configured for target
  • Multi-task integration test

Stage: driver_validation

Validation Tiers
LevelTestsEnvironment
UnitPeripheral loopbackBare-metal on HW
IntegrationMulti-peripheral DMA chainsRTOS on HW
SystemFull application scenarioRTOS on HW
Stress24-hour high-throughputOvernight on HW
QoR Metrics to Evaluate
  • All peripheral driver tests: 100% PASS
  • Stress test: 24-hour run with 0 failures
  • No memory corruption (stack watermark stable)
  • Throughput: within 10% of theoretical maximum
Output Required
  • Test results report
  • Performance measurements
  • Known limitations with workarounds

Stage: system_integration

Domain Rules
  1. All drivers must pass unit validation first
  2. Multi-peripheral concurrency: simultaneous UART + SPI + DMA + timer
  3. Power mode: enter/exit sleep; verify correct wake-up on each IRQ source
  4. Reset: warm and cold reset; verify all peripherals re-initialise
  5. Memory: full RAM walking-bit pattern test
QoR Metrics to Evaluate
  • System scenario: correct output vs golden reference
  • No lockups or unexpected resets in 1-hour system run
  • Power modes: current within 10% of spec
  • Reset recovery: fully functional after warm and cold reset
Output Required
  • System integration test report
  • Power consumption measurements
  • Bug list (HW vs SW classification)

Stage: firmware_signoff

Sign-off Checklist
  • All peripheral drivers: 100% unit test PASS
  • RTOS: no stack overflow, no deadlock
  • System integration test: PASS
  • 24-hour stress test: clean
  • Power modes: verified and measured
  • Reset: warm and cold verified
  • All P0/P1 bugs closed
Output Required
  • Validated firmware package
  • Test results report
  • Bring-up guide for silicon team
  • Known issues list

Memory

Write on stage completion

After each stage completes (regardless of whether an orchestrator session is active), write or overwrite one JSON record in memory/firmware/experiences.jsonl keyed by run_id. This ensures data is persisted even if the flow is interrupted or called without full orchestrator context.

Use run_id = firmware_<YYYYMMDD>_<HHMMSS> (set once at flow start; reuse on each stage update). Set signoff_achieved: false until the final sign-off stage completes.

Run state (write before first stage, update after each stage)

Write memory/firmware/run_state.md as the first action before launching any tool:

markdown
run_id:      firmware_<YYYYMMDD>_<HHMMSS>
design_name: <design>
tool:        <primary tool>
start_time:  <ISO-8601>
last_stage:  <first stage name>

Update last_stage after each stage completes. This file lets wakeup-loop prompts and resumed sessions identify the correct run without relying on in-memory state. Create the file and parent directories if they do not exist.

Optional: claude-mem index

If mcp__plugin_ecc_memory__add_observations is available in this session, emit each applied fix as an observation to entity chip-design-firmware-fixes after writing to experiences.jsonl. Skip silently if the tool is absent — JSONL is the canonical record.

© hdl-tools, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/firmware/skills/embedded-firmware of hdl-tools/digital-chip-design-agents.

Open the folder on GitHubat commit 38736b1

Compare with similar skills

Embedded Firmware 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.

Embedded Firmware compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Embedded Firmware this skillhdl-tools/digital-chip-design-agents213—~2.6kAutomated safety check: NotesMIT
Authoring VPhone Patch SetsLakr233/vphone-cli15k—~4.6kAutomated safety check: PassMIT
Sipeed I2C and SPI Hardware Controlsipeed/picoclaw30k—~578Automated safety check: PassMIT
RuView Hardware Setupruvnet/RuView97k—~1.8kAutomated safety check: NotesMIT
Esp32 Firmware Engineeralxv2016/folloup-sticky1161 repos~3.8kAutomated safety check: PassGPL-3.0
ExecuTorch Binary Size Reductionpytorch/executorch5.1k—~793Automated safety check: PassCustom licence

Similar skills

  • Authoring VPhone Patch Sets

    Lakr233/vphone-cli

    Explains how to declare a firmware patch in a vphone patch set, add a new set, or write a preset, including naming, gating and the checks that catch undeclared patches.

    15k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Reads and controls I2C and SPI peripherals on Sipeed boards such as LicheeRV Nano, MaixCAM and NanoKVM through the i2c and spi tools.

    30k GitHub stars~578 tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Brings a RuView CSI sensing node online by building ESP32-S3 or ESP32-C6 firmware, flashing the board, provisioning WiFi and checking the serial output.

    97k GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check: notes
  • Esp32 Firmware Engineer

    alxv2016/folloup-sticky

    ESP32 firmware engineering for ESP-IDF projects. An agent skill from alxv2016/folloup-sticky.

    116 GitHub starsUsed in 1 repo~3.8k tokens
    DevelopmentAuto-check passed
  • Measures and shrinks the ExecuTorch runtime binary by building a size test, analyzing it with bloaty and landing each reduction as its own pull request.

    5.1k GitHub stars~793 tokensUpdated today
    DevelopmentAuto-check passed
  • Sets up and runs 60 GHz and 24 GHz mmWave radar sensing on ESP32 boards in RuView, alone or fused with WiFi CSI.

    97k GitHub stars~907 tokensUpdated today
    DevelopmentAuto-check: notes

More from hdl-tools/digital-chip-design-agents

All 17 skills in this repo
  • Architecture

    hdl-tools/digital-chip-design-agents

    Microarchitecture exploration, PPA estimation, risk assessment, and architecture sign-off for digital chip design.

    213 GitHub stars~3.7k tokensUpdated 6 days ago
    Auto-check: notes
  • Compiler Toolchain

    hdl-tools/digital-chip-design-agents

    Compiler toolchain development for custom processor ISAs — LLVM/GCC backend, assembler, linker scripts, runtime libraries, and regression validation.

    213 GitHub stars~2.8k tokensUpdated 6 days ago
    Auto-check: notes
  • Dft

    hdl-tools/digital-chip-design-agents

    Design for Test — scan architecture planning, scan insertion, ATPG pattern generation, MBIST for embedded memories, and JTAG boundary scan.

    213 GitHub stars~3.3k tokensUpdated 6 days ago
    Auto-check: notes
  • Formal Verification

    hdl-tools/digital-chip-design-agents

    Formal property verification (FPV) and logical equivalence checking (LEC).

    213 GitHub stars~3.4k tokensUpdated 6 days ago
    Auto-check: notes
  • Fpga Emulation

    hdl-tools/digital-chip-design-agents

    FPGA prototyping — ASIC-to-FPGA RTL adaptation, multi-FPGA partitioning, synthesis and timing closure on FPGA, hardware bring-up, and software validation on the prototype.

    213 GitHub stars~3.4k tokensUpdated 6 days ago
    Auto-check: notes
  • Functional Verification

    hdl-tools/digital-chip-design-agents

    UVM-based functional verification — testbench architecture, test planning, directed and constrained-random stimulus, functional and code coverage closure, formal assist, and regression sign-off.

    213 GitHub stars~4.5k tokensUpdated 6 days ago
    Auto-check: notes

Categories

Questions about Embedded Firmware

What does Embedded Firmware do?

Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation. Embedded Firmware is an agent skill from hdl-tools/digital-chip-design-agents. Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation.

When should I use Embedded Firmware?

Embedded Firmware fits situations like: writing chip bring-up firmware; implementing HAL drivers; porting an RTOS; validating firmware on hardware.

How do I install Embedded Firmware in Claude Code?

Run `npx skills add hdl-tools/digital-chip-design-agents --skill embedded-firmware -a claude-code`. Or copy the skill folder (plugins/firmware/skills/embedded-firmware in hdl-tools/digital-chip-design-agents) into .claude/skills/embedded-firmware in your project. Claude Code loads it when a task matches its description.

How do I install Embedded Firmware in Codex?

Run `npx skills add hdl-tools/digital-chip-design-agents --skill embedded-firmware -a codex`. Or copy the skill folder (plugins/firmware/skills/embedded-firmware in hdl-tools/digital-chip-design-agents) into .agents/skills/embedded-firmware in your project. Codex loads it when a task matches its description.

Can I use Embedded Firmware in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hdl-tools/digital-chip-design-agents --skill embedded-firmware -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/embedded-firmware, .gemini/skills/embedded-firmware, .github/skills/embedded-firmware and .opencode/skills/embedded-firmware in your project.

What does Embedded Firmware need to run?

SKILL.md names no scripts, command-line tools or credentials: Embedded Firmware is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Bash.

Does Embedded Firmware access the network?

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.

Is Embedded Firmware safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Embedded Firmware use?

Embedded Firmware is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Embedded Firmware use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Embedded Firmware?

Skills that share tags, products or a category with Embedded Firmware: Authoring VPhone Patch Sets (Lakr233/vphone-cli, 15k stars), Sipeed I2C and SPI Hardware Control (sipeed/picoclaw, 30k stars), RuView Hardware Setup (ruvnet/RuView, 97k stars) and Esp32 Firmware Engineer (alxv2016/folloup-sticky, 116 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Embedded Firmware?

hdl-tools (a GitHub organization) maintains it in hdl-tools/digital-chip-design-agents, which has 213 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 3, 2026.

Source: hdl-tools/digital-chip-design-agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.