WritingGuide

Embedded systems development: a systems discipline

Embedded systems development is a system architecture discipline, not a firmware-writing one. How the layers fit together, and why most teams get the boundary wrong.

NOVAFlex station: a cobot with a multi-tube gripper, a vision camera, an operator touchscreen and an emergency stop
A NOVAFlex station from NovaticLab, where Karlis was CTO and CCO from 2023 to 2024. Arm motion, machine vision, the operator touchscreen and the emergency stop each sit on a different layer, and the layers had to be designed to work together.

Many embedded programs that stall do not have a firmware problem. They have an architecture problem surfacing as firmware pain. The symptoms look like firmware (timing jitter, OTA that bricks units, watchdog resets under load, a codebase forked across three SKUs) but the root cause is upstream. Somebody decided which processor owned which responsibility, where the real-time boundary lived, and how the mechanical, electrical, firmware, application, and cloud layers would negotiate. Those decisions were made implicitly, by whichever engineer was in front of a whiteboard first, and the team has been paying interest on them ever since.

Embedded systems development, done well, is a systems architecture discipline. It decides where behavior lives, which deadlines are physics-bound, what is allowed to fail and how, and how a unit shipping today will still be buildable and updateable in five years. The firmware is the artifact. It is not the discipline.

Embedded systems development is not the act of writing firmware for a chosen MCU. It is the act of deciding which chip does what, where the hard-real-time boundary lives, how the layers above and below it negotiate, and what the product still looks like three revisions and five years from now. Get the architecture right and the firmware is plumbing. Get it wrong and no amount of firmware talent unsticks the program.

Embedded systems development is not firmware development

Most written material on embedded development reads like a vendor tutorial. Choose a microcontroller. Install a toolchain. Write a HAL. Blink an LED. Useful the first time an engineer opens a datasheet; nearly useless as a description of what embedded development actually is when the product has to ship at scale, certify in multiple jurisdictions, survive a decade in the field, and share behavior with a backend, a mobile app, and a factory provisioning line.

Firmware development is writing and debugging code that runs on an embedded target. It is necessary. It is also downstream of every interesting decision.

AimRobotics AIM-U1-R4 controller boards with a TMC5130A motor driver, a smaller Atmel chip, USB-C and a large capacitor
Fig. 1 AIM-U1-R4 controller boards from AimRobotics, where Karlis was CTO and co-founder. Which chips go on a board like this, and what each is responsible for, is decided before any firmware is written.

Embedded systems development is the act of deciding:

  • Which processor class is in the product, and why: M0 for a sensor node because power budget dominates, M4 or M7 for real-time control because DSP throughput and deterministic interrupt latency dominate, an A-series SoC running Linux for the supervisory layer.
  • Whether there is one processor or two, and what the boundary between them carries: a fieldbus, a shared memory region, a signed IPC channel, a hardware interlock.
  • What runs bare-metal, what runs on an RTOS, what runs on Linux, and why those choices are not interchangeable.
  • Where the real-time deadlines live, how tight they are, and what happens when they are missed.
  • How the device, the cloud, the manufacturing tooling, and the test fixtures share a single view of identity, configuration, and firmware.
  • What the product does when a component goes end-of-life in year four, when a CVE drops against the TLS library in year six, when a unit has run for nine years uninterrupted.

A firmware engineer who has not been asked these questions will answer them anyway, implicitly, in the shape of the code they write. The answers will be local. Locally correct, globally wrong, because local optimization across layers is how embedded products fail in production. This is the Phase 1 work that From Prototype to Production pivots on: architecture decisions made before the first line of firmware determine whether the product becomes a fleet or stays a demonstration.

Aerones Crawler Gen 3: internal blade inspection robot with LiDAR, cameras and an LED system
Fig. 2 Aerones Crawler Gen 3, from Karlis's 2025 salaried role at Aerones. Chassis, sensors, electronics and software ship as one product, and each layer commits the others to something. Image: Aerones.

The layers most teams conflate

An embedded product is five concurrent disciplines, each making commitments the others have to honor. Easy to name, hard to keep separate under schedule pressure.

01MechanicalEnclosure, thermal path, ingress, vibration, connectors
02ElectricalPower tree, MCU class, sensors, analog front end, EMC
03FirmwareBare-metal / RTOS, ISRs, DMA, control loops, drivers
04ApplicationLinux, state machines, UI, fleet logic, protocols
05CloudTelemetry, OTA, identity, fleet ops, backend

Five layers. Each makes commitments the others must honor.

The mechanical layer pins the thermal envelope, the vibration profile, the ingress spec. The electrical layer picks processor class, sensor topology, power tree, and analog front-end inside those constraints: an MCU choice is not a firmware choice but a decision about deterministic interrupt latency, DSP throughput, peripheral set, package availability in ten years, second-source availability, and whether secure boot and a hardware root of trust are on the die. The firmware layer owns the boundaries between ISR and task context, DMA-driven and CPU-driven paths, bare-metal regions and RTOS-scheduled regions. The application layer, typically Linux on an A-series SoC, owns supervisory behavior: state machines that span seconds to hours, UI, fleet protocols, cloud connectivity, logging, diagnostics. The cloud layer owns fleet identity, OTA distribution, telemetry ingestion, remote diagnostics. It is not optional on a connected product; its shape is decided by what the device can emit, authenticate, and receive.

The failure mode we see most often is a firmware-first team treating the other four layers as fixed boundary conditions around the code they own. They are not fixed. They are co-decided, and the interesting architecture work happens at the negotiation between two adjacent layers.

Mockup of an on-device dashboard in dark mode with two camera tiles, an upload queue, uplink health and SoC temperature
Fig. 3 A mockup of the on-device dashboard from null2.one's rally streaming prototype: camera tiles, upload queue, uplink health and SoC temperature on one screen. The application layer can only show what the firmware, the modems and the thermal design actually report.
Firmware-first mindset
Systems-first mindset
“Pick the MCU, then write the firmware.”
“Decide which deadlines are physics-bound, then pick the MCU that honors them.”
HAL is an abstraction over peripherals.
HAL is a contract between firmware, DFT, factory provisioning, and OTA.
OTA is “flash the binary over the network.”
OTA is a partition strategy, signature chain, rollback policy, and fleet policy.
Real-time means “fast.”
Real-time means “deadline, jitter bound, and what happens if we miss it.”
The cloud talks to the device.
Device, factory, cloud, and test rig share one identity model.
Variants are handled with ifdefs.
Variants are a BSP boundary with a single application codebase above it.

Where the real-time boundary actually lives

“Real-time” is the most abused term in embedded development. It gets used to mean “fast,” “responsive,” “we use an RTOS.” None of these are the definition. Real-time means the system has a deadline, the deadline is bounded, and missing the deadline is either a failure or has a known, acceptable consequence.

The interesting question is not “is this real-time.” It is “which behaviors are on a physics-bound clock and which are not.” That boundary is the most important architectural line in the product. Most teams draw it in the wrong place and do not realize they drew it at all.

A motor control loop: PWM updates must land inside a fixed window relative to commutation phase, or the motor loses torque, draws excess current, heats, and destroys itself or its driver. Deadline in microseconds, no acceptable miss rate. The controller must have deterministic interrupt latency, a known worst-case ISR path, and nothing above it allowed to preempt it. Hard real-time.

AimRobotics dispenser mounted on a Universal Robots cobot in an industrial facility
Fig. 4 An AimRobotics dispenser on a cobot. Motor drive and RS485 sat on the tool's own PCBA, so the physics-bound loop lived next to the motor and the robot talked to it over a bus.

A UI update showing motor temperature: deadline is “before the operator notices staleness”, hundreds of milliseconds. Miss consequence is mild. The control loop does not care if the screen is late. This is not real-time at all. It is supervisory.

A single MCU can sometimes host both. It can also fail to, subtly. A UI framework, a network stack, a logging subsystem, or a filesystem on the same processor as a hard real-time loop will eventually steal cache lines, take interrupts, block on memory, and introduce jitter the control loop cannot tolerate. The motor will be fine most of the time. Not on the run where the network stack handles a DHCP renewal while the UI redraws a chart.

Three viable architectures, and the choice is not stylistic:

  1. One processor, bare-metal or thin RTOS. Works when the full supervisory surface is small. Good for deeply embedded devices with minimal UI and no cloud.
  2. One processor, dual-context. A hard-real-time region (ISR, DMA, tight loops) plus an RTOS scheduling the rest. Workable on M4/M7-class MCUs when the supervisory layer is modest. Requires strict discipline about what runs where and what preempts what.
  3. Two processors. A dedicated real-time MCU handling physics-bound loops; a separate supervisory processor (Linux SoC or higher-end MCU) handling UI, connectivity, state; connected by an industrial-grade bus with deterministic timing. This is where most serious industrial, robotics, and power-electronics products converge.

The third pattern is where a product usually ends up when it started on a consumer single-board computer and then had to survive a fleet in the field. When Raspberry Pi Strands Production walks through one such migration, from Raspberry Pi boards to industrial controllers on robots that work at height, and how to decide the split before it has to be done under pressure.

Fig. 5 IllustrativeThe three viable architectures side by side: what shares a processor with the physics-bound loops, and where each one fits

The hard-real-time / supervisory split (and why to care)

Every embedded product above a certain complexity benefits from drawing this split explicitly. Even products that do not need two physical processors benefit from the logical separation.

The hard-real-time side owns behaviors whose deadlines come from physics: motor commutation, power-stage switching, PFC control, safety interlocks and e-stop handling, sensor sampling where aliasing matters, closed-loop control (PID, MPC) running at kilohertz or above, fieldbus cycle participation (EtherCAT, Profinet IRT, CANopen sync).

The supervisory side owns behaviors whose deadlines come from humans, networks, or business logic: mission planning and sequencing, UI and audio, connectivity (LTE, Wi-Fi, Starlink), telemetry aggregation, OTA orchestration, diagnostic flows, configuration and identity.

Three design rules follow:

Asymmetric trust. The supervisory side can ask the real-time side to do things. It cannot override safety decisions the real-time side makes. If the real-time side declares an interlock, no supervisory command unlatches it without an explicit operator action routed through a hardware-enforced path. “Safety-critical” is not a label on a function; it is a constraint on who can tell whom what.

Deterministic interface. The link between the two sides (a fieldbus, shared memory or a dedicated SPI link) has a defined cycle time, a defined worst-case latency, and a defined behavior on link loss. The last is skipped most often and causes the most expensive failures.

Graceful degradation, layered. When the supervisory side crashes or goes unreachable, the real-time side continues the physics-bound work and enters a safe holding state. When the real-time side declares a fault, the supervisory side reports it and does not attempt to work around it. A robot working at height whose satellite link drops for a minute should hold a safe state on its own, because its real-time controller is not waiting on the cloud.

Fig. 6 IllustrativeThe split drawn explicitly: physics-bound work on one side, supervisory work on the other, and a link with a defined cycle time, latency and link-loss behavior between them. Requests flow one way; state, faults and interlocks flow back.

A life-safety UPS is the same split in a different product class. Control of the power conversion stage and the transfer to battery when mains fails belong on the real-time side, decided locally in a time measured in milliseconds. UI, LTE monitoring, diagnostics and fleet reporting belong on the application side, which learns about a transfer after it has happened. Nothing in a transfer waits on the network. This is the architecture of the new UPS products we are engineering for Marconi Technologies: real-time control loops for power conversion, an application layer for UI, communications and diagnostics, and one firmware codebase across power ratings. The first platform is going to Intertek for evaluation to UL 1778 and UL 864; it is not yet listed.

UPS prototype in a 19-inch rack cabinet: front panel with AC in, DC in and AC out breakers, battery blocks below
Fig. 7 The Marconi Technologies UPS prototype in its rack. Transfer to battery is decided locally on the real-time side; the application side reports it afterwards. The platform is in pre-certification and not yet listed.

Device software, cloud, manufacturing tooling, test: one architecture

The second most common embedded architecture mistake, after misplacing the real-time boundary, is treating the device, the cloud, the manufacturing line, and the test infrastructure as separate projects. They are not. They share identity, configuration, and firmware. An architecture that does not recognize this produces a product that works on the bench and fails on the line.

Identity. Every unit has a serial, a device certificate, a manufacturing signature, and an identity that persists from factory flash through every OTA for its service life. The cloud recognizes a unit the first time it connects. The factory provisions identity during end-of-line test without the design engineer present. OTA knows which variant to ship to which unit. Field service looks up a unit by serial and gets its full firmware history. One data model, not four.

Configuration. Per-unit calibration (sensor offsets, motor parameters, ADC trim) is produced at end-of-line test and must persist across OTA. Per-variant config (SKU, populated peripherals, regulatory region) is produced at manufacturing. Per-deployment config (site, customer, policy set) is produced in the field. These three sources feed into one configuration surface the firmware reads at boot. A design that does not separate them cleanly produces units that lose calibration on update, variants that ship with wrong region settings, or deployments that reset to defaults on power cycle.

Fig. 8 IllustrativeIdentity, configuration and firmware provisioning drawn as the three things the device, the factory, the cloud and field service share

Firmware provisioning. The factory flashes firmware at end-of-line. The field receives OTA. Both are deployment targets. Both need signed binaries, a partition strategy supporting rollback, and a bootloader that enforces the signature chain. The factory flow is not a human with a laptop. It is a fixture with a cable, a script, a CM operator and a data log. If the firmware team has not delivered a factory-flash path alongside the OTA path, the CM will build one, and it will be wrong.

A prototype can take shortcuts here, as long as everyone knows which ones. On the rally streaming prototype, a cloned SD card image regenerates its identity on first boot, prepares the NVMe, finds whatever cameras and modems are fitted and starts a setup wizard, so the client could bring up new units himself. Updates were git-based, not a signed OTA chain, and both sides knew it was not production code. That was the right call for a field-test prototype and would be the wrong one for a product.

System architecture diagram of the rally streaming prototype: cameras into an RK3588 edge unit, recording to NVMe, live SRT stream and buffered segment upload over several uplinks to cloud storage, a serverless playlist function and dashboards
Fig. 9 The rally streaming prototype drawn as one system: capture, on-device recording, a supervisor that owns the uplinks, cloud storage and dashboards. Device and cloud were designed together; the release path was deliberately prototype-grade.

Test. End-of-line test produces calibration values, verifies functional behavior, exercises interfaces, and writes pass/fail into the manufacturing system of record. It has to run at line speed with a line operator, not the design engineer. Test firmware is a first-class artifact, not a side project. In many programs the test rig is an afterthought, a laptop running a Python script the original engineer wrote in a hurry, and it becomes the bottleneck of first production. The EVT, DVT, PVT sequence has a specific place for test-fixture maturation; skipping it costs a first production run.

Device software, cloud, manufacturing tooling, and field service are one architecture. The same firmware binary across all; the same identity model connecting all; the same OTA flow patching all. Programs that design this as one thing ship. Programs that design it as four ship late, if at all. This sits inside the broader sequence in The Hardware Product Development Process, Reframed: embedded architecture is one of the decisions that determines whether the transition holds together.

Long-lifecycle constraints: OTA, security, component obsolescence

Embedded products outlive the teams that design them. Consumer products ship for three years; industrial for ten to fifteen; infrastructure for twenty. The architecture has to survive the horizon.

Aerial view of an Aerones robot on a wind turbine tower, with a wind farm, forest and service vehicles below
Fig. 10 An Aerones robot working on a wind turbine tower, from Karlis's 2025 salaried role at Aerones. Equipment that services infrastructure has to stay supportable for as long as the assets it works on. Image: Aerones.

OTA. Over-the-air update is not a feature added once connectivity ships. It is an architectural decision made at EVT at the latest. It requires a bootloader with a partition table supporting A/B slots or a known-good fallback; signed firmware with a verified signature chain; anti-rollback protection; a fleet policy controlling staged rollout, canary deployment, and forced recovery; and a device state machine that handles power loss mid-update without bricking. All of these have to exist before the first connected unit ships. Retrofitting OTA onto a product that did not plan for it is a common reason programs lose months.

Fig. 11 IllustrativeService horizons from this article against the five parts of an update path that have to exist before the first connected unit ships

Security. The threat model is not a web application’s. The attacker has physical access: probe the debug port, dump flash, desolder the MCU, extract keys from EEPROM. Protection lives in hardware: secure boot rooted in on-die OTP, flash encryption, disabled debug interfaces on production units, per-unit device certificates, hardware-backed key storage. These choices are made when the electrical layer picks the processor, because not every processor supports them, and adding them later means a respin. The software supply chain has to be audited too, every third-party library, bootloader and TLS stack, because a CVE in OpenSSL five years from now is a fleet-wide exposure.

Component obsolescence. The MCU you ship in year one will have a different availability profile in year five. The sensor with the best datasheet today may be allocated to automotive by the time you need volume. A serious embedded architecture plans for this: critical components have a qualified second source at pin and footprint level, or at minimum a BSP abstraction that lets a drop-in swap happen without application-layer changes. When a component goes EOL, the migration is a scoped engineering task, not an emergency.

XV Tuner V3 Live Data view: gauges for RPM, coolant temperature, intake air, battery voltage and throttle position
Fig. 12 The Live Data view of XV Tuner V3, Karlis's own ECU tuning tool for Aprilia motorcycles, on sale since 2008 with a V3 cable and software in development. A product that stays on sale that long has to keep talking to the same ECUs while the laptops and operating systems around it change.

Service and diagnostics. A unit in the field will eventually misbehave. The architecture decides whether that is debuggable from the cloud, from a technician’s laptop on-site, or only by shipping the unit back. Good embedded systems expose structured telemetry, log rings that survive reboots, signed and rate-limited remote diagnostic commands. Bad ones have none of this, and every field issue becomes a forensics project.

When consumer components strand you (and when they don’t)

The most common architectural mistake at the prototype-to-production transition is a product built on consumer components that cannot survive the run. Raspberry Pi boards are the emblematic case; off-the-shelf mini PCs, dev-kit modules with unclear long-term support and repurposed USB peripherals fail the same way. The axes that matter are thermal envelope, vibration and shock, EMC, component lifecycle, determinism and certification lineage. A consumer board specified for 0 to 50 °C ambient (the Raspberry Pi 4 Model B is) does not belong in an enclosure that sees 70 °C on a summer day, and consumer Linux is fine for supervisory work but not for a control loop that cannot miss a deadline.

None of this means consumer parts never ship. A Raspberry Pi Compute Module on a custom carrier, in a properly managed thermal design, running a locked-down image and doing supervisory work only, is a valid production architecture for some products. What matters is whether the architecture chose it deliberately or drifted into it because the prototype used it. The full decision, with the failure modes and the industrial alternatives, is in When Raspberry Pi Strands Production (And When It Doesn’t).

Inside a rally car: an action camera on the roll cage, a USB hub and a black compute box strapped to the door bar, with wiring below
Fig. 13 The rally streaming prototype installed in a car: an action camera on the roll cage, a USB hub and the compute box strapped to the door bar. Parts like these are the right tools to prove a pipeline; heat, vibration and connector retention decide whether any of them can stay in a product.

What good embedded architecture looks like, measured

Good embedded architecture is not subjective. It produces measurable outcomes that poor architecture does not.

Layer
Architectural decision
When it has to be decided
Common failure if deferred
Mechanical
Thermal envelope, ingress class, vibration profile, connector strategy
Pre-EVT
MCU throttles in field; connectors work loose; enclosure cannot certify
Electrical
MCU class, secure-boot support, fieldbus, power tree, second-source plan
EVT
No hardware root of trust; EOL components; no deterministic interrupt path
Firmware
Bare-metal vs RTOS boundary, ISR/DMA design, bootloader, partition table, OTA flow
EVT
OTA retrofitted; bootloader cannot roll back; firmware forks per SKU
Application
Supervisory state machine, connectivity stack, UI, diagnostics, identity model
DVT
Cloud and device disagree on identity; no field debuggability; config drift
Cloud
Fleet identity, OTA policy, telemetry schema, remote diagnostics, access control
DVT
OTA bricks a batch; no fleet observability; support costs dominate margin
Three open rack cabinets in a workshop with UPS electronics at the top and battery modules wired below
Fig. 14 UPS cabinets on the bench during the Marconi Technologies work. Timing budgets and test results that count are measured on hardware like this, under load, not estimated.

The outcome-level signals of a program that did embedded architecture well:

  • First-pass factory yield at the target agreed with the CM, on the first real production run. Firmware provisioning without a laptop. End-of-line test catches the defects that actually occur. Calibration survives OTA.
  • OTA rollout measured in days, not quarters. Signed binary, staged rollout policy, canary fleet, rollback that works. No unit bricked in the field.
  • Timing budget documented and measured. Every hard-real-time loop has a worst-case execution time measured on hardware under load, not estimated from compiler output. Every deadline has an observed jitter bound.
  • A single application codebase across variants. SKU differences sit inside a BSP layer. The application, the cloud protocol, and the UI are identical across variants. No parallel forks drifting apart.
  • Field debuggability without shipping units back. Structured telemetry, persistent log rings, signed remote commands, enough instrumentation that a field issue becomes a ticket, not a forensic project.
  • A component lifecycle plan for every critical part. Second sources qualified at pin and footprint level, or a documented migration path with a scoped cost. No surprises in year four.
Aerones technicians preparing a robotic system at the base of a wind turbine
Fig. 15 Aerones field operations, from Karlis's 2025 salaried role there. When units work on remote sites, field debuggability decides whether an issue becomes a ticket or a trip. Image: Aerones.

These are the outputs of a program that treated embedded systems development as a systems architecture discipline from day one. They are rare in programs that did not. The difference is rarely talent. It is where the architecture decisions were made, when, and with which constraints in view. Embedded architecture is not a standalone deliverable; it sits inside the broader process by which a product goes from a working prototype to a fleet that ships, updates and survives, which our framework lays out phase by phase.

Most of a good embedded architecture is decided in the definition phase. The real-time boundary, the processor split, the OTA strategy, the identity model and the manufacturing and test path shape every later phase. The programs that get embedded right treat those first weeks as the most consequential work in the product, not the last weeks before ship.

Questions

What is embedded systems development?

Embedded systems development is the practice of designing computing systems that live inside a product, where the software, hardware, mechanical, and physical-world constraints are inseparable. It is not firmware writing; it is systems architecture in which decisions about processor choice, real-time boundaries, memory, power, and I/O define what the product can ever do.

What is the difference between firmware development and embedded systems development?

Firmware development is writing code that runs on a specific chip. Embedded systems development is deciding which chip, why, what runs on it, what does not, and how it negotiates with everything else in the product. Firmware without a systems architecture is a codebase; embedded systems architecture without firmware is a plan. Programs fail when teams have one and not the other.

What are the biggest failure modes in embedded systems programs?

Wrong processor for the workload, blurred real-time boundaries (safety-critical logic sharing a core with UI code), OTA update mechanisms designed as an afterthought, a codebase forked across SKUs with no shared platform, and undocumented tribal knowledge about why specific timing constants exist. Almost all of these trace back to architectural decisions made informally in the first weeks.

How do you decide between an MCU, an SoC, and a full Linux platform?

The decision is a system architecture choice, not a chip choice. It depends on determinism requirements, boot-time constraints, power envelope, security and update model, unit cost target, and the team you have to maintain it. Choosing Linux to move fast in prototyping and then discovering you need hard-real-time control is one of the most expensive mistakes hardware startups make.

When should you bring in embedded systems expertise?

Before the architecture is locked. A bad processor decision found late costs a board redesign, a firmware rewrite and a supply chain change, which is usually months of schedule. A few weeks of architecture work before the first schematic costs far less, which is why the definition phase is the highest-leverage place for senior embedded judgment.