Operating Systems and Embedded Software · Embedded software
Firmware
Also known as embedded firmware, ECU software image, device firmware, microcode
Software stored in a device's non-volatile memory and executed by its processor or microcontroller to control the hardware, such as an ECU application image, a bootloader or code loaded into a peripheral chip.
Explanation
Firmware covers the programs and data held in persistent memory, such as ROM or flash, that give hardware its basic behaviour. NIST's glossary, quoting CNSSI 4009, describes firmware as programs and data stored in hardware so that they cannot be dynamically written or modified while the programs execute. In vehicles, firmware ranges from bootloaders and complete microcontroller images to code for radar sensors, Ethernet switches and modems.
Some firmware is loaded at runtime. The Linux firmware API lets kernel drivers request files from user space, such as CPU microcode, firmware for microcontrollers inside peripheral devices, or calibration data. What separates firmware from higher-level application software is mainly its closeness to the hardware and the constraints on updating it.
Firmware runs before or beneath the operating system, so a corrupted or malicious image can undermine all the software above it. Secure boot, signed images and protected update mechanisms are used to guard against this.
How it works
Firmware is built for a specific processor, linked to fixed memory addresses and written into flash or ROM during production or update. At reset, the CPU starts executing from a defined address, often a boot ROM that checks and starts a bootloader, which in turn loads the main firmware. Peripheral firmware may instead be loaded into the chip by a host driver during initialisation.
Automotive applications
- ECU application and bootloader images
- Radar and sensor processing firmware
- Ethernet switch and PHY firmware
- Modem and Wi-Fi chipset firmware loaded by Linux drivers
Example
A camera module's image signal processor has no flash memory of its own. When the Linux driver probes the device, it requests the ISP firmware file through the kernel firmware API and uploads it to the chip before streaming starts.
An illustrative example: any figures in it are worked numbers, not measurements.
References
- Glossary: firmware (opens in a new tab)
- Linux Firmware API: Introduction (opens in a new tab)
“The firmware API enables kernel code to request files required for functionality from userspace”
Definitions are original summaries. Standards text is not reproduced; follow the links for the official publications.