Structured, observable, compliant firmware — by architecture.
EmbedIQ is an open-source firmware framework for embedded and edge systems. It gives development teams a consistent component model above the RTOS — Functional Blocks, a typed Message Bus, a Streaming Data Plane, explicit state machines, and automatic traceability — where compliance evidence is generated by the architecture itself, not added afterward.
The result: behavior that is reusable, testable, portable, and audit-ready by default, with zero developer instrumentation code required.
RTOS gives primitives, not structure.
Every team rebuilds the application layer differently — callbacks, shared globals, semaphores — under delivery pressure.
Coupling is invisible until it fails.
Direct cross-module calls, shared state, and timing assumptions create hidden dependencies that break under change.
Compliance evidence is retrofitted.
Safety, security, and audit requirements arrive late. Adding traceability after-the-fact is expensive, incomplete, and not verifiable.
A layered architecture. Six layers, two planes.
EmbedIQ is a layered framework. Your product logic sits at the top. Hardware and the operating system sit at the bottom. Between them, four layers each do one job and talk to the layer below only through a fixed interface. Two vertical planes run through the upper layers: the Message Bus carries short control messages; the Streaming Data Plane carries bulk data such as video, audio and firmware images.
Read the picture top to bottom. The sections below walk through it in that order — one layer each, what it is, and what you gain from it. Then the full diagram, with two real scenarios you can play.
Everything you write is a Functional Block.
A Functional Block (FB) does one job: analyse vibration, talk to a customer system, run an AI agent. Every FB is written the same way — it has an inbox, runs on its own thread, owns its data, and wakes only when a message arrives. No FB can call into another FB. This one standard shape is what makes everything below possible.
Each FB declares a safety_class when it registers, and FBs with non-trivial behaviour use a flat, table-driven state machine — states, transitions, guards and actions in one table rather than scattered conditions. Both facts travel with the FB into the trace record you will meet at the engine layer.
FBs communicate on two planes — one for control, one for bulk data.
Short, typed messages — “button pressed”, “temperature 71”, “new firmware available” — travel on the Message Bus. Every message has a fixed type and is at most 64 bytes. An FB subscribes to the message types it cares about; the bus delivers them to its inbox, highest priority first. This is the control plane.
Large, continuous data — a camera frame, a second of audio, a firmware image — would choke that bus. It travels on the Streaming Data Plane: pre-allocated buffers handed over in chunks, never copied. The bus carries only a 19-byte note, MSG_STREAM_CHUNK_READY; the consuming FB reads the chunk directly and releases it. This is the data plane.
Ready-made FBs you do not write.
Because every FB has the same shape, the common ones are built once and shipped with the framework, Apache 2.0. Driver FBs wrap one hardware peripheral each. Service FBs provide a capability — cloud link, identity, firmware update, metrics — with no hardware code inside: they reach hardware only through an ops table the platform registers at boot. You take them as they are and write only the FBs that make your product different.
The engine runs every FB and records every event.
The engine is the same code on every target. It knows every FB (Registry), starts them in a fixed order (Boot Phases), delivers messages to inboxes (Endpoint Router), hands each message to the right handler (Sub-function Dispatcher), runs the table-driven FSM Engine, and moves chunks on the data plane (Streaming Engine). Nothing is allocated after start-up.
Because every interaction passes through the engine, one more component sees all of it: the Observatory. It records each FB lifecycle event, FSM transition, message, chunk event and fault — from the application layer down to OSAL and HAL — automatically. No printf, no instrumentation code in any FB. That record is the .iqtrace file: the debugging tool and the compliance evidence are the same artefact.
Every event is exactly 14 bytes, on every target, enforced at compile time. A buffer of N events is always N × 14 bytes of RAM, and a trace from any device decodes with the same tool.
The first byte says which family the event belongs to — read from its high nibble, no extra field needed:
Events are written to .iqtrace in TLV frames (type–length–value, so older decoders skip types they do not know). Every batch ends with a HASH_CHAIN TLV: a SHA-256 of the batch plus the previous hash. Change one byte anywhere and the chain breaks — tamper-evident, with zero RAM overhead. The format is open, Apache 2.0, and verifiable offline.
Fixed contracts separate every layer.
Each layer talks to the one below it only through a contract: a header-only interface in core/include/, frozen after v1. Think of a contract as a wall with a fixed set of doors — a layer may use the doors; it may never climb the wall. An include that skips a layer is a build error, caught by CI, not a runtime surprise.
Contracts are why a Service FB can be one source file for every chip, why an application FB cannot contain a pin number, and why an AI coding agent has a precise specification to write against instead of a guess.
Pick your chip. Pick your OS — or none.
Two contracts sit at the bottom. The HAL (Hardware Abstraction Layer) is the contract for peripherals — pins, serial, flash, camera, network. The OSAL (OS Abstraction Layer) is the contract for threads, queues, timers and interrupts. Each has one header and several implementations. Swap the implementation; nothing above notices.
Every layer in place — and two real scenarios.
The stack from above, expanded, plus the ecosystem around the device: external FBs in any language through the Bridge, EmbedIQ Cloud, EmbedIQ Studio. Messages run down the left plane, chunks down the right. Hover a layer to focus it. Pick a scenario and press Play — each step lights the layers, the blocks and the plane it uses.
The same layers on a shipping product.
IQ Sense is in production, shared with permission. Two Raspberry Pis, one EmbedIQ. Every chip below is a real Functional Block. Read it against the layers above: application FBs at the top, platform FBs under them, the same engine and contracts on both boards, two substrates. Open-source examples with the same shape: examples/thermostat · examples/gateway · examples/env_monitor.
Sensor node Raspberry Pi Zero 2W · POSIX
Gateway Raspberry Pi 4 · POSIX
What EmbedIQ delivers by default
Safety and compliance evidence in traditional firmware is retrofitted at the end of a project. In EmbedIQ, the structured component model is the evidence generator. Every FB lifecycle event, every message, every FSM transition, every fault is captured in a tamper-evident, hash-chained audit record — not because a developer remembered to log it, but because the architecture produces nothing else.
What EmbedIQ claims, and does not. EmbedIQ is a framework that enables compliance — it is not itself a certified product. No certification body has assessed EmbedIQ. What follows is an honest map of which standard requirements the architecture is designed to support, the levels currently targeted, and the levels that are explicitly out of scope. The certification of any system built on EmbedIQ is the responsibility of that system's owner.
Deterministic Execution Trace
The complete causal chain — from hardware interrupt through driver FB, message bus, application FSM, to output — is in the .iqtrace file. Timestamped, sequenced, verifiable. Supports IEC 61508 / ISO 26262 behavioral evidence requirements.
Tamper-Evident Audit Trail
HASH_CHAIN TLV links every event record to the previous one. A single altered record breaks the chain. ECDSA-P256 session signing (Phase 3) adds device-level non-repudiation. The .iqtrace format is open, Apache 2.0, usable offline.
Explicit FSM per Component
Every FB with non-trivial behavior uses a flat, table-driven FSM. States, transitions, guards, and actions are visible in one place — not scattered conditional logic. FSM transitions are auto-captured by Observatory. Directly satisfies IEC 61508 "structured programming" requirements.
Zero Shared State
FBs do not share globals or call each other directly. The typed Message Bus is the only inter-component boundary. This is a compile-time enforced rule. Eliminates an entire class of safety-relevant coupling failures.
Layer Contracts
Compile-time enforced boundaries between Application, Service, Driver, HAL, and OSAL layers. Layer swaps (RTOS migration, hardware platform change) do not break application code. Contract violations are build errors, not runtime surprises.
safety_class per Function Block
Every FB declares a safety classification at registration. AI-authored code in safety-classified FBs triggers a mandatory human security review gate at CI. The classification is captured in every Observatory session record and in the CycloneDX SBOM.
MISRA C:2023 Advisory
Core headers (core/include/) are written to MISRA C:2023 advisory compliance: no implicit integer conversions, no VLAs, no dynamic allocation in framework code, no recursion in the engine, default cases on all switches. Project-level enforcement via Cppcheck, LDRA, or PC-lint Plus is the application's choice — the architectural properties keep findings low.
SBOM — CycloneDX + SPDX
CycloneDX v1.5 is the primary SBOM format — lists every FB with safety_class, vendored libraries, and license IDs. SPDX 2.3 supported via Protobom translation. ML-BOM extension for AI-using FBs satisfies EU AI Act Annex IV technical-documentation requirements. Required by EU CRA, recommended by NIST SSDF.
EU AI Act Logging
AI inference events live today in the SYSTEM band: AI_INFERENCE_START (0x17), AI_INFERENCE_END (0x18), AI_CONFIDENCE_THRESHOLD (0x1A) — supports Art.12 logging and Art.13 explainability. The dedicated fb_compliance_log Service FB (Apache 2.0, on the open-source roadmap) consolidates inference invocations, input hashes, and output decisions into a tamper-evident audit trail.
| Standard / Requirement | How EmbedIQ Addresses It | Mechanism | Status |
|---|---|---|---|
| IEC 61508 — Functional Safety Behavioural evidence, structured programming |
Deterministic .iqtrace of every FB lifecycle + FSM transition. Explicit flat FSMs replace scattered conditionals. Zero shared state by architecture. Targeted: SIL 1, SIL 2. SIL 3/4 not targeted (requires formal verification toolchain beyond EmbedIQ's scope). | Observatory · FSM engine · .iqtrace | SIL 1 / 2 |
| ISO 26262 — Automotive Safety ASIL-relevant traceability |
Same .iqtrace evidence foundation as IEC 61508. Layer contracts enforce architectural separation of concerns. safety_class field per FB enables ASIL tracking. Targeted: ASIL A, ASIL B. ASIL C/D not targeted (requires AUTOSAR binding outside v1 scope). | safety_class · layer contracts · .iqtrace | ASIL A / B |
| IEC 62443 — Industrial Cybersecurity Security event logging, credential isolation |
SECURITY_INCIDENT (0x61) and AUTH_EVENT (0x62) Observatory events on every policy violation. HASH_CHAIN tamper-evident log satisfies SL 1/2 audit-log requirements today. Targeted: SL 1, SL 2. SL 3+ requires per-event device signing, addressed by TRACE_SIGNATURE TLV in Phase 3. | SEC track · obs events · HASH_CHAIN | SL 1 / 2 |
| MISRA C:2023 Code quality stance for safety-critical C |
Core headers are written to MISRA C:2023 advisory compliance — no implicit conversions, no VLAs, no dynamic allocation in framework code, no recursion in the engine, default cases on all switches. Per-project enforcement (Cppcheck / LDRA / PC-lint Plus) is the application's choice; framework architecture keeps findings low. | core/include/ · CODING_RULES.md | Advisory |
| DO-178C — Avionics Software Structural coverage, trace evidence |
FB component isolation enables MC/DC coverage measurement per unit. .iqtrace provides requirements-to-runtime trace evidence. Explicit FSMs make structural coverage analysis tractable. Targeted: DAL C, DAL D. DAL A/B not targeted (formal methods + full MC/DC tooling outside scope). | FB isolation · .iqtrace · FSM tables | DAL C / D |
| EU AI Act AI decision audit trail, logging |
AI inference events live in SYSTEM band today: AI_INFERENCE_START (0x17), AI_INFERENCE_END (0x18), AI_CONFIDENCE_THRESHOLD (0x1A) — supports Art.12 logging and Art.13 explainability. fb_compliance_log Service FB consolidates these into a dedicated audit trail (Apache 2.0, on roadmap). | SYSTEM band events · fb_compliance_log | Phase 1 live |
| CycloneDX SBOM Software supply chain transparency |
CycloneDX v1.5 is the primary SBOM format. SPDX 2.3 supported via Protobom translation. Lists every FB with safety_class, vendored third-party libraries, license IDs. ML-BOM extension for AI-using FBs. Required by EU CRA; recommended by NIST SSDF. | CycloneDX v1.5 · SPDX 2.3 · ML-BOM | Available |
| Tamper-Evident Trace Signing Non-repudiable audit record |
Tier 1 — SHA-256 HASH_CHAIN TLV (0x0005) links every event batch to the previous one, on every device, zero RAM overhead — available today. Tier 2 — TRACE_SIGNATURE TLV (0x0009) adds device-key-signed non-repudiation for SL 3+ environments; format reserved, signing infrastructure ships in Phase 3 (P2-SIGN-01 through 05). | HASH_CHAIN TLV · TRACE_SIGNATURE TLV | Tier 1 live · Tier 2 P3 |
Greenfield · EmbedIQ Agent · Offline Ingest
EmbedIQ is designed for new firmware where the full framework is adopted from day one. For teams with existing deployed systems, two additional paths bring .iqtrace observability without a full rewrite. All three produce the same open .iqtrace format — but with explicit, encoded trust levels so every downstream tool knows exactly how much confidence to place in each event. Greenfield is shipping today; the EmbedIQ Agent (brownfield) and Offline Ingest are on the open-source roadmap.
Full EmbedIQ Framework
Adopt EmbedIQ from the start. The framework generates .iqtrace automatically. Every event is deterministic, framework-verified, and structurally correct by construction.
EmbedIQ Agent
An open-source Linux daemon that attaches to any existing system — no framework adoption, no code changes required. Captures live events and writes verifiable, real-time .iqtrace.
Upload Any Log File
Upload an existing log file from any system. The open-source ingestion library (published by Studio team) converts it to .iqtrace for exploration, debugging, and migration evaluation.
Architecture choices and what they solve
| Architecture Choice | Problem Solved | Effect |
|---|---|---|
| Functional Blocks FB per concern |
Rebuild · Coupling | Each concern owns its state. No shared globals. Independently testable. safety_class declared at registration. |
| Typed Message Bus async · schema-enforced |
Coupling · Compliance | All inter-component interaction is observable, schema-validated, hash-chained, and replayable. Every message is evidence. |
| Streaming Data Plane chunks · zero-copy · backpressure |
Bulk data stalling control | Video, audio and firmware images never touch the control bus. A slow consumer throttles its source, not the system. One mechanism for every bulk source — camera, cloud download, or phone over Bluetooth. |
| Flat FSMs table-driven · auto-traced |
Coupling · Safety evidence | Non-trivial behavior is an explicit table. FSM transitions are auto-captured in Observatory. IEC 61508 "structured programming" satisfied. |
| Service FBs ops tables · one source, every chip |
Rebuild · Portability | Cloud link, identity, OTA and metrics written once and run on every chip. The platform supplies the ops table; the FB never includes a hardware header. |
| Layer Contracts HAL · OSAL · Message |
Rebuild · Portability | RTOS, HAL, libraries, and application code evolve independently. Contract violations are compile errors. |
| Observatory zero dev code |
Compliance · Debugging | Runtime behavior captured by the framework — not by developer memory or printf discipline. Compliance evidence as a by-product of operation. |
| Open .iqtrace Apache 2.0 · TLV · HASH_CHAIN |
Evidence portability | The audit format is open, portable, and usable outside commercial tooling. Trust levels and provenance encoded per-event. Offline verifiable. |
| OSAL + HAL Observation XOBS-1 · XOBS-2 |
Cross-layer root cause | OSAL faults (0x66) and HAL faults (0x67) captured at abstraction boundaries. Root causes below the FB layer are visible — not just symptoms at the application layer. |
How the ecosystem stays trustworthy
The trust and data layer is Apache 2.0 — permanently open. Developers, ecosystems, and regulators can inspect, adopt, and extend it without commercial dependency. The commercial layer turns open trace data into understanding, workflow, and compliance evidence packages.
Apache 2.0 Open Foundation
The runtime, trace format, CLI, and brownfield tooling are permanently open. The principle: the trust layer has to be open for ecosystem adoption — anything else turns the audit record into a vendor dependency.
- EmbedIQ core runtime and framework engine — available
- Observatory runtime — auto-capture, buffer, flush, HASH_CHAIN — available
- Open .iqtrace format specification (v1.1) — available
- All Driver FBs and Service FBs, including fb_cloud_mqtt, fb_ota, fb_provisioning, fb_secure_boot, fb_fleet_diag, fb_compliance_log
- embediq obs CLI — decode, stats, filter, export, tail — available
- Project-management CLI (init, add, build) — roadmap
- EmbedIQ Agent (Brownfield Sidecar, Mode A) — roadmap
- Log ingestion library + integrity / validation / provenance CLI — roadmap
EmbedIQ Studio — Intelligence Layer
Commercial. Turns open .iqtrace data into visual analysis, AI-assisted diagnosis, and compliance evidence packages. Does not own or restrict the .iqtrace format or data.
- Visual timeline replay and cross-layer correlation
- AI-assisted failure diagnosis and anomaly detection
- Cross-run and cross-subsystem diff analysis
- Code / requirement / test / trace gap analysis
- Compliance evidence package generation (IEC 61508, ISO 26262)
- Team collaboration and domain knowledge packs
- Fleet analytics — .iqtrace stream join across N devices
One binary, two command families
The embediq CLI covers the full developer workflow. "git for behaviour + grep for execution + top for embedded events" — the open-source developer interface to the .iqtrace ecosystem before Studio is needed. Console output throughout, CI-pipeline friendly. Available today: the embediq obs family — decode, stats, filter, export, tail. The remaining commands ship across Phase 2 (project management + brownfield) and Phase 3 (hardware flash/monitor).
Firmware Commands
Trace + Brownfield Commands
Fixed contracts are what make AI a reliable coding partner
An AI coding agent — or a new engineer — fails for one reason: it fills gaps with assumptions. EmbedIQ leaves few gaps. The contracts say exactly what an FB may call. messages.iq says exactly what a message contains. CODING_RULES.md and AGENTS.md state every rule with an ID, and CI enforces them on every pull request. The agent writes against a precise specification, and the build says when it is wrong — before a human reads the code.
Why this exists
Embedded teams already have RTOSes, drivers, libraries, and cloud platforms. What remains underspecified is the application behavior layer: how product logic is composed, how components interact, how state changes, and how runtime behavior becomes auditable evidence.
EmbedIQ fixes that layer by making structure explicit — Function Blocks, typed messages, layer contracts, flat FSMs, and Observatory traces. The result is not only better debugging. It is a foundation for portability, reuse, safety evidence, compliance, and AI-assisted development.
EmbedIQ standardizes application behavior above them — and makes every behavioral decision a traceable, auditable, open record.