Skip to content
OpenSmartRoute
Skillv1.0.0

embedded-engineer

Use when selecting MCU/MPU architectures, configuring RTOS, designing peripheral interfaces, optimizing power profiles, implementing bootloaders, or setting up HIL testing. Handles ARM Cortex-M/R/A, R

by zeroes-ones(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from zeroes-ones/Skills (skills/20-hardware/embedded-engineer/SKILL.md). Install upstream with npx skills add zeroes-ones/Skills --skill embedded-engineer. Copyright stays with the author (MIT).

Embedded Engineer

Portability target: Spec-level (runs on Claude Code, Copilot, Gemini CLI, Codex, Cursor). No vendor-specific frontmatter fields.

Design, implement, and validate embedded systems from silicon selection through RTOS architecture, peripheral bring-up, power optimization, and hardware-in-the-loop testing. Hardware failures cost $50K per PCB respin and 6 weeks of schedule. There is no git revert for a burned board.

RESEARCH_PREREQUISITE — Execute Before Any Output

This is a HARD GATE. Do not produce ANY output, code, strategy, design, or recommendation without completing this research.

Before you act, you MUST execute every applicable research step. Research-before-acting is the difference between professional work and amateur guessing:

# Research Step Why It Matters Where to Look
RP1 Verify domain currency. Check for breaking changes, deprecations, new standards, or version shifts since the knowledge cutoff. [STALE_RISK] Outdated advice breaks real systems. API deprecations, framework version bumps, and security advisory changes happen continuously. Outputting based on stale knowledge damages credibility and produces broken results. Official docs, changelogs, GitHub releases, RFC tracker
RP2 Audit the system or codebase. Read relevant files. Understand existing patterns, constraints, and architecture before proposing changes. [CONTEXT_VIOLATION] Solutions that ignore existing patterns create technical debt. A change that contradicts the established architecture is worse than no change — it introduces inconsistency that compounds over time. Project files, configs, dependency manifests, existing tests
RP3 Cross-reference claims against authoritative sources. Every factual assertion needs a verifiable source. Mark each: [VERIFIED], [COMPUTED], or [ESTIMATED]. [HALLUCINATION_GUARD] Claims without sources are indistinguishable from hallucinations. The #1 cause of incorrect output is treating assumptions as facts. Source tagging prevents this. Official documentation, peer-reviewed papers, RFCs, specifications
RP4 Identify known failure modes. Before recommending, list what commonly breaks. For each failure mode: trigger condition, detection signal, and mitigation. [FAILURE_BLINDNESS] Every domain has known failure patterns. Output that doesn't address them is dangerously incomplete. If you cannot name 3+ failure modes for your recommendation, you don't understand it well enough to recommend it. Domain post-mortems, incident reports, antipattern catalogs, error databases
RP5 Quantify impact in concrete units. Replace abstract claims ("faster," "better," "more scalable") with exact numbers, even if estimated. [VAGUENESS_PENALTY] "Faster" is unverifiable. "Reduces p95 latency from 340ms to 120ms (±15ms)" is verifiable. Abstract adjectives hide ignorance behind confidence. Concrete numbers expose gaps. Benchmarks, production metrics, pricing data, published performance data
RP6 Map side effects and downstream impacts. What else breaks? Which dependencies are affected? Which downstream consumers need updating? [CASCADE_BLINDNESS] Changes to one component ripple outward. A fix in module A can break module B that depends on A's old behavior. Map the blast radius before acting. Dependency graph, cross-skill coordination table, API consumers list
RP7 Verify against non-negotiable quality gates. What are the minimum quality bars for this domain (accessibility, security, performance, accuracy, compliance)? [QUALITY_FLOOR] Every domain has minimum standards below which output is invalid regardless of functionality. Missing WCAG AA = broken. Leaking credentials = broken. Silent data loss = broken. Domain standards, compliance frameworks, security baselines, accessibility guidelines
RP8 Declare explicit limitations and edge cases. What does this NOT handle? What are the known boundaries? What scenarios are explicitly out of scope? [SCOPE_HONESTY] Declaring limitations is a feature, not an admission of weakness. It prevents misuse, sets correct expectations, and demonstrates true understanding. Every solution has boundaries — naming them is professional. This SKILL.md, domain literature, edge case databases

If you skip any of these research steps, you are not producing quality output — you are guessing with confidence. Guessing wastes time, breaks systems, and destroys trust. The references, ground rules, and decision trees in this skill exist specifically to prevent guessing. Use them.

Compliance: Research must be executed before any substantial output. For each step, document findings inline in your response using [RESEARCHED] marker: [RESEARCHED: RP1 — Domain verified against changelog v2.4. No breaking changes since cutoff.]. Partial research = partial quality. Zero research = zero credibility.

🔄 Iterative Research Loop — Research at EVERY Decision Point, Not Just Entry

The RP1-RP8 cycle above is NOT a one-time gate. It fires continuously at every material decision point throughout the workflow:

Loop When It Fires What Re-research Validates
Loop 0: Pre-Action Before producing ANY output, code, strategy, or recommendation Domain currency, codebase audit, source verification, failure modes, quantified impact, side effects, quality gates, limitations
Loop 1: Mid-Action At every adjustment, phase transition, scale-out, or significant state change Has the context changed? Are the original assumptions still valid? Has new information invalidated the Loop 0 conclusions?
Loop 2: Pre-Exit Before closing, handing off, escalating, or declaring completion Is the deliverable complete by the quality gates defined in RP7? Are all limitations declared (RP8)? Have failure modes been addressed (RP4)?
Loop 3: Post-Action After completion: compare expected vs. actual outcome What was the efficiency ratio (actual / theoretical max)? What learnings emerged? What should be fed back into the pattern database for future decisions?

Integration into Core Workflow:

Every decision point in a skill's Core Workflow must be marked with:

[RESEARCH LOOP: Re-execute RP1-RP8 before proceeding to next phase]

This ensures the agent pauses to re-verify ALL research dimensions before making the next decision. A skill that only researches at entry and then operates on auto-pilot is a skill that makes decisions on stale context.

Markers for output: At each loop, the agent outputs: [RESEARCHED: Loop N — RP1-RP8 re-verified. Key delta from previous loop: ...]

Why this matters: A decision made in Loop 0 may be catastrophically wrong by Loop 2 because the context changed. Markets move. Requirements shift. Dependencies update. The research loop catches context drift before it becomes output error.

Compliance: Research must be executed before any substantial output AND re-executed at every decision point. For each research loop, document findings inline. Partial research = partial quality. Zero research = zero credibility. Stale research = dangerous confidence.

Route the Request

Auto-Route (No User Input Required)

Evaluate these file-system conditions in order. First match wins — jump immediately.

# Condition Action
A1 file_contains("*.[chS]", "(HAL_Init|MX_GPIO_Init|SystemClock_Config|FreeRTOS|RTOS)") OR file_exists("CMakeLists.txt") AND file_contains("CMakeLists.txt", "(arm-none-eabi|xtensa|riscv)") This is your skill. Jump to Core Workflow — Phase 1: Silicon Selection & Architecture.
A2 `file_contains("*.ioc .prj", "(STM32|nRF|ESP32|MSP430|PIC)")ORfile_contains("", "MCU.*selection|silicon.*selection|chip.*selection")`
A3 `file_contains("*", "(linker script .ld
A4 `file_exists(".kicad_ *.sch
A5 file_contains("*", "(power.profil|Joulescope|Otii|Nordic.PPK)") AND `file_contains("*", "(sleep.current|deep.sleep|low.power µA)")`
A6 file_contains("*", "(SPI|I2C|UART|CAN|USB).*(errata|stuck|recover|bus.reset)") Jump to Error Decoder — I2C/SPI bus recovery rows.
A7 file_contains("*", "(HardFault|MemManage|BusFault|UsageFault)") AND `file_exists("*.s *.S")`
A8 `file_contains("*", "(ESD|EMC|FCC|CE|radiated.emission pre.compliance)")`

Intent Route (Ask the User)

If no auto-route matched, use this intent tree:

Ground Rules — Read Before Anything Else

# Negative Constraint Mechanical Trigger Violation Response
G1 REFUSE to recommend a chip without full power/thermal/peripheral budget. user_message_contains("recommend.*chip|suggest.*MCU|which.*processor") AND NOT `file_contains("*", "(BOM.cost peak.current
G2 STOP if no hardware watchdog configured. grep -rL "WDT|watchdog|IWDG|WWDG" *.[ch] src/ HALT. Every device needs: hardware watchdog <2s timeout, golden image recovery, GPI-based DFU entry. JTAG-only recovery = NOT production-ready.
G3 DETECT datasheet power figures used without measurement. file_contains("*", "datasheet.*typical|typical.*µA|typical.*mA|datasheet.*says.*[0-9].*µA") AND NOT file_exists("*power-profile*") STOP. Demand power profiler trace (Nordic PPK2, Joulescope, Otii Arc) at -20°C, 25°C, 60°C.
G4 REFUSE to work around hardware bugs with firmware. `file_contains("*", "(floating.pin missing.pull.up
G5 STOP if using a never-shipped chip without errata review. user_message_contains("new.chip|never.used|first.time|unfamiliar.MCU") AND NOT file_contains("*", "errata|known.issue|rev.[A-Z]") HALT. Budget 2 weeks for errata discovery on dev board. Review silicon errata document before PCB commit.
G6 DETECT dynamic memory allocation in event loops/ISR context. grep -n "malloc|calloc|realloc" src/*.[ch] | grep -v "init|boot|setup" WARN. Allocate all buffers at boot. Static pools only after init. Heap after init = fragmentation time bomb.
G7 STOP if OTA update lacks dual-bank flash + rollback. file_contains("*", "(OTA|over.the.air|firmware.update)") AND NOT file_contains("*", "(dual.bank|A/B.partition|rollback|revert|fallback)") HALT. Implement: Ed25519/ECDSA signature, dual-bank flash, auto-revert after 3 failed boots.
R1 ANCHOR to runtime versions before generating framework-specific code. Never generate Fastify/Express/Django/FastAPI/Prisma/SQLAlchemy API calls from training data alone — your training data may be stale. Trigger: skill receives code-generation task involving framework-specific APIs → run scripts/runtime-version-detect.sh [project-root] --skill-context to detect installed versions → if detection succeeds, anchor all API calls to detected versions → if detection fails, request version info from user STOP. Respond: "Detected: {runtime}@{version}, {frameworks}@{versions}. Anchoring all API calls to these versions. I will add // VERIFY: comments on any API call where the detected version is newer than my training cutoff."
R2 RUN the ROI Gate before any non-emergency code change. Every code change that is not (a) a security fix, (b) a compliance requirement, or (c) an active production incident must pass scripts/roi-gate.sh. If the gate returns negative, refuse to write the code. Trigger: skill receives a code-generation or refactoring task that is NOT a security fix, compliance requirement, or production incident → estimate implementation cost in engineer-hours → compare against annual value of the change → if cost > value, gate fails STOP. Respond: "ROI Gate analysis: This change costs approximately $[X] to implement but saves $[Y]/year. Payback period: [N] years. If payback > 2 years, I recommend declining this work. See scripts/roi-gate.sh for the full formula."
  • Admit uncertainty — never fabricate. If you're not certain about an API method, package version, configuration syntax, or command flag, say so explicitly: "I'm not certain this API exists in the latest version. Check the official docs at [URL]." Never invent a function signature or configuration key because it "seems right." Hallucinated code costs hours of debugging.
  • Flag your knowledge cutoff. If your training data predates the latest SDK release, framework version, or platform change, state your cutoff date and recommend verifying against current documentation. This is especially critical for rapidly evolving domains: cloud IAM policies, JS framework APIs, mobile OS capabilities, and SaaS pricing — all change quarterly or faster.
  • Never guess security configurations. If you're unsure about the correct CSP header value, OAuth flow parameter, or encryption algorithm choice, do NOT provide a "reasonable default." Say: "Security configurations must be verified against current best practices at [official source]. I cannot provide a definitive answer without current documentation."
  • Distinguish between what you know and what you infer. Explicitly mark statements as: [VERIFIED] — from official docs, [COMMON-PRACTICE] — widely used but not authoritative, [INFERRED] — your best guess based on patterns, [UNKNOWN] — you're unsure. This helps the user calibrate trust in your output.

The Expert's Mindset

Masters of embedded engineer don't just build — they build the right thing, at the right time, with the right trade-offs. They think in systems, not tasks.

Cognitive Bias Mitigation
Shiny object syndrome — chasing new tools without evaluating fit Before adopting any new tool, write the "why this over the incumbent" justification
Over-engineering — building for hypothetical scale Default to simplest solution; add complexity only when the current solution actually breaks
Not-invented-here — preferring to build rather than compose Always evaluate 2 existing solutions before building custom
Sunk cost fallacy — sticking with a technology because you already invested in it Re-evaluate tech choices every quarter; migration cost vs. staying cost

What Masters Know That Others Don't

  • The failure modes of every component in their stack — not just the happy path
  • When not to use their favorite tool (every tool has a misuse zone)
  • That data/model quality decays over time — monitoring is not optional, it's foundational

When to Break Your Own Rules

  • Move fast on reversible decisions. Data format? Hard to change. Dashboard layout? Easy. Know the difference.
  • Skip the abstraction until the third use case. Two is coincidence, three is a pattern.

Operating at Different Levels

Level Scope You...
L1 Single component/module Implement a well-defined piece following established patterns
L2 Feature or service Design and build a complete feature; make tech choices within team conventions
L3 System or product area Define architecture for a product area; set team tech standards; mentor L1-L2
L4 Multiple systems / platform Define org-wide architecture patterns; make build-vs-buy decisions; influence industry practice
L5 Industry / ecosystem Create new architectural patterns adopted across the industry; redefine what's possible

Default level for this skill: L2 Usage: Invoke this skill with your target level, e.g., "as an L3 embedded engineer, design..."

For full level definitions, see skills/00-framework/skill-levels/SKILL.md.

When to Use

  • Selecting an MCU/MPU for a new product: ARM Cortex-M0 through M7, RISC-V, ESP32, nRF52/53/54, STM32 families with tradeoff matrix
  • Choosing between bare-metal superloop, FreeRTOS, Zephyr, or ThreadX for a specific use case with real-time constraints
  • Configuring peripheral interfaces: SPI at >20 MHz with signal integrity, I2C multi-master with bus recovery, UART with DMA, CAN bus termination
  • Designing a secure bootloader with A/B partitions, Ed25519-signed images, and OTA update with power-loss resilience
  • Implementing power management: sleep modes, DVFS, battery life estimation for BLE/Zigbee/Thread coin-cell devices
  • Setting up hardware-in-the-loop (HIL) testing with programmable power supply, relay fault injection, and logic analyzer
  • Debugging real-time issues: interrupt latency budgeting (<1 µs target), jitter analysis (<5% period), priority inversion detection
  • Designing safety-critical firmware: watchdog strategy, brown-out detection, ECC memory, dual-redundant computation paths
  • Pre-compliance testing for FCC Part 15, CE RED, ISED intentional radiator requirements with 3 dB margin

Decision Trees

(QUICK)

MCU/MPU Selection Matrix

                          ┌──────────────────────────────┐
                          │ START: Define requirements    │
                          │ BOM target: $___ per MCU      │
                          │ Flash: ___ KB, RAM: ___ KB    │
                          │ Peripherals: ___ instances    │
                          │ Sleep current: ___ µA target  │
                          │ Volume: ___ K units/year      │
                          └────────────┬─────────────────┘
                                       │
                         ┌─────────────▼─────────────────┐
                         │ Need Linux? (MMU, >64MB RAM,   │
                         │ complex UI, camera pipeline)?  │
                         └────┬────────────────────┬─────┘
                              │ YES                │ NO
                    ┌─────────▼──────┐    ┌────────▼────────────┐
                    │ MPU path        │    │ MCU path             │
                    │ BOM >$15 target  │    │ BOM <$15 target      │
                    └────┬───────────┘    └────┬─────────────────┘
                         │                     │
              ┌──────────▼──────────┐  ┌────────▼────────────────┐
              │ Wireless required?  │  │ Wireless required?       │
              └──┬──────────────┬───┘  └──┬──────────────────┬────┘
                 │ YES          │ NO      │ YES              │ NO
         ┌───────▼──────┐ ┌────▼─────┐ ┌─▼──────────┐ ┌─────▼──────────┐
         │ i.MX RT cross │ │ STM32MP  │ │ BLE/Zigbee  │ │ STM32G0/G4      │
         │ over (Cortex  │ │ (Cortex-A│ │ → nRF5340   │ │ (Cortex-M0/M4,  │
         │ -M7 + M4)     │ │ + M4)    │ │ ($4-6)      │ │ $0.80-3)        │
         │ $8-12          │ │ $15-25   │ │ WiFi/BT     │ │ RISC-V option:  │
         └───────┬───────┘ └──────────┘ │ → ESP32-C3  │ │ → CH32V003      │
         ┌───────▼───────┐              │ ($1.50-3)   │ │ ($0.10 BOM!)    │
         │ AI/ML at edge │              │ Cellular    │ └─────────────────┘
         │ → STM32N6     │              │ → nRF9160   │
         │ (NPU on-die)  │              │ ($15-20)    │
         │ $8-15          │              │ Sub-GHz     │
         └───────────────┘              │ → CC1312    │
                                        │ ($3-5)      │
                                        └─────────────┘

Team selected ESP32-S3 for a battery BLE sensor. Datasheet: 5 µA deep sleep. Real: 240 µA — the built-in USB-UART bridge leaked current even when "disabled." Fix: external UART with dedicated EN pin, or switch to nRF52840 (1.4 µA system-off with RAM retention). Cost: 3-week respin, $8K prototypes scrapped.

RTOS vs Bare-Metal Superloop

                          ┌──────────────────────────────┐
                          │ START: Define firmware        │
                          │ complexity                    │
                          └────────────┬─────────────────┘
                                       │
                         ┌─────────────▼─────────────────┐
                         │ >3 concurrent tasks with       │
                         │ different timing budgets?      │
                         └────┬────────────────────┬─────┘
                              │ YES                │ NO
                    ┌─────────▼──────┐    ┌────────▼──────────┐
                    │ RTOS required   │    │ Flash <64KB OR     │
                    │                 │    │ RAM <8KB?         │
                    └────┬───────────┘    └───┬──────────┬─────┘
                         │                    │ YES      │ NO
              ┌──────────▼──────────┐   ┌─────▼───┐ ┌───▼─────────┐
              │ Hard real-time       │   │ Bare-metal│ │ Bare-metal  │
              │ (<10µs jitter)?      │   │ superloop │ │ + simple     │
              └──┬──────────────┬────┘   │ with ISRs │ │ scheduler    │
                 │ YES          │ NO     └───────────┘ │ (state mach) │
         ┌───────▼──────┐ ┌─────▼────────┐              └─────────────┘
         │ Zephyr or     │ │ FreeRTOS      │
         │ ThreadX       │ │ (widest       │
         │ (preemptive,  │ │ ecosystem,    │
         │ tickless,     │ │ 100K+ devices │
         │ safety cert)  │ │ shipped)      │
         └───────────────┘ └───────────────┘

Bare-metal: single-function device, flash <64KB, RAM <8KB, power <1 µA sleep, cert cost matters. FreeRTOS: 3-8 tasks, need TCP/IP, moderate real-time (1-10ms deadlines), team already knows it. Zephyr: hard real-time (<10µs jitter), BLE/Thread/Zigbee certified stacks, vendor-independent HAL, safety cert (ISO 26262, IEC 61508).

Power Management Strategy

                          ┌──────────────────────────────┐
                          │ START: Battery target life    │
                          │ ___ months/years              │
                          │ Battery: ___ mAh              │
                          │ Duty cycle: ___ % active      │
                          └────────────┬─────────────────┘
                                       │
                         ┌─────────────▼─────────────────┐
                         │ Coin cell (CR2032, 225mAh)     │
                         │ target >1 year?                │
                         └────┬────────────────────┬─────┘
                              │ YES                │ NO
                    ┌─────────▼──────┐    ┌────────▼──────────┐
                    │ Avg current     │    │ Li-Po/Li-Ion       │
                    │ MUST be <25µA   │    │ >500mAh?           │
                    │ (225mAh/8760h)  │    └───┬──────────┬─────┘
                    └────┬───────────┘        │ YES      │ NO
                         │             ┌──────▼────┐ ┌──▼──────────┐
              ┌──────────▼──────────┐  │ DVFS +     │ │ Simple       │
              │ Strategy:            │  │ tickless   │ │ sleep/wake   │
              │ • Tickless RTOS      │  │ idle       │ │ (WFI/WFE)    │
              │ • BLE conn interval  │  │ • Low freq │ │ Run @ full   │
              │   max (1s+)         │  │   for bg   │ │ speed always │
              │ • No UART RX pull-up │  │ • Boost for│ └──────────────┘
              │ • GPIO analog disc.  │  │   radio TX │
              │   in sleep           │  │ • Ship mode│
              │ • NCP for radio      │  │   <1µA     │
              └──────────────────────┘  └────────────┘

Door sensor: 3.7 µA on the bench, 30% field failures in 3 months. Root cause: magnetic reed switch leaked 10 nA at >80% humidity, biasing a floating CMOS input into the linear region drawing 200 µA. Fix: external 10M pull-down + firmware recalibrated debounce. Lesson: test power in an environmental chamber at -20°C, 25°C, 60°C — not just room temp.

Core Workflow

(STANDARD)

Phase 1 (~4 hours): Silicon Selection & Architecture

  1. Do: Fill the MCU/MPU selection matrix. List every peripheral: SPI × N, I2C × N, UART × N, CAN × N, USB Y/N, ADC channels + sample rate, GPIO count. Pin conflicts NOW prevent layout respins LATER.
  2. Do: Build the power budget: V_in × I_active × duty_cycle + V_in × I_sleep × (1-duty_cycle) = avg current. Add 30% margin for peripheral leakage you will discover. Compare to battery mAh ÷ avg current = hours.
  3. Do: Map memory: bootloader (16-64KB) + app A + app B + filesystem + config. RAM: stacks (per task) + heap + DMA buffers + BLE/TCP stacks. If total >80% chip capacity, size up or cut features.
  4. Verify: Order the dev board. Run critical peripheral test within 48 hours — SPI at target speed, ADC noise floor, BLE range. Do not finalize schematic until dev board validation passes.
  5. Recover: Dev board fails → restart selection before PCB spins. Changing silicon after layout costs 4-6 weeks and $15K+.

Complete when: MCU/MPU selection matrix with all peripherals mapped and pin conflicts resolved is complete; power budget with 30% margin is calculated against battery capacity; memory map (flash partitions + RAM allocation) is documented with <80% capacity usage; dev board is ordered and critical peripheral test passes within 48 hours.

Phase 2 (~6 hours): RTOS Configuration & Task Design

  1. Do: Choose RTOS per decision tree. Configure tick rate (1000 Hz precision, 100 Hz power-saving). Set configTOTAL_HEAP_SIZE to measured max + 20% headroom.
  2. Do: Assign task priorities: hard real-time → high (motor, radio); UI/logging → low. Document worst-case execution time (WCET) per task.
  3. Do: Stack sizing: measure with uxTaskGetStackHighWaterMark() after 24-hour stress test. Never guess — stack overflow corrupts memory silently and looks like a logic bug.
  4. Verify: Priority inversion stress test. Enable priority inheritance on mutexes. If any task starves >2× its deadline, refactor.
  5. Recover: Stack overflow → increase that task's stack by 50%, rerun. Heap exhaustion → audit every malloc() — allocate once at init, never in event loops.

Complete when: RTOS is selected per decision tree with tick rate configured; task priority assignment with WCET documented per task is complete; stack sizing is measured via high water mark after 24-hour stress test; priority inversion stress test passes with inheritance enabled on all mutexes.

Phase 3 (~8 hours): Bootloader & OTA Design

  1. Do: Partition flash: bootloader (validated at power-on, never self-updates), app A (active), app B (staging), persistent config. Minimum: 32KB bootloader + app A + app B.
  2. Do: Ed25519 or ECDSA P-256 image signature verification. Bootloader verifies before jump. Unsigned image = boot rejected. This is how botnets recruit IoT devices.
  3. Do: A/B swap: write new image → inactive partition → verify signature → set boot flag → reboot → bootloader validates → N failed boots → revert. Power-loss tested at every 10% of download.
  4. Verify: Corrupted image → bootloader detects, rejects. Power loss during OTA → device recovers to previous working image.
  5. Recover: Bootloader corrupted → device bricked. Ensure hardware recovery: hold BOOT0 at power-on for ROM bootloader (STM32), or serial recovery (nRF, ESP32).

Complete when: Flash partition layout (bootloader + app A + app B + config) with minimum sizes is defined; image signature verification (Ed25519 or ECDSA P-256) is implemented in bootloader; A/B swap with power-loss recovery tested at every 10% of download is verified; hardware recovery mechanism (BOOT0/serial) is documented and tested.

Phase 4 (~5 hours): Hardware-in-the-Loop Testing

  1. Do: HIL rig: Raspberry Pi/PC running pytest → programmable PSU → relay matrix (fault injection) → logic analyzer. Physically stimulates sensors (I2C DACs, GPIO toggles), measures actuator outputs.
  2. Do: Test cases: (a) power glitch to brown-out threshold → clean reset, (b) I2C SDA stuck low → timeout + recovery, (c) sensor disconnect → firmware detects, doesn't report NaN.
  3. Do: 24-hour soak with randomized fault injection. Log every reset cause (power-on, watchdog, brown-out, software). Verify correct reason recorded each time.
  4. Verify: Zero manual intervention. A human should never need to power-cycle a device under test.
  5. Recover: Intermittent test failures = race condition or timing bug, not "test flake." Do not increase timeouts — find the root cause.

Complete when: HIL rig with programmable PSU, relay matrix, and logic analyzer is operational; fault injection test cases (brown-out, I2C stuck, sensor disconnect) all pass; 24-hour soak with randomized fault injection completes with zero manual intervention and correct reset cause logging.

Phase 5 (~3 hours): Real-Time Validation & Interrupt Budgeting

  1. Do: Measure interrupt latency: GPIO edge to ISR entry via logic analyzer on debug pin. Target: <1 µs for critical interrupts on Cortex-M4 at 80 MHz. >2 µs → investigate nested interrupts or disabled-IRQ regions.
  2. Do: ISR execution time <10 µs. ISR does: capture timestamp, set flag, unblock task. Move heavy work to a high-priority task.
  3. Do: Jitter analysis: 1000 consecutive periods of a 1 kHz timer. P95 jitter <5% of period. Higher → check interrupt masking or DMA bus contention.
  4. Verify: Worst-case latency with all peripherals active (SPI DMA + BLE radio + ADC sampling). Must still meet deadlines.
  5. Recover: Jitter exceeds budget → reduce longest interrupt-disabled section. __disable_irq() / __enable_irq() pairs <5 µs max. Use scope guards.

Complete when: Interrupt latency measurement (<1 µs target on Cortex-M4 at 80 MHz) is verified via logic analyzer; ISR execution time (<10 µs) is confirmed for all ISRs with heavy work deferred to tasks; jitter analysis (1000 periods, P95 <5% of period) passes; worst-case latency with all peripherals active meets all deadlines. Complete when: All deliverables verified against acceptance criteria, stakeholder sign-off obtained, and documentation updated with final decisions and rationale. Complete when: Risk register reviewed with mitigation owners assigned, residual risk levels within acceptable thresholds, and escalation paths documented for all identified risks. Complete when: Quality gates passed: peer review completed, automated checks green, test coverage meets minimum thresholds, and no blocking issues remain open.

Error Recovery

(STANDARD)

If a command or approach fails, follow this escalation path before giving up:

Symptom First Action If That Fails Last Resort
Tool/command not found Check installation: which [tool] or [tool] --version. Install via package manager (brew install, npm install -g, pip install) Check PATH: echo $PATH. Verify the tool binary is in a PATH directory. Symlink or update PATH if installed but unreachable Use a functionally equivalent alternative tool. If rg is unavailable, use grep -r. If gh is unavailable, use git directly or the GitHub API via curl
Permission denied Check ownership: ls -la [path]. Fix with chmod or sudo if appropriate. For API errors (401/403), verify credentials haven't expired: echo $TOKEN or check ~/.netrc Refresh credentials: re-authenticate with the service. For file permissions, check if the file is locked by another process: lsof [path] Request elevated permissions or use a different authentication method (token vs password, SSH key vs HTTPS)
Command hangs or times out Kill the process: Ctrl+C. Re-run with a timeout: timeout 30 [command] or gtimeout on macOS. Check system resources: top, df -h, netstat -an Add verbose/debug flags: --verbose, --debug, -v. Check logs: tail -f [logfile]. Reduce scope: process fewer files, query a smaller time range, limit concurrency Split the work into smaller batches. Implement a retry loop with exponential backoff (1s, 2s, 4s, 8s). If the issue is network-related, add --retry 3 or equivalent
Unexpected output or error message Read the error message completely — the solution is often in the last 3 lines. Search the exact error: grep -r "[error text]" in the repo to find prior occurrences Check GitHub issues for the tool: gh issue list --repo owner/repo --search "[error keyword]". Check Stack Overflow Simplify the approach. If the complex one-liner fails, break it into 3 sequential commands. If the specialized tool fails, use a more basic tool with more steps
Data integrity concern (wrong output, silent failure) Verify with a manual check: compare output against a known-correct baseline. Add assertions: `[command] grep -q "[expected]" && echo "OK"

Hard failure boundary: If 3 different approaches all fail, STOP. Do not iterate infinitely. Log what was tried, capture the error output, and report the blocking issue with full context. Move to the next independent task rather than blocking all progress on one failure.

Error Decoder — War Stories from the Trenches

(STANDARD)

When this domain goes wrong, it goes wrong in predictable ways. Here are the most common failure signatures, their root causes, and the fix you'll reach for after you've been burned once.

Symptom Root Cause Fix Lesson
Device draws 200µA in deep sleep instead of the expected 3µA — battery dies in 3 weeks instead of 2 years A UART TX pin was configured as input-floating after entering deep sleep. The floating input caused the pin's Schmitt trigger to oscillate at ~10kHz, drawing 180µA. The datasheet deep-sleep current spec assumes all pins are configured, not floating. Configure every unused pin as analog input (disable digital input buffer) or output-low before entering sleep. Measure sleep current on a real board with a current meter — do not trust the datasheet. The datasheet number is for a bare MCU on an eval board with no peripherals. Datasheet sleep current is aspirational. Your board has pull-ups, pull-downs, sensors with quiescent current, and floating pins you forgot about. Always measure, never calculate.
UART works at 115200 baud on the bench but drops characters at -20°C in the field The MCU's internal RC oscillator drifts by 2% at -20°C. At 115200 baud, a 2% clock error means the UART sampling point drifts by half a bit period after 10 bits — right into the bit transition. Characters arrive as garbage. Use an external crystal oscillator for any UART above 9600 baud that operates across temperature extremes. If you must use the internal RC, auto-baud-detect on every power-up and periodically recalibrate against a known reference (e.g., the 32kHz crystal). Internal RC oscillators are temperature-sensitive. At 115200 baud, a 2% drift is a character error. At 1M baud, a 0.5% drift is a character error. Crystals are cheap; field failures are expensive.
ADC readings are noisy — 12-bit ADC delivers ~8 effective bits after implementing the reference design The ADC reference voltage is the same 3.3V rail that powers the switching regulator, the LED driver, and the motor H-bridge. The rail has 150mV of ripple at the switching frequency. The ADC is sampling the noise, not the signal. Give the ADC its own dedicated voltage reference (internal bandgap or external precision reference). Filter the analog supply with an LC filter (ferrite bead + capacitor). Separate analog and digital ground planes with a single-point connection under the ADC. ADC resolution is meaningless without a clean reference. A 12-bit ADC on a noisy rail is a 12-bit noise digitizer. The reference voltage matters more than the ADC's ENOB spec.
Firmware image is 2KB too large for flash — the linker says "section .text will not fit in region FLASH" Debug logging was compiled into the release build. A LOG_DEBUG() macro that resolves to nothing in release was supposed to be used but someone used printf() directly. The format strings alone consumed 4KB of flash. Use compile-time logging levels: wrap all debug prints in #ifdef DEBUG_BUILD. Add a CI check that greps the release binary for printf and fails the build if found. Audit the map file after every release build — look at the top 10 symbols by size. Release builds and debug builds should be different compilation units, not just different optimization flags. A single printf left in release can cost you the whole firmware.
Interrupt latency spikes to 400µs every 47ms because a lower-priority ISR disables global interrupts for an entire SPI transaction An SPI transaction ISR disables all interrupts with __disable_irq() for the duration of the transfer (17 bytes at 2MHz = 68µs). But the compiler also inserted a 300µs memcpy before the transfer that was inside the critical section. Total interrupt disable time: 368µs. The 50µs timer ISR missed 7 ticks, losing 350µs of accumulated time. Never do work inside a critical section. Disable interrupts only around the atomic operation, not the setup. For SPI: prepare the buffer outside the critical section, then only disable interrupts for the while(transfer_in_progress) spin. Measure actual interrupt disable time with a GPIO toggle + oscilloscope. Critical section duration is the silent killer of real-time performance. Never guess how long interrupts are disabled — measure it with an oscilloscope. If a GPIO toggle shows interrupts off for 400µs, your 100µs deadline is already dead.
Device works perfectly in the lab at 25°C but 40% of field units reboot randomly when installed in a metal enclosure in direct sunlight The metal enclosure in sunlight reaches 75°C. The LDO regulator's thermal shutdown kicks in at 85°C junction temperature. At 75°C ambient, with the LDO dropping 5V to 3.3V at 200mA, the junction temperature hits 101°C — the LDO cycles on/off as it thermal-throttles, causing brown-out resets. Calculate LDO thermal budget: T_junction = T_ambient + (V_drop × I_load × θ_JA). If the number exceeds 85°C, switch to a switching regulator (efficiency >85% means much less heat) or add a heatsink. Test in a thermal chamber at max operating ambient, not room temperature. Thermal design is not optional for enclosed electronics. An LDO dropping 5V to 3.3V at 200mA in a 75°C enclosure is a heater, not a regulator. Switching regulators exist for a reason.

Best Practices

  1. Design for memory-constrained environments from the start. Define a memory budget (ROM, RAM, stack per task) before writing any application logic. Use -fstack-usage and map files to verify actual usage against budget. Embedded systems don't have swap — exceeding RAM silently corrupts adjacent data. Budget ROM/RAM with 20% headroom for future features.

  2. Assign RTOS task priorities based on real-time deadlines, not perceived importance. A motor control loop with a 100µs deadline gets priority 0 (highest). A logging task with a 100ms deadline gets priority 5. A UI update task with no deadline gets priority 10 (lowest). Rate-monotonic scheduling: shorter period = higher priority. Verify with tracealyzer or a logic analyzer on GPIO toggles at task entry/exit.

  3. Keep ISRs short — under 10µs is ideal, under 100µs is acceptable. ISRs should: read a register, set a flag, push to a ring buffer, and exit. Never: allocate memory, take a mutex, call printf, or busy-wait in an ISR. If processing takes longer, defer to a high-priority task via a semaphore or task notification. Profile ISR duration with an oscilloscope on a GPIO — guessing is not enough.

  4. Build a hardware abstraction layer (HAL) to decouple application logic from silicon. Define interfaces for GPIO, I2C, SPI, UART, ADC, PWM, and timers. The application calls hal_i2c_write(addr, data, len), never I2C1->DR = data directly. When the SoC changes (and it will — silicon revisions, supply chain pivots, cost reductions), only the HAL implementation changes, not the application. A 50-file firmware with a HAL ports in 1 week; without one, 6 weeks.

  5. Implement power management as a first-class architecture concern, not an afterthought. Define sleep modes (idle, sleep, deep sleep, standby) and wake sources (GPIO, RTC, watchdog, communication peripheral). Measure current in each mode with a power profiler. Enter the deepest possible sleep mode whenever the system is idle. A device that draws 10mA instead of 10µA in sleep kills battery life — 10mA idle on a 2000mAh battery = 8 days; 10µA = 22 years.

  6. Design peripheral drivers with error recovery baked in, not bolted on. I2C transactions can be NACKed or bus-stuck. SPI can have mode mismatches. UART can receive framing errors. Every driver transaction must: (a) have a timeout, (b) check error flags after every operation, (c) implement a reset/reinitialize path, (d) report errors to the application layer. A driver that hangs forever on a bus fault turns a recoverable transient error into a system-wide lockup.

  7. Architect the bootloader with a fail-safe update path. Implement dual-bank flash (A/B partitioning) with a bootloader that: verifies application image CRC before boot, tracks boot attempts (increment on boot, clear on successful run), rolls back to previous image after N consecutive failures (typically 3), and has a golden/recovery image that can be entered via a hardware pin or button combination. A bootloader that erases the old image before verifying the new one = unrecoverable brick on power loss.

  8. Use independent watchdog timer (IWDG) with a multi-level supervision strategy. Configure the hardware watchdog with a timeout appropriate for your main loop period (typically 100ms-2s). Kick it only from the main loop — never from an ISR. For RTOS systems, add a software watchdog task that monitors all other tasks via heartbeat counters. If any task misses its deadline, the watchdog task deliberately stops kicking the hardware watchdog, triggering a full system reset. Test by deliberately hanging each task.

  9. Perform stack depth analysis before releasing firmware. Use GCC's -fstack-usage flag to generate per-function stack usage data. Sum the worst-case call chain (ISR → callback → driver → application). Add interrupt nesting overhead (if nested interrupts are enabled, sum the worst-case ISR chain too). Verify against allocated task stack sizes with 50% margin. A stack overflow without MMU protection silently corrupts RTOS structures or adjacent task stacks — symptoms appear as random crashes days or weeks later.

  10. Enable brown-out detection (BOD) before any flash write or erase operation. Flash programming requires a minimum voltage (typically 2.7V for 3.3V MCUs). During a brown-out (voltage sag from motor startup, battery depletion, or power supply transient), the MCU may execute corrupted instructions and write garbage to flash. Configure BOD to trigger a system reset at a threshold above the flash programming minimum voltage. Test with a programmable power supply: ramp voltage down during flash writes and verify BOD triggers before corruption occurs.

Error Decoder

Error Message / Situation Root Cause Fix Lesson
Watchdog never fires despite main loop hang Watchdog is kicked from a timer ISR that continues to fire even though the main loop is stuck in a hard fault or infinite loop Move watchdog kick exclusively to the main loop. For RTOS systems, implement a watchdog task that monitors all other tasks via heartbeats — if any task misses, the watchdog task stops kicking, triggering reset The watchdog must be supervised by the component it's protecting. Kicking from an ISR creates a false sense of security — the ISR is hardware-triggered and independent of software health
Stack overflow with no crash Stack overflow on an MCU without MMU/MPU silently corrupts the next task's stack or RTOS control block — no segfault, no hard fault, just inexplicable behavior days later Enable -fstack-usage and -fstack-protector-strong. Sum worst-case call chain depths. Set configCHECK_FOR_STACK_OVERFLOW in FreeRTOS. Fill stack with known pattern (0xA5) at task creation and check watermark at runtime Without an MMU, stack overflow is the silent killer of embedded systems. Static analysis and runtime watermark checking are mandatory — you cannot rely on crashes to detect it
volatile not atomic in ISR context volatile uint32_t x; x++ is compiled as load-increment-store — three instructions. If an ISR fires between load and store, the increment is lost Use atomic_fetch_add() from <stdatomic.h> (C11) or critical sections (__disable_irq()/__enable_irq()) for shared state between ISR and main loop volatile only prevents compiler optimization (caching in registers) — it does NOT provide atomicity, ordering, or mutual exclusion. These are distinct concerns requiring distinct mechanisms
printf in ISR blocks for 3ms UART TX at 115200 baud = ~86µs per character. A 35-character printf = ~3ms of blocking with interrupts disabled, causing the systick, motor control, and communication ISRs to miss deadlines Use a ring buffer: ISR writes formatted data to the buffer, main loop drains and prints. Or use Segger RTT (RAM-based debug output, ~1µs overhead) instead of UART for debug prints The ISR contract is: enter, do the minimum (read register, set flag, push to buffer), exit. Any operation with unbounded or >10µs execution time must be deferred
Flash write during voltage sag corrupts data Brown-out drops VDD below flash minimum programming voltage (typically 2.7V) mid-write — the charge pump can't generate programming voltage, bits are partially programmed, and the sector is corrupted Enable brown-out detection (BOD) at a threshold above the flash minimum programming voltage. Test by ramping supply voltage down with a programmable power supply during flash writes Flash writes are the most voltage-sensitive operation in an MCU. BOD must be hardware-configured and tested — software voltage checks have too much latency to protect against fast transients
Memory-mapped I/O write cached and never reaches peripheral CPU data cache holds the write in cache line without flushing to the peripheral bus. The write is visible to the CPU (cache hit) but invisible to the peripheral Mark MMIO regions as Device-nGnRnE (ARM) or Uncached (x86) in the MMU/MPU configuration. For systems without MMU, use memory barriers: __DSB() after MMIO writes, or use volatile with proper compiler barriers CPU caches don't know about peripherals. Memory type configuration in the MMU/MPU is the only correct solution — volatile alone prevents compiler reordering but does NOT prevent hardware caching

Cross-Skill Coordination

Coordinate With

Coordinate With When What to Share/Ask
Hardware Architect Silicon selection, power tree, pin assignment Peripheral conflicts, power sequencing, GPIO drive strength, ADC reference selection
Firmware Developer BSP handoff, HAL API, bootloader integration Memory map (linker script), peripheral init sequence, ISR priority assignments, DMA channels
QA Engineer HIL test design, factory test firmware Test point access (UART header, SWD pins), factory test mode entry, calibration register map
Security Engineer Secure boot, OTA signing Signature algorithm, key storage (secure element vs OTP), firmware encryption requirements
System Architect Real-time constraints, power budget Latency budgets per subsystem, throughput requirements, availability targets

Communication Triggers

Trigger Notify Why
Silicon errata found in production Hardware Architect, Firmware Developer, QA Workaround assessment; respin decision
Power budget exceeds target >20% Hardware Architect PCB leakage review; component swap
Bootloader vulnerability (CVE/internal audit) Security Engineer, Firmware Developer Emergency OTA; key rotation
Flash/RAM >90% Firmware Developer, Hardware Architect Optimization sprint or chip upgrade
OTA bricking rate >0.1% in field Firmware Developer, QA, Hardware Architect Halt rollout; recovery path investigation

Escalation Path

Device bricks >0.1% rate? → Halt OTA → Hardware Architect → VP Engineering
Silicon errata, no workaround? → Hardware Architect → Reselection → +8 weeks
EMC failure >6dB over limit? → Hardware Architect → PCB respin → $15K-50K + 4-6 weeks
Bootloader security vuln, unpatchable? → Security Engineer → Emergency OTA / physical recall

Cross-Skill Chain

# Architecture → Embedded bring-up → Firmware → QA
/hardware-architect && /embedded-engineer && /firmware-developer && /qa-engineer

Decision Gates & Handoff Artifacts:

  • Silicon selection gate: MCU/MPU selection must pass: (1) peripheral count check (all required interfaces available simultaneously), (2) power budget fit (<80% of PMIC capacity), (3) flash/RAM headroom >30%, (4) lifecycle guarantee (not NRND/EOL). Artifact: MCU selection matrix with scored criteria.
  • Pin mux review gate: Every pin assignment verified against alternate functions before schematic freeze. Pin conflict = PCB respin. Artifact: Pin assignment spreadsheet signed off by hardware-architect and firmware-developer.
  • RTOS task audit gate: All tasks must show >20% stack headroom after 24-hour stress test. Zero priority inversions. Artifact: RTOS task analysis report with stack high-water marks and CPU utilization.
  • Power profile gate: Sleep current within 30% of calculated budget; active current within 10% of datasheet. Exceeding = leakage or misconfiguration. Artifact: Power profiler trace with annotated power states.
  • Bootloader security gate: Bootloader must: (1) validate signatures before boot, (2) reject unsigned/corrupt/wrong-key images, (3) revert to previous image after 3 failed boots. All verified on hardware. Artifact: Bootloader test report with pass/fail for each security scenario.
  • OTA safety gate: OTA must survive power loss at any point during download. Device always boots valid image (old or new, never corrupted). Brick rate >0.1% = halt rollout. Artifact: OTA robustness test report with 100 random power-loss test results.
  • Handoff to firmware-developer: Memory map (linker script input), peripheral init sequence, ISR priority assignments, DMA channel allocation, HAL API specification. Artifact: BSP handoff package with all register-level documentation.
  • Handoff to qa-engineer: Test point access (UART header, SWD pins), factory test mode entry sequence, calibration register map. Artifact: HIL test specification with pass/fail thresholds.
  • Handoff to performance-engineer: Power budget, clock tree configuration, peripheral utilization report. Artifact: Power and performance baseline report.
Upstream Skill What You Receive When to Involve
system-architect Hardware-software boundaries, communication protocols, constraints Before designing embedded or firmware systems
embedded-engineer Microcontroller selection, RTOS, peripheral interfaces Before writing firmware or hardware-specific code

Proactive Triggers

Trigger Action Why
OTA rollout reaches 5% fleet and no brick reports yet Continue staged rollout: 5% → 15% → 50% → 100% with 24-hour observation windows; monitor boot success rate per version Early-stage brick detection limits blast radius; a 0.1% brick rate at 5% fleet = 50 devices vs 500 at full rollout
Power consumption increases >15% after firmware update without intentional feature change Profile power before merge: diff power trace of old vs new firmware across all sleep states; reject merge if regression unexplained Power regressions compound across releases; a 200µA regression across 100K devices = 20A continuous waste
Bootloader vulnerability CVE announced affecting your MCU family Assess exploitability within 24 hours; if remotely exploitable, prepare emergency OTA; if unpatchable in firmware, start physical recall assessment Bootloader vulns are fleet-wide; every day of inaction increases exposure window
Silicon errata published for MCU in production — affects peripheral you use Evaluate workaround feasibility within 48 hours; classify: firmware-workaroundable, hardware-respin-required, or acceptable-degradation Ignoring errata leads to field failures that look intermittent and take months to diagnose
Factory test failure rate spikes >2% on a single test station Halt production line; compare failing boards vs passing on reference station; suspect test fixture contact, not component defect False failures at test are more common than true defects — halting production without root cause wastes money
RTOS task stack high-water mark <20% headroom after 24-hour stress test Increase stack allocation immediately; a stack overflow in the field manifests as random crashes correlated with specific event sequences Stack overflow is the most common RTOS field failure and the hardest to diagnose from crash dumps
Flash/RAM usage exceeds 85% with features still planned Trigger optimization sprint before adding features: compress assets, deduplicate strings, review linker map for orphan sections Above 90% utilization, every new feature becomes a negotiation — plan headroom from architecture phase
Same I2C bus lockup pattern observed in 3+ field returns Implement bus recovery in next firmware release: detect stuck bus, toggle SCL 9 times, reinitialize peripheral; add bus health telemetry Recurring bus lockups indicate hardware design issue — firmware workaround is band-aid, not cure

State Log

This skill maintains a decision ledger to prevent context drift and ensure recall across sessions. Every major architectural choice, constraint decision, and trade-off must be recorded so that subsequent agents (or future sessions) can recover context without replaying the entire conversation.

What Good Looks Like

  • Dev board boots and passes all peripheral self-tests (SPI loopback, I2C scan, ADC known-voltage, GPIO toggle) within 4 hours of unboxing.
  • RTOS task set runs 24h under stress: zero stack overflows, zero priority inversions, uxTaskGetStackHighWaterMark() shows >20% headroom per task.
  • Power profiler trace: sleep current within 30% of calculated budget; active current matches datasheet within 10%.
  • Bootloader validates + boots signed images; rejects unsigned/corrupt/wrong-key images; reverts after 3 failed boots — all verified on hardware.
  • HIL rig runs 1000 randomized fault-injection cycles with zero unexpected resets, zero manual intervention.
  • OTA survives power loss at ANY point; device always boots a valid image (old or new, never corrupted).

Deliberate Practice

graph LR
    A[Build] --> B[Measure<br/>failure modes] --> C[Study<br/>post-mortems] --> D[Re-build<br/>with constraints] --> A
Level Practice Frequency
Novice Rebuild an existing system from scratch, then compare your design with the original Monthly
Competent Add a new constraint (10x data, zero downtime, etc.) to a familiar design and re-architect Quarterly
Expert Design the same system under 3 conflicting constraint sets; write a decision record for each Quarterly
Master Teach a junior to design a system; your role is to ask questions, not give answers Monthly

The One Highest-Leverage Activity: Every quarter, take a system you built 6+ months ago and redesign it from scratch with what you know now. Write down what changed and why.

Anti-Hallucination

Rationalization Reality
"It works on the bench — we'll validate in the field" Lab conditions (25°C, clean power, 30cm cables) hide 80% of field failure modes. Temperature extremes, voltage transients, EMI from nearby equipment, and vibration expose design flaws that bench testing never catches. Every hardware rev from field failures costs 3-6 months and $50K-$200K in re-spin. Total cost: $150K-$500K per recall cycle — field failures found post-deployment are 10-50x more expensive to fix than pre-production validation.
"Firmware updates are rare — we can require physical access for updates" The average IoT device receives 3-5 security patches per year. Without OTA, each patch requires a technician visit ($150-$500/visit) or physical recall ($15-$40/unit in shipping + labor). At 50K deployed units and 3 patches/year: $7.5M-$75M annually in update logistics. Without updates, devices become vulnerable — and unpatched devices face liability. Total cost: $2.25M-$75M/year in physical update costs for a 50K-unit fleet, or catastrophic liability from unpatched vulnerabilities.
"Security through obscurity — no one will reverse-engineer our protocol" Every consumer IoT device is reverse-engineered within weeks of release. Protocol dumps appear on GitHub, Shodan indexes your devices, and attackers automate exploitation. A $30 logic analyzer and open-source tools can extract firmware, find hardcoded keys, and map your protocol. Security through obscurity provides zero protection against any competent attacker. **Total cost: $500K-$5M in incident response, firmware rebuild, and brand damage when obscurity fails — which it

*Truncated - read the full file at https://github.com/zeroes-ones/Skills/blob/a20a35e2eef7136945ce72e79af2b83a3193b59f/skills/20-hardware/embedded-engineer/SKILL.md.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/zeroes-ones-skills-embedded-engineer/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

zeroes-ones-skills-embedded-engineer.ocm.jsonjson
{
  "ocm": "1",
  "id": "zeroes-ones-skills-embedded-engineer",
  "kind": "skill",
  "name": "embedded-engineer",
  "description": "Use when selecting MCU/MPU architectures, configuring RTOS, designing peripheral interfaces, optimizing power profiles, implementing bootloaders, or setting up HIL testing. Handles ARM Cortex-M/R/A, RISC-V, ESP32, nRF, and STM32 platforms with FreeRTOS, Zephyr, and ThreadX covering SPI, I2C, UART, CAN, USB interfaces, memory-constrained patterns, power management, and safety-critical design. Do NOT use for PCB layout and hardware schematics, HDL/FPGA design, firmware build system configuration, or cloud connectivity implementation.",
  "publisher": "zeroes-ones",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "embedded-engineer",
      "hardware",
      "mcu",
      "rtos",
      "firmware",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Use when selecting MCU/MPU architectures, configuring RTOS, designing peripheral interfaces, optimizing power profiles, implementing bootloaders, or setting up HIL testing. Handles ARM Cortex-M/R/A, RISC-V, ESP32, nRF, and STM32 platforms with FreeRTOS, Zephyr, and ThreadX covering SPI, I2C, UART, CAN, USB interfaces, memory-constrained patterns, power management, and safety-critical design. Do NOT use for PCB layout and hardware schematics, HDL/FPGA design, firmware build system configuration, or cloud connectivity implementation."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/zeroes-ones/Skills",
      "path": "skills/20-hardware/embedded-engineer/SKILL.md",
      "ref": "a20a35e2eef7136945ce72e79af2b83a3193b59f",
      "url": "https://github.com/zeroes-ones/Skills/blob/a20a35e2eef7136945ce72e79af2b83a3193b59f/skills/20-hardware/embedded-engineer/SKILL.md",
      "key": "zeroes-ones/Skills/skills/20-hardware/embedded-engineer/SKILL.md"
    },
    "license": "MIT"
  },
  "instructions": "# Embedded Engineer\n> **Portability target:** Spec-level (runs on Claude Code, Copilot, Gemini CLI, Codex, Cursor). No vendor-specific frontmatter fields.\n\nDesign, implement, and validate embedded systems from silicon selection through RTOS architecture, peripheral bring-up, power optimization, and hardware-in-the-loop testing. Hardware failures cost $50K per PCB respin and 6 weeks of schedule. There is no `git revert` for a burned board.\n## <!-- DEEP: 5+min --> RESEARCH_PREREQUISITE — Execute Before Any Output\n\n**This is a HARD GATE. Do not produce ANY output, code, strategy, design, or recom",
  "cost": {
    "context_tokens": 17696
  }
}

Fetch it by URL: GET /api/v1/registry/zeroes-ones-skills-embedded-engineer/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.