IoT Firmware: Taking a Device from Prototype to Production
A demo that works on your desk is not a product. Here is what changes when firmware has to run unattended on thousands of devices: power, updates, security, and failure handling.

Written by the engineers at Rootlex Technologies who design, build and run AI, cloud, fintech and embedded systems for our clients.
Getting a sensor to publish readings from a development board takes an afternoon. Getting ten thousand of those devices to run for years in a factory, a clinic, or a field, without anyone touching them, is a different job. Most of the work in production firmware is in the parts a prototype never exercises.
Choose the microcontroller for the product, not the demo
Prototypes are usually built on whatever board is to hand. Production hardware should be chosen against constraints you can write down:
- Power: mains, battery, or energy harvesting, and how long a battery has to last.
- Connectivity: Wi-Fi, BLE, cellular, LoRa, or a wired bus such as RS485 or CAN.
- Memory: enough flash to hold two firmware images, because safe updates need both.
- Supply: whether the part will still be available at volume in three years.
ESP32 parts are a strong default when you need Wi-Fi and BLE at low cost. STM32 and Nordic nRF families tend to win when power draw, real-time behaviour, or certification matter more.
Bare metal or an RTOS
A single control loop is fine for a device that does one thing. Once the firmware has to read sensors, keep a network connection alive, write to flash, and respond to commands at the same time, a real-time operating system such as FreeRTOS or Zephyr pays for itself. Tasks, queues and timers make timing explicit, which is what lets you reason about the worst case instead of the usual case.
Design for power from the first schematic
Battery life is decided by how long the device sleeps, not by how efficient it is when awake. Measure current in every state with a power profiler, batch transmissions, and wake on interrupts instead of polling. Radio time dominates most budgets, so sending one compact message every ten minutes beats sending a small one every ten seconds.
Over-the-air updates you can trust
You will ship bugs, so the update path is the most important feature on the device. A dependable scheme has three properties:
- Two slots: the new image is written beside the running one, never over it.
- Verified boot: the bootloader checks a signature before it runs anything.
- Automatic rollback: if the new image does not confirm it is healthy, the device returns to the old one by itself.
Roll updates out in stages, starting with a small group of devices, and watch error rates before widening the release.
Security is a hardware decision too
Each device needs its own identity, provisioned at manufacture, so a single compromised unit cannot impersonate the fleet. Turn on secure boot and flash encryption, use mutual TLS to the cloud, and keep debug ports locked in production builds. Shared passwords baked into firmware are the most common way fleets get taken over.
Assume things will fail
Networks drop, power browns out, and flash wears. Production firmware uses a hardware watchdog, stores data locally while offline and forwards it later, and records why it last reset. That reset reason, sent to the cloud on the next boot, is often the only evidence you get about a failure in the field.
Plan the factory and the fleet
Every unit needs to be flashed, tested and provisioned on a production line in seconds, so build a test mode into the firmware early. After shipping, you need to see firmware versions, connectivity and battery levels across the whole fleet from one dashboard.
This is the work we do in our embedded systems and IoT firmware practice. For an example on a live shop floor, see how we connected CNC machines to a real-time monitoring layer for ASACO. If you have a prototype that needs to become a product, talk to our engineers.