ONYX
R&E · AZ
Blog

What Does Embedded Firmware Development for IoT Devices Involve?

Chris Lawcock
What Does Embedded Firmware Development for IoT Devices Involve?

Last Updated: November 30, 2026

Quick Summary

Embedded firmware development for IoT devices is the discipline of writing software that runs directly on a microcontroller or processor inside a physical product, where memory, power, and timing are fixed constraints rather than elastic resources. It covers hardware drivers, architecture, testing, secure boot, key provisioning, and signed over-the-air updates.

  • Firmware must fit in flash measured in kilobytes, boot in milliseconds, and survive a power cut mid-write.
  • Bare-metal superloops suit single-purpose devices with tight memory and hard power limits.
  • Bring-up should follow a fixed order: clock and power, debug console, storage, sensors, then radio.
  • Secure boot, protected key provisioning, and authenticated OTA updates are the three core security controls.
  • Provision per-device credentials, because one shared key turns a single extracted device into a fleet-wide compromise.
Prototype ready for firmware and certification?Onyx R&E builds embedded firmware and takes IoT devices from prototype to certified production.

Scope Your Firmware Build

Table of Contents

Embedded Firmware and General Software: What’s the Difference?

Embedded firmware development for IoT devices is the discipline of writing software that runs directly on a microcontroller or processor inside a physical product, where memory, power, and timing are fixed constraints rather than elastic resources. Firmware is the part of the product that cannot be patched by asking the user to reinstall something. It ships, it runs, and it has to work.

That distinction drives everything else. General software assumes an operating system, a filesystem, virtual memory, and a user who can retry. Embedded firmware assumes none of those. A firmware image must fit in flash measured in kilobytes, boot in milliseconds, and survive a power cut mid-write without bricking the device.

The practical difference shows up in how you test and how you fail. A web application that crashes returns an error page. A device running embedded software that crashes may sit on a shelf, unreachable, until someone drives to the site.

How Embedded Firmware Connects Software Behavior to Device Hardware

Firmware is the layer that turns electrical signals into decisions. A temperature sensor produces a voltage; the firmware reads an analog-to-digital converter channel, converts the raw count into engineering units, applies a threshold, and drives an actuator or publishes a reading over a communication protocol.

That translation happens through device drivers, the code that knows the register map of each peripheral. A GPIO pin, a UART, an I2C bus, and a SPI flash chip all expose different registers and different timing requirements. The driver hides that detail behind a hardware abstraction layer, so application logic calls a function instead of poking memory addresses.

Hardware-software co-design matters here. If the schematic routes a sensor to a pin without the right alternate function, no amount of firmware cleverness fixes it. We review pin assignments and bus topology alongside the firmware architecture, not after.

IoT Device Architecture and Component Selection

Component selection starts with the question the product must answer, not the chip that looks impressive. Three decisions constrain almost everything downstream: the microcontroller or processor class, the connectivity method, and the power budget.

  • Microcontroller vs. processor: A microcontroller integrates flash, RAM, and peripherals on one die and suits deterministic, low-power work. A processor running Linux suits devices that need networking stacks, filesystems, or a display.
  • Connectivity: Wi-Fi, Bluetooth Low Energy, cellular, LoRaWAN, and wired Ethernet each impose different firmware complexity, certification paths, and power profiles.
  • Power consumption: Battery life is a firmware property as much as a hardware one. Sleep modes, radio duty cycling, and wake sources are code decisions.

A common mistake is choosing a part for its peak specs and discovering later that the development tools are thin or the peripheral set forces awkward workarounds. Check toolchain maturity before committing.

Bare-Metal Programming vs. an RTOS: Task Scheduling and Resource Constraints

Bare-metal programming runs a single superloop with interrupt handlers, and it remains the right choice for many small devices. There is no scheduler, no context-switch overhead, and no kernel to debug. The trade-off is that every timing relationship is your responsibility.

A real-time operating system adds task scheduling, inter-task communication, and priority management. That helps when the device must handle several concurrent activities, such as sampling a sensor, servicing a radio stack, and updating a display, with different latency requirements.

Approach Best For Main Trade-off
Bare-metal superloop Single-purpose devices, tight memory, hard power limits Timing logic is manual and fragile as features grow
Cooperative scheduler A few periodic tasks with predictable runtimes One long task blocks everything else
Preemptive RTOS Multiple concurrent tasks with latency guarantees More RAM, more complexity, priority-inversion risk

For teams weighing build systems and toolchains, a practical look at Buildroot as an embedded build approach shows how a repeatable build replaces hand-rolled cross-compilation. Whichever path you take, document your task priorities and stack budgets early. Stack overflow in an RTOS task is one of the quietest ways a device dies.

The IoT Firmware Development Process, Step by Step

The IoT firmware development process moves through requirements, prototyping, integration, testing, and release, with a named deliverable and a decision gate at each stage. Skipping a gate does not save time; it moves the cost to the field, where it is far higher. Each gate has a concrete artifact you can review before committing the next block of schedule.

Engineer testing embedded firmware on a microcontroller board with an oscilloscope and code on a laptop screen
Engineer testing embedded firmware on a microcontroller board with an oscilloscope and code on a laptop screen

Phase 1: Requirements, Prototyping, and Hardware-Software Co-Design

Deliverable: a requirements specification and a risk register. Gate: every requirement is measurable and every high-risk assumption has a prototype result behind it.

Requirements define what the device must do, under what conditions, and how it fails. Write them as measurable statements: sample interval, worst-case latency, battery target, operating temperature range, and recovery behavior after a network drop. A requirement that says “fast response” is not a requirement; one that says “actuator command issued within 50 ms of threshold crossing, 99th percentile” is.

Prototyping then validates the risky assumptions on real hardware before the architecture hardens. Typical prototype questions: Does the radio actually reach the required range indoors? Does the chosen sleep mode hit the current budget? Does the sensor’s settling time fit the sample interval? Answer these on a dev board, not in a document.

Co-design is where firmware and hardware teams agree on pin maps, bus loading, interrupt priorities, and boot sequencing. A common mistake is freezing the schematic before firmware has reviewed it. Watch out: if the schematic locks before firmware signs off on pin assignments and alternate functions, a late fix can force a board respin.

Phase 2: Integration, Debugging, and Hardware Integration

Deliverable: a bring-up report and a working debug harness. Gate: every peripheral enumerated and exercised, and the device recovers cleanly from brownout and reset.

Integration is where the firmware meets the board for the first time, and where most schedule surprises appear. Debugging at this stage relies on SWD or JTAG access, a serial console, and instrumentation you built in earlier. Hardware integration covers bring-up of each peripheral, power-rail sequencing, and confirming that the device behaves under brownout and reset.

Bring-up should follow a fixed order so failures are isolated: clock and power first, then the debug console, then nonvolatile storage, then each sensor and bus, then the radio. Test one peripheral at a time and record the result. A bring-up report that lists each peripheral, its bus, its address or pin, and its pass/fail status is the artifact that lets a second engineer pick up the board without repeating your work.

Phase 3: Verification, Hardware-in-the-Loop, and Release

Deliverable: a test report, a signed release image, and a manufacturing test procedure. Gate: acceptance criteria met on target hardware, and the production line can program and verify a unit.

Verification runs the layered test plan described later in this article: host unit tests, integration tests against real peripherals, hardware-in-the-loop runs under automated stimulus, and field testing under real radio and thermal conditions. The release image is versioned, tagged to a source revision, and reproducible from a clean build.

The manufacturing test procedure is the artifact teams most often forget. It defines how each unit is programmed, how its unique credentials are injected, and what self-test it must pass before it ships. Building that procedure during verification, not after, is what keeps a production run from stalling at the programming station.

Our own shipped work illustrates the pattern: the six projects we built that are still running span hardware, software, payments, and integrations, and each one passed through these same gates.

Embedded Firmware Architecture for IoT Devices

A maintainable firmware architecture separates concerns so that a change in one area does not ripple through the whole image. We structure embedded firmware architecture for IoT devices around four layers: board support, drivers, services, and application logic.

  • Board support package: clock configuration, pin muxing, and boot code specific to the hardware revision.
  • Drivers: peripheral access behind a stable interface.
  • Services: connectivity, storage, timekeeping, and update handling.
  • Application logic: the product behavior, written against service interfaces rather than registers.

This layering is what makes portability possible when a part goes end-of-life and a replacement must be qualified. It also makes unit testing feasible, because application logic can run on a host machine with mocked services.

IoT Firmware Testing and Debugging Across the Build

IoT firmware testing and debugging spans four levels, and each catches a different class of defect. Unit tests verify logic on the host. Integration tests exercise drivers against real peripherals. Hardware-in-the-loop testing runs the firmware on the target board under automated stimulus. Field testing confirms behavior under real radio conditions, temperature, and power.

Debugging discipline matters as much as the test suite. Keep a fault handler that records the program counter and stacked registers before reset, and persist a small crash log to nonvolatile memory. When a device in the field misbehaves, that log is often the only evidence you get.

Reliability comes from fault handling designed in, not bolted on: watchdog timers, brownout detection, and defined recovery states for every failure the device can detect.

IoT Device Firmware Security: Secure Boot, Key Provisioning, and OTA Updates

IoT device firmware security rests on three controls: a secure boot chain, protected key provisioning, and authenticated over-the-air updates. Without all three, an attacker who reaches the device can replace its code. The mechanics below are what separate a checkbox from a working control.

Secure boot verifies a signature over the firmware image using a key stored in hardware, so the device refuses to run modified code. The chain typically starts in immutable ROM, which verifies a first-stage bootloader, which verifies the application image.

Key provisioning is the process of injecting unique device credentials during manufacturing, and it must happen in a controlled step with a record of what was programmed.

Over-the-air updates must be signed, versioned, and rollback-safe, with a recovery path if an update is interrupted. A workable OTA design has four parts:

  • Signed images: the device verifies the update signature against the same trust chain used at boot before accepting it.
  • A/B or dual-bank partitions: the new image is written to the inactive bank and the bootloader switches only after verification succeeds, so a failed or interrupted update falls back to the known-good image.
  • Version and anti-rollback metadata: the device refuses images older than what it already runs, which blocks an attacker from reinstalling a vulnerable build.
  • A resumable transfer: the update client tracks progress and resumes after a dropped connection rather than restarting the download.

Lifecycle management matters as much as the first update. Plan for how keys rotate, how a compromised signing key is retired, and how a device that has been offline for months catches up without skipping the anti-rollback check. A device that cannot be updated securely in the field becomes a permanent liability the day its first vulnerability is published.

A shipped device with a payment system and regulatory certification shows how these concerns land in practice. The Skill Stop deployment combined hardware, firmware, game logic, and a cashless smart card payment system.

Common Pitfalls in IoT Firmware Development

Most firmware failures trace to a small set of recurring mistakes. The first is underestimating memory constraints: RAM and flash budgets must be tracked per module, not discovered at link time. The second is treating connectivity as reliable. Networks drop, and firmware that blocks on a send call will hang the device.

The third is deferring regulatory certification. Certification is a schedule item with a fixed sequence, and starting it late compresses the only part of the timeline you cannot engineer around. The fourth is testing only on the bench. Devices fail in the field because of power, heat, and radio conditions that a lab never reproduces.

Finally, teams often skip maintainability. Firmware that no one can modify six months later becomes a permanent liability. Version your interfaces and document the boot sequence.

Planning Your Firmware Build with Onyx R&E

A firmware project succeeds when the plan accounts for hardware, software, certification, and manufacturing as one sequence rather than four handoffs. That is the model we work from.

We bring 26 years of engineering experience, hold US Patent 5,982,888 and US Patent 6,347,281, and have designed, manufactured, and shipped over 275 Skill Stop machines. Our web, software, hardware, and AI engineering practices span the path from prototype to certified production.

If you are ready to scope a build, start a project with our team to discuss your requirements. Pricing depends on quantity, dates, and delivery, so request a quote for current figures.


Firmware is where a hardware product either becomes reliable or becomes a support burden, and the decisions that determine which one happen early. If your prototype needs a firmware architecture, a security review, or a certification plan, Onyx R&E offers end-to-end product development, embedded firmware and IoT production experience, and proven experience in regulatory certification and manufacturing. Get started with Onyx R&E and move your device from prototype to production.

Frequently Asked Questions

What are the different approaches to designing embedded firmware?

Most teams choose between bare-metal programming and a real-time operating system. Bare-metal firmware runs a single control loop directly on the microcontroller, which suits simple sensors and tight memory constraints. An RTOS adds task scheduling, device drivers, and hardware abstraction so several jobs (sensor reads, connectivity, power management) run predictably. The right pick depends on latency needs, power consumption, and how much the product will grow after launch.

How do you develop firmware for an IoT device from prototype to production?

A workable embedded firmware development sequence runs requirements and component selection first, then a prototype board with hardware-software co-design, then driver and communication protocol work, then integration and debugging on real hardware. From there you move into validation, security hardening (secure boot, key provisioning), over-the-air update support, and finally certification and manufacturing test fixtures. Each phase should produce a deliverable a small team can review before the next one starts.

What should an IoT firmware architecture include?

A sound embedded firmware architecture for IoT devices separates hardware abstraction from application logic, so a board change does not force a rewrite. It should define device drivers, a communication protocol layer for wireless communication, a power management strategy for battery life, fault handling for connectivity failure and offline operation, and a firmware update path. Build in logging and diagnostics early; they make field debugging and fleet-scale recovery far cheaper later.

How do you test and secure embedded firmware?

IoT firmware testing and debugging should span unit tests on logic, integration tests against peripherals and sensors, hardware-in-the-loop testing on real boards, and field testing under weak connectivity. On the security side, enable secure boot, provision unique keys per device, encrypt stored credentials, and sign every over-the-air update. Test recovery paths deliberately: pull power mid-update, drop the network, and confirm the device returns to a known good state instead of bricking.

What are common pitfalls in IoT firmware development?

The recurring ones: picking a microcontroller before requirements are settled, ignoring memory and power constraints until late, treating security as a post-certification task, and skipping hardware-in-the-loop testing so bugs surface only in the field. Another is underestimating the certification timeline, which can cause significant schedule delays if firmware requirements are not designed in from the start. Budget for OTA updates and fleet recovery from day one, not after the first shipped batch.

Do you need a full-time embedded engineer to build IoT firmware?

Not always. Early-stage teams often bring in embedded firmware expertise for specific needs, such as component selection, driver development, or certification readiness. Scoping the work by milestone and deliverable helps keep costs tied to output, and it works best when the internal team owns the product roadmap.

GoogleAdd onyxrd.com as a preferred source on Google →