hardware//firmware

Firmware is software permanently stored in a device's non-volatile memory (flash, EEPROM), and it is the first code that runs at power-on. It is written in C or C++ and compiled to ARM or RISC-V machine code.


Firmware is software permanently stored in a device's non-volatile memory (flash, EEPROM), and it is the first code that runs at power-on. It is written in C or C++ and compiled to ARM or RISC-V machine code.

On an MCU, firmware initializes the clocks, configures the peripheral registers through MMIO, and enters the main application loop.

It is flashed onto the device through SWD, JTAG or a USB bootloader, and in the field it is replaced through an OTA update, ideally into a second partition with automatic rollback if the new image fails its health checks.

In a sensor or a drive it is part of the behaviour of the system that uses it: a sensor firmware update can change filtering, latency or calibration, so its version belongs with the data and models that depend on it (MLOps).

Building a device takes three skills in order: C or assembly for the firmware, basic electronics to power the circuitry (capacitors), and KiCad for the PCB layout.