EmbedIQ · Architecture & Compliance Overview

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.

Apache 2.0 POSIX / Linux Zephyr Path FreeRTOS Tested Open .iqtrace MISRA C:2023 Advisory IQ Sense · Production
The Problem, First Principles
1

RTOS gives primitives, not structure.
Every team rebuilds the application layer differently — callbacks, shared globals, semaphores — under delivery pressure.

2

Coupling is invisible until it fails.
Direct cross-module calls, shared state, and timing assumptions create hidden dependencies that break under change.

3

Compliance evidence is retrofitted.
Safety, security, and audit requirements arrive late. Adding traceability after-the-fact is expensive, incomplete, and not verifiable.

The Architecture · Overview

A layered architecture. Six layers, two planes.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

Top
Application Functional BlocksWhat makes your product yours.
Then
Platform Functional BlocksDrivers and services that ship with EmbedIQ.
Then
Framework EngineRuns every FB, delivers every message, records everything.
Bottom
Contracts · HAL · OSAL · HardwareFixed interfaces; swappable chips and operating systems.
1
Layer · Application Functional Blocks

Everything you write is a Functional Block.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

fb_vibration_monitorVibration AnalysisFFT · alert FSM
fb_ext_rlipsCustomer GatewayRLIPS protocol
fb_ext_cloudCloud BridgeMQTT upstream
fb_ext_ai_agentAI Agentlocal inference
Real application FBs from the IQ Sense deployment (shared with permission). Contract: core/include/embediq_fb.h · state machines: embediq_sm.h · tutorial: docs/FIRST_FB.md
2
The two planes · how FBs communicate

FBs communicate on two planes — one for control, one for bulk data.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

Message Bus
CONTROL PLANE · TYPED · ≤ 64 BYTES · 3 PRIORITY QUEUES
Commands, status, events, configuration. One-way, asynchronous, schema-enforced. Message types are declared once in messages.iq and generated into C — no hand-written payload structs, no ID collisions.
Streaming Data Plane
DATA PLANE · CHUNKS · ZERO-COPY · BACKPRESSURE
8 KB8 KB
Video, audio, sensor bursts, firmware images. A source can be a camera, a microphone, a download from the cloud, or a file arriving from a phone over Bluetooth. The consuming FB does not know or care which. When it falls behind it says so, and the source slows down.
THE INVARIANT: THE MESSAGE BUS NEVER CARRIES BULK DATA. ANYTHING OVER 64 BYTES RIDES THE DATA PLANE.
Contracts: embediq_bus.h · embediq_msg.h · embediq_stream.h · hal/hal_stream.h
3
Layer · Platform Functional Blocks

Ready-made FBs you do not write.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

fb_gpioPins
fb_uartSerial
fb_nvmStorage
fb_cam_driverCamera
fb_cloud_mqttCloud LinkMQTT over TLS
fb_provisioningIdentitycerts · first boot
fb_otaFirmware Updatetransport-blind
fb_telemetryMetricsgauges · counters
What you gain
ReusabilityCloud link, identity, firmware update, metrics — solved once, used by every product, independently testable.
What you gain
PortabilityA Service FB never includes a hardware header. The same fb_ota.c runs on a Raspberry Pi, an ESP32 and an STM32.
Rule: an FB that touches hardware or OS drivers directly is a Driver FB; one that reaches hardware only through an ops table is a Service FB. Sources: fbs/drivers/ · fbs/services/
4
Layer · Framework Engine

The engine runs every FB and records every event.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

Registryevery FB
Boot Phasesfixed order
Endpoint Routerdelivers messages
Sub-fn Dispatchercalls handlers
FSM Enginetable-driven
Streaming Enginemoves chunks
Observatory — what one event looks like

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.

event_type1 B
source_fb1 B
target_fb1 B
state/flag1 B
msg_id2 B
timestamp_us4 B
sequence4 B

The first byte says which family the event belongs to — read from its high nibble, no extra field needed:

0x1x SYSTEMboot, shutdown, OTA, config, AI inference start / end
0x2x MESSAGEmessage sent, received, queue drop
0x3x STATEFB lifecycle, FSM transition
0x6x FAULTfault, security incident, auth event, OSAL fault, HAL fault

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.

What you gain
Observability by constructionOne-way messaging means one tap point sees the whole system, including faults below the FB layer. Replay a field failure on a laptop with embediq obs decode.
What you gain
Evidence as a by-productThe same file is the audit trail: deterministic, sequenced, hash-chained — produced whether or not anyone remembered to log.
Contract: embediq_obs.h · format: docs/observability/iqtrace_format.md · CLI: tools/embediq_obs/
5
Layer · Contracts

Fixed contracts separate every layer.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

What you gain
Portability, enforcedAn Application FB must compile and run on Pi, ESP32 and STM32 without a single change. Violations are compile errors.
What you gain
Independent evolutionRTOS, HAL, libraries and application code change on their own schedules. Nothing above a contract notices a change below it.
Headers: embediq_fb.h · embediq_bus.h · embediq_msg.h · embediq_sm.h · embediq_stream.h · embediq_obs.h · embediq_ota.h · embediq_mqtt.h · hal/hal_*.h · embediq_osal.h · check: tools/boundary_checker.py
6
Layer · HAL and OSAL

Pick your chip. Pick your OS — or none.

Message Bus
Application Functional Blocksyour product logic
Platform Functional BlocksDriver FBs and Service FBs
Framework Engineruns FBs · delivers messages · Observatory
Contractsfixed header interfaces
HAL · OSALperipherals · threads, queues, timers
Hardware and OSPi · ESP32 · STM32 · Linux · FreeRTOS · bare metal
Data Plane

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.

hal/posix/Linux · Raspberry PiV4L2 · ALSA · sockets
hal/esp32/ESP32I2S · WiFi · OTA partitions
hal/stm32/STM32DCMI · DMA · dual-bank flash
hal/sim/Simulationno hardware · CI
osal/posix/Linux
osal/freertos/FreeRTOS
osal/zephyr/Zephyr
bare-metalNo OS
What you gain
Plug-in hardware and OSOne contract, many implementations. Moving a product from a Pi to an STM32 changes the HAL directory, not the product.
What you gain
TestabilityThe simulation HAL and the POSIX OSAL run the whole stack on a laptop and in CI. Hardware is the last thing you need, not the first.
Contracts: core/include/hal/hal_*.h · core/include/embediq_osal.h · implementations: hal/ · osal/
7
The whole picture · then watch it run

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.

Ecosystem
Around the device
Application
Your FBs
Platform
Driver + Service FBs
Engine
Framework Engine
Contracts
core/include/
HAL · OSAL
Chip · OS
Substrate
Hardware + OS
Ecosystembest-effort · never blocks the bus
Bridge + External FBsPython · Node · any language
EmbedIQ Cloudfleet · OTA · telemetry
EmbedIQ Studiotrace viewer · AI diagnosis
Application Functional Blockssmart-glasses example
Camera Relay
Voice Capture
Expert Overlay
Indoor Position
Platform Functional Blocksship with EmbedIQ · Apache 2.0
fb_cam_driver
fb_gpio
fb_cloud_mqtt
fb_ota
fb_telemetry
Framework Enginesame code on every target
Registry
Router
Dispatcher
FSM Engine
Streaming Engine
Observatory
Contractsheader-only · frozen post-v1 · CI-enforced
embediq_fb.h · embediq_bus.h · embediq_msg.h · embediq_sm.h · embediq_stream.h · embediq_obs.h · embediq_ota.h · embediq_mqtt.h · hal/hal_*.h · embediq_osal.h
HAL · OSALone contract each · many implementations
hal/posix
hal/esp32 · stm32 · sim
osal/posix
osal/freertos · zephyr
Hardware + OSLinux · FreeRTOS · Zephyr · bare-metal MCU
WiFi / BLE radio
Camera sensor
Flash
Pins · UART
Message Bus
Data Plane
Scenario
Press Play, or click any step. Play becomes Pause while running.
    8
    Real Client Deployment — IQ Sense Condition Monitoring System

    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

    Application FB
    fb_vibration_monitorVibration AnalysisFFT · alert FSM
    Platform FBs — Driver
    fb_drv_adxl3453-axis vibrationSPI
    fb_drv_ds18b20Temperature1-Wire · ±0.5 °C
    fb_drv_ads1115Current (CT)I²C · SCT-013
    fb_drv_mqttLink to gatewayMQTT
    Platform FBs — Service
    fb_telemetry_bufferBuffer · batch · retry
    fb_trace_svcObservatory flush.iqtrace · hash chain

    Gateway Raspberry Pi 4 · POSIX

    Application FBs
    fb_ext_rlipsCustomer gatewayRLIPS · local IP
    fb_ext_cloudCloud bridgeMQTT upstream
    fb_ext_ai_agentAI agentlocal inference
    Platform FBs — Service
    fb_health_monitorWatchdog · fault track
    fb_config_mgrconfig.iq · NVSvalidated · integrity-checked
    Substrate
    Mosquitto broker
    RLIPS interface
    Cloud · Studio
    Functional Block (FB)one job, one thread, one inbox. Application, Driver or Service. (Repo: Application = app layer; Driver + Service = Layer 2.)
    Message Bus · Streaming Data Planecontrol plane ≤ 64 B typed messages · data plane chunks, zero-copy, backpressure.
    Framework Engine · ObservatoryLayer 1 in the repo. Registry, router, dispatcher, FSM engine, streaming engine, and the 14-byte event record.
    Contracta frozen header in core/include/. The only way one layer may use another.
    HAL · OSALcontracts for peripherals and for the OS; one implementation per chip family or OS.
    ops tablefunction pointers the platform registers at boot — how a Service FB reaches hardware.
    Compliance by Architecture, Not Afterthought

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Built into the Framework

    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.

    Phase-1 Events Live · FB on Roadmap

    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
    Compliance is not a feature added at the end. It is a property of the architecture itself. When every component interaction crosses a typed, observable boundary — the audit record is the by-product of correct operation, not a separate system.
    Three Paths to Structured Observability

    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.

    Path A — Greenfield
    Highest Trust · Native

    Full EmbedIQ Framework

    Adopt EmbedIQ from the start. The framework generates .iqtrace automatically. Every event is deterministic, framework-verified, and structurally correct by construction.

    Complete .iqtrace from day one — zero developer instrumentation code
    All compliance foundations built in: FSMs, layer contracts, safety_class, HASH_CHAIN
    Every FB, every message, every state transition automatically captured
    OSAL and HAL fault events captured at abstraction boundaries
    Portable across Linux/POSIX, FreeRTOS, Zephyr — same source code
    source=native confidence=high origin=runtime
    Path B — Brownfield Agent
    High Trust · Agent-Captured

    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.

    Runs alongside existing Linux / edge systems — zero code changes (Mode A)
    Reads journald, Unix sockets, syslog — normalises to .iqtrace in real time
    Every event tagged source=agent, confidence=high, sequence-integrity enforced
    Optional Mode B: in-process C library (iq_agent_emit) for higher trust, requires code instrumentation
    Enables Observatory-compatible traceability on deployed systems before full adoption
    source=agent confidence=high origin=runtime
    Path C — Offline Ingest
    Exploratory · Low Trust

    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.

    Accepts any structured log — syslog, journald export, custom text formats, CSV
    YAML adapter configuration describes the mapping to .iqtrace events
    All converted events explicitly marked source=converted, confidence=low
    Useful for evaluating EmbedIQ Studio before committing to brownfield deployment
    Trust provenance always visible — Studio never mixes trust levels silently in compliance exports
    source=converted confidence=low origin=log
    We separate what the system knows from what tools infer. Structured runtime trace is the ground truth. Analysis adds interpretation — with provenance so every insight carries its source and confidence level, visible to any compliance auditor.
    Design → Effect

    Architecture choices and what they solve

    Architecture ChoiceProblem SolvedEffect
    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.
    Open Trust Layer + Commercial Insight 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
    CLI Tooling

    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

    init add build flash monitor obs

    Trace + Brownfield Commands

    ingest validate provenance filter timeline diff stats integrity export tail
    AI-First by Construction

    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.

    For the agent
    Less to assumeOne FB shape, generated payloads, named rules. The agent reads ARCHITECTURE.md and AGENTS.md first, then writes code CI can judge.
    For the human
    Less to carry in your headYou review against the same rules the build enforces. The architecture holds the context, not memory — so human error has fewer places to hide.
    For the record
    AI provenance in the traceAn AI_CODER_SESSION TLV (0x0008) records which FB an assistant modified and whether its safety_class review passed. AI-authored changes to safety-classified FBs cannot merge without a human gate.
    For the device
    AI behaviour in the traceInference start, end and confidence events sit in the SYSTEM band of every .iqtrace — the same record auditors already read.
    In the repo: ARCHITECTURE.md · CODING_RULES.md · AGENTS.md · docs/architecture/AI_FIRST_ARCHITECTURE.md · tools/ci/
    The Short Version

    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.

    RTOS standardizes execution primitives.
    EmbedIQ standardizes application behavior above them — and makes every behavioral decision a traceable, auditable, open record.