Embedded software: what it is and how it is developed

Embedded software is the software in a device that is not a computer, from a sensor to the controller of a machine. It runs on a small processor with little memory, has to respond on time and must work unattended for years. This article covers how embedded software is built up, which choices you make during development, and what to watch for in testing, security and legislation.

About 18 minutes to read · Updated

What is embedded software?

Embedded software is software built into a device with one fixed job. A laptop runs software that has to be able to do anything and that the user installs. A device runs software that has to do one thing well, on hardware chosen for exactly that device. Often the device has no screen or keyboard, and the user only notices there is software inside when something goes wrong.

What sets embedded software apart from ordinary application software:

  • Real time. The software must respond within a fixed time: correct a motor, read a sensor, close a valve. In hard real time, late is as wrong as incorrect; in soft real time, late is a nuisance but not dangerous.
  • Few resources. The nRF52840, a widely used chip for Bluetooth products, has 256 kB of RAM and 1 MB of flash. A smartphone has tens of thousands of times more RAM. Every kilobyte and every milliampere counts.
  • Reliability. Nobody is standing by to restart the device. The software has to catch and recover from faults itself, for example with a watchdog that restarts the device when the software hangs.
  • Long life. An industrial sensor or a charging station stays in the field for ten years or more. The software has to remain maintainable and updatable all that time.
  • Power. Many devices run on a battery and sleep most of the time. How efficient the device is depends on the software at least as much as on the hardware.

Embedded software, firmware and embedded systems: the difference

The three terms are often used interchangeably. This is how they relate:

TermWhat it isExample
Embedded systemThe whole: processor, circuit board, sensors and the software on it, built into a product.The electronics in your product
Embedded softwareAll software that runs on that system, from the lowest layer to the application.Control, display, app connection and updates
FirmwareSoftware that belongs to the hardware and lives in flash memory. On a microcontroller that is in practice the whole of the embedded software; in larger systems it often means the lowest layer.The program in your product's microcontroller

In short: the embedded system is the device, embedded software is what runs on it, and firmware is embedded software that sits directly on the hardware. For products with a microcontroller, embedded software and firmware mean practically the same thing.

Designing hardware and software together

In an embedded product, hardware and software cannot be seen apart. Which pin a sensor uses, whether a signal can raise an interrupt, whether a channel runs to the DMA controller: that is fixed on the circuit board and decides what the firmware can do. A wrong choice in the schematic later costs an extra board round, or a workaround in software that makes the product slower or less efficient.

During design you also divide the work between hardware and software. A filter, a comparator or a voltage monitor can sit in hardware or in software. Hardware is faster and takes load off the processor; software is cheaper and can still be changed later. Designing the electronics and the firmware together means making that trade-off once and well, instead of two teams having to resolve it afterwards.

Bare metal, RTOS or embedded Linux

One of the first choices is what the software runs on. There are three common approaches.

Bare metal means without an operating system. The program is a main loop plus interrupts that respond to events. It is the smallest, fastest and most predictable approach, and suits simple devices and the smallest microcontrollers.

An RTOS (real-time operating system) divides the work into tasks, each with its own priority. A scheduler makes sure the most important task always gets its turn on time. Tasks exchange data through queues, semaphores and mutexes. Well-known options are FreeRTOS, Zephyr and Eclipse ThreadX; certified commercial variants exist for safety-critical products. In Rust, Embassy and RTIC are popular: frameworks that schedule tasks on a microcontroller without a classic RTOS.

Embedded Linux runs on a more powerful application processor with external memory. You get a full operating system with networking, file systems, display support and thousands of existing software packages. You build the system with Yocto or Buildroot and describe the hardware in a device tree. Linux is not hard real time by itself; since version 6.12 the real-time extension PREEMPT_RT is in the mainline kernel, but for the strictest requirements manufacturers often put a microcontroller next to it.

ApproachHardwareBoot timeReal timeSuited to
Bare metalMicrocontroller, from a few kB of RAMmillisecondsvery predictableSensors, simple controllers, battery devices
RTOSMicrocontroller, tens to hundreds of kB of RAMmillisecondspredictable, with prioritiesDevices with several concurrent tasks: radio, sensors, display
Embedded LinuxApplication processor with external RAM, from tens of MBsecondslimited, better with PREEMPT_RTGateways, devices with a screen, a camera or many network functions
Indicative values. Boot time and memory depend strongly on the chip and the configuration.

A rule of thumb: choose the simplest approach the product can live with. More layers mean more memory, more power and more to maintain and secure.

Programming languages for embedded software: C, C++, Rust and assembly

The language decides how fast you develop, how many faults end up in the product and how easily others maintain the code later.

LanguageStrong atKeep in mind
CThe standard for decades. Every chip has a C compiler, and vendors ship their example code and drivers in C. Many engineers know the language.Memory bugs, such as buffer overflows, only show once the software runs. Coding standards such as MISRA C, now in the MISRA C:2025 edition, limit that risk.
C++Abstractions and reuse without making the product slower. Widely used in larger embedded projects.Embedded work usually uses a restricted subset, without exceptions and dynamic memory. The language is large and complex.
RustMemory-safe by design: the compiler stops whole categories of faults before the program runs, without giving up performance. Modern tools for building, testing and flashing.Less example code from chip vendors than in C, and fewer engineers who already know it. Support differs per chip family.
AssemblyFull control over the processor.Only for small pieces: start-up code or a routine where every clock cycle counts.

Memory safety is not a theoretical advantage. Microsoft reported that about 70 percent of the vulnerabilities it fixes each year are memory bugs: exactly the kind of fault Rust stops at compile time. Rust is also usable in regulated sectors. The Ferrocene compiler is qualified for ISO 26262 (ASIL D), IEC 61508 (SIL 4) and IEC 62304 (class C).

HERSMEED writes firmware in Rust by default. If your team works in C or C++, we deliver the firmware in that language on request.

Microcontrollers and processor architectures

Most embedded products run on a microcontroller: a chip with processor, memory and peripherals in one. The most used architecture is ARM Cortex-M, from the low-power Cortex-M0+ to the fast Cortex-M7. RISC-V, an open architecture, is gaining ground quickly; Espressif's ESP32-C3 and ESP32-C6 already use it.

Well-known families are STM32 from STMicroelectronics (a very wide range), nRF52 and nRF54 from Nordic Semiconductor (Bluetooth and Thread), ESP32 from Espressif (Wi-Fi at a low price), RP2040 and RP2350 from Raspberry Pi, and the families of NXP and Microchip. The choice depends on:

  • the peripherals and radio the product needs;
  • the current draw in active and sleep mode;
  • availability and lead time, now and in ten years;
  • support in tools and languages, including Rust;
  • the unit price at the expected volumes.

Peripherals and low-level programming

Programming a microcontroller largely means driving the chip's peripherals. They are configured through registers, addresses in memory through which the software operates the hardware. A HAL (hardware abstraction layer) wraps those registers in readable functions. The main parts:

GPIO
Pins the software switches on or off, or reads: an LED, a button, a relay.
Timers
Count time precisely, for measurements, delays and periodic tasks.
ADC
Converts an analogue voltage into a number, for example from a temperature sensor or a battery.
PWM
A square wave with an adjustable duty cycle, to control a motor, LED or buzzer.
Interrupts
Let the processor respond at once to an event, such as an incoming message, instead of having to keep checking.
DMA
Moves data between peripherals and memory without the processor, leaving it free or asleep.

Communication protocols

An embedded device talks to sensors on the board, to other devices and often to the internet. Each protocol suits its own distance, speed and use.

ProtocolWhat forTypical use
UARTSimple serial link between two chipsGPS module, debug log
I²CSlow bus with several chips on two wiresSensors, EEPROM
SPIFast link on the boardDisplay, flash memory, radio chip
CAN and CAN FDRobust bus between devices in vehicles and machinesCars, agricultural machines, industry
USB and EthernetWired connection to a PC or networkConfiguration, gateways, industrial networks
Bluetooth Low EnergyLow-power wireless link to a phoneWearables, smart locks, sensors
Wi-FiHigh-speed wireless internetHousehold appliances, cameras
Thread and MatterLow-power mesh network and a shared standard for smart homesLighting, sensors, switches
LoRaWAN, LTE-M, NB-IoTSmall amounts of data over kilometresMeters, agriculture, tracking
In the EU, a product with a radio falls under the Radio Equipment Directive, including the cybersecurity requirements in force since 1 August 2025. See Security and legislation.

Memory, start-up and drivers

A microcontroller has two kinds of memory. Flash holds the code and fixed data; it is kept when power is removed. RAM holds the variables and the stack; it is fast, but small and volatile. A linker script fixes what goes where: the memory map of the program.

At power-up the start-up code runs first. It sets up the interrupt vector table, copies initial values to RAM, configures the clocks and only then starts the actual program. Often a bootloader comes before that, checking that the firmware is valid and able to install updates.

Because memory is so limited, embedded engineers reserve most memory up front instead of requesting it while running. That way memory cannot fragment, and you know in advance whether the program fits. A stack that is too small is a classic cause of faults that only occur sometimes.

The software itself is built in layers. Each layer knows only the layer below, so you can for example replace a sensor without rewriting the application:

ApplicationWhat the product does: control, measure, decide
MiddlewareProtocol stacks, file system, updates, security
RTOS or schedulerTasks, timing and communication between tasks (not in bare metal)
DriversThe sensor, the display, the radio chip
HALReadable functions for the chip's registers
HardwareMicrocontroller and the board around it

Example: what is inside a wireless sensor

Take a temperature sensor that measures every minute, sends the value to an app over Bluetooth and runs for two years on a coin cell. This is how the parts of this article come together:

  • Chip: an nRF52840 with Bluetooth on board.
  • Approach: bare metal or a light scheduler; there are only a few tasks.
  • Peripherals: I²C to the temperature sensor, a timer that wakes the chip every minute, the ADC for the battery voltage.
  • Power: the chip sleeps more than 99 percent of the time. Average current has to be around 10 µA.
  • Reliability: a watchdog restarts the chip when the software hangs, and the device reports the reason at the next connection.
  • Updates: a bootloader installs new, signed firmware over Bluetooth and falls back to the previous version if it does not start.
  • Testing: every build runs on the real chip, with a simulated sensor and measured sleep current.

How embedded software is developed

Developing embedded software follows the same steps as other software, but with the hardware in every step:

  1. Requirements. What must the product do, under which conditions, and how do you check that? A good specification names a measurable test for every requirement.
  2. Design. The split between hardware and software, the choice of bare metal, RTOS or Linux, and the layers and tasks of the software.
  3. Implementation. Writing the code, preferably in small steps that are each tested on the hardware.
  4. Testing. Demonstrating every requirement with a test, from single functions to the complete device. More on that below.
  5. Maintenance. Fixing faults and releasing security updates for as long as the product is in the field.

Tools

A toolchain turns the source code into a program for the chip: GCC or Clang for C and C++, rustc and Cargo for Rust. Around it teams use a development environment, such as VS Code, Keil MDK, IAR Embedded Workbench or the chip vendor's own. A debug probe connects to the chip over JTAG or SWD, so you can follow the code step by step; well-known probes are J-Link and ST-LINK, with GDB, OpenOCD or probe-rs as software.

Good embedded teams work like good software teams: all code in version control, a build system that gives the same result every time, and continuous integration that builds and tests on every change, on the real hardware too. Also record which firmware version belongs to which board revision.

Testing embedded software

Testing embedded software is harder than testing ordinary software, because the faults often only occur on the real chip: timing that is just off, an interrupt at the wrong moment, a current draw higher than calculated. That is why teams combine several kinds of test:

Kind of testWhat actually runsWhat it finds
Static analysisNothing: the code is readViolations of coding standards, suspicious constructs
Unit tests on the PCSingle functions, on the development computerFaults in calculations and logic, quickly and often
SimulationThe complete application, on the PC; sensors, actuators and environment are simulatedWhether the application does functionally what the specification asks, still without hardware
Processor-in-the-loop (PIL)The firmware on the real microcontroller; the environment is simulatedTiming, interrupts, peripherals, recovery from faults
Hardware-in-the-loop (HIL)The complete board or device; the environment is simulatedFaults in the interplay between electronics and firmware
System and field testsThe complete product in its real environmentBehaviour under real conditions, long-duration problems

Engineers also use measuring instruments: an oscilloscope for signals, a logic analyser for protocols such as I²C and SPI, and a current meter for consumption. Logging through the debug probe shows what the software does without slowing the device down.

At HERSMEED every firmware build runs on the real microcontroller, in a processor-in-the-loop test rig. It flashes the build, simulates the parts around the chip and runs the test plan the client approved beforehand. A build ships only when every test passes and an engineer has reviewed the report. Read more in how it works.

The earlier a fault shows up on the real chip, the less it costs.

Optimising: memory, speed and power

Memory. Compiler settings such as optimising for size and link-time optimisation make the program smaller. It also helps to avoid heavy libraries and to leave text and tables in flash instead of RAM.

Speed. Measure first where the time goes, then optimise only that part. DMA and interrupts often take more load off the processor than cleverer code.

Power. Most of the gain is in sleeping: the chip back in its deepest sleep mode as fast as possible, peripherals off when not needed, and the radio on as briefly as possible. A worked example: a CR2032 coin cell holds about 225 mAh. At an average draw of 10 µA that is in theory 22,500 hours, a little over 2.5 years. At 20 µA it is half that. Every microampere in sleep counts, and you measure it on the real hardware.

Security and legislation

A connected device is a target. Attackers sometimes have the device itself in their hands, read out the firmware through an open debug port, or send a forged update. The main measures:

  • Secure boot: the chip only starts firmware with a valid signature.
  • Signed updates: an update is installed only if the signature is correct; an older, vulnerable version is refused.
  • Debug port closed in production, so the firmware and keys cannot be read out.
  • Keys in hardware, in a secure element or a protected part of the chip, such as ARM TrustZone.
  • Unique credentials per device, no default passwords.
  • A list of all software components (SBOM) and a fixed way to report and fix vulnerabilities.

Legislation in the EU

Since 1 August 2025, cybersecurity requirements under the Radio Equipment Directive apply to wireless devices that connect to the internet, process personal data or enable payments. Manufacturers can show compliance with the standards EN 18031-1, -2 and -3.

The Cyber Resilience Act (CRA) goes further and applies to almost every product with digital elements that connects to a device or network, including hardware with embedded software. Since 11 September 2026, manufacturers must report actively exploited vulnerabilities and severe incidents: an early warning within 24 hours, a notification within 72 hours. From 11 December 2027 the remaining obligations apply, such as security by design and security updates throughout the support period.

This is a summary, not legal advice. Have someone check which requirements apply to your product.

Updates in the field (OTA)

With over-the-air (OTA) updates you update the firmware without recalling the device. That is needed for security updates, and so for the CRA as well. A good update system:

  • keeps two copies of the firmware, so the device falls back to the old one if the new one does not start;
  • survives a power cut in the middle of an update;
  • installs only signed updates and refuses older versions;
  • works over the connection the product already has: Bluetooth, Wi-Fi or a mobile network.

Build the update path in from the start. A device that reaches the market without a way to update will not get one later.

Functional safety and standards

If a fault in the software can injure someone, the product falls under a functional safety standard. That standard determines how you develop, test and document, and which tools you may use.

StandardSectorLevels
IEC 61508Industry, and the basis for most sector standardsSIL 1 to 4
ISO 26262CarsASIL A to D
IEC 62304Software in medical devicesClass A to C
DO-178CAviationDAL A to E
For all standards: the greater the risk, the heavier the requirements. MISRA C is not a safety standard but a coding standard for C that is widely prescribed in these sectors.

If your product falls under such a standard, raise it before development starts. Demonstrating safety afterwards costs many times more than building it in from the beginning.

Applications and IoT

Embedded software is in almost every sector:

  • Industry and automation: sensors, motor drives, machine controllers.
  • Energy: charging stations, inverters, smart meters, battery management.
  • Medical devices: monitors, pumps, portable meters.
  • Automotive and mobility: control units, e-bikes, scooters.
  • Consumer electronics and smart homes: locks, lighting, wearables.
  • Agriculture and logistics: soil sensors, trackers, cold-chain monitoring.
  • Robotics and aerospace.

IoT devices add a layer: the connection to the internet. The device sends data through a gateway or straight to the cloud, often with a protocol such as MQTT, and gets settings and updates back. More and more processing happens on the device itself, known as edge computing: it saves data traffic and power, and keeps working when the connection drops.

  • AI on the microcontroller. Small neural networks recognise sound, motion or anomalies on the chip itself. New microcontrollers get a dedicated processing unit for it, such as the STM32N6.
  • Rust. The language has been in the Linux kernel since 2022 and is more and more often the choice for new firmware, precisely for its memory safety.
  • Matter. One standard for smart homes, so devices from different brands work together.
  • RISC-V. An open processor architecture without licence fees, now in more and more microcontrollers.
  • Stricter legislation. With the CRA, security and updates become a legal requirement for almost every connected product.
  • AI in development. AI writes a growing share of the code. That makes testing on real hardware and review by engineers more important, not less.

Pitfalls and good habits

Embedded software gives a product its functions, makes it updatable later and is cheaper to change than hardware. The challenges are the limited resources, the dependence on the hardware and the long life in the field. These are the mistakes we see most often, with what to do about them:

  1. A vague specification. Record for each requirement how you test it. Vague requirements are the biggest source of extra work.
  2. Testing on the real hardware too late. Test on the real chip from the first build, not when the product is nearly finished.
  3. No recovery from faults. Use a watchdog, record the reason for a restart, and test what happens when a sensor drops out.
  4. No update path. Build in signed OTA updates before the first delivery.
  5. Leaving the debug port open. Close it in the production version.
  6. Parts without a future. Choose chips that are and will stay available; check lead times and the lifetime the manufacturer promises.
  7. All knowledge with one person. Make sure there is readable code, documentation and tests, so someone else can take over.
  8. Managing firmware and hardware separately. Record which firmware version belongs to which board revision.

The essentials

  • Embedded software runs in a device with one job, on little memory and power, and has to respond on time and stay reliable for years.
  • On a microcontroller, embedded software and firmware are practically the same.
  • Choose the simplest base that fits: bare metal, an RTOS or embedded Linux.
  • C is the standard; Rust stops memory bugs before the product runs.
  • Test early and on every build on the real chip.
  • With the CRA, security and updates are a legal requirement: build them in from the start.

Frequently asked questions

What is embedded software?

Software built into a device with one fixed job, such as a sensor or a machine controller. It runs on a microcontroller or a small processor, with little memory and often on a battery.

What is the difference between firmware and embedded software?

Firmware is embedded software that belongs to the hardware and lives in the chip's flash memory. For products with a microcontroller the two mean practically the same. In larger systems, with Linux for example, firmware often means only the lowest layer.

Which programming language is used for embedded software?

Usually C, sometimes C++, and increasingly Rust. C is supported by every chip; Rust prevents memory bugs at compile time. Assembly is used only for small, critical pieces. HERSMEED writes in Rust by default, and in C or C++ on request.

What is an RTOS?

A real-time operating system: a small operating system that divides the work into tasks with a priority, and makes sure the most important task always gets its turn on time. Well-known examples are FreeRTOS and Zephyr.

How do you test embedded software?

With a combination of static analysis, unit tests on the PC, simulation of the complete application, tests on the real microcontroller (processor-in-the-loop), tests with the complete hardware (hardware-in-the-loop) and tests in the real environment. The earlier a test runs on the real chip, the cheaper the faults it finds.

What does an embedded software engineer do?

They write and test the software in devices: drivers for the peripherals, the control and logic of the product, communication and updates. They work close to the hardware, read datasheets and schematics, and measure with an oscilloscope and a logic analyser.

What does it cost to have embedded software developed?

It depends mostly on what the product has to do and on whether you pay by the hour or a fixed price. At HERSMEED a prototype, with electronics and firmware, costs a fixed €15,000. Read what it costs to have an embedded product developed.

Glossary

ADC
Analog-to-digital converter: turns a voltage into a number.
Bare metal
Software that runs directly on the hardware without an operating system.
Bootloader
Small program that checks the firmware at start-up and installs updates.
DMA
Direct memory access: moves data without involving the processor.
Flash
Memory that is kept without power; this is where the firmware lives.
GPIO
General-purpose input/output: a pin the software drives or reads.
HAL
Hardware abstraction layer: readable functions on top of the chip's registers.
HIL
Hardware-in-the-loop: testing with the complete hardware in a simulated environment.
I²C, SPI, UART
Links between chips on the board.
Interrupt
Signal with which the hardware makes the processor respond at once.
Microcontroller
Chip with processor, memory and peripherals in one.
OTA
Over-the-air: updating firmware over the wireless link.
PIL
Processor-in-the-loop: testing the firmware on the real processor, with a simulated environment.
PWM
Pulse-width modulation: a square wave used to control power.
RTOS
Real-time operating system: divides the work into tasks with priorities.
SBOM
Software bill of materials: list of all software components in a product.
SWD and JTAG
Connections for programming and debugging a chip.
Watchdog
Timer that restarts the chip when the software hangs.

Sources

  1. McCann FitzGerald: Cyber Resilience Act, reporting obligations apply from 11 September 2026
  2. SGS: RED cybersecurity requirements mandatory on 1 August 2025
  3. eeNews Europe: MISRA C launches 2025 guidelines
  4. Ferrous Systems: Ferrocene qualified for IEC 62304, ISO 26262 and IEC 61508
  5. Microsoft Security Response Center: a proactive approach to more secure code
Next step

Electronics and firmware, tested on the real chip

Plan a call about your product. Within a week you have a specification and a test plan. The prototype costs a fixed €15,000, and work starts only once you approve.