Skip to content
BetterDL

Firmware

Also called: boot firmware, boot program, boot code, start-up program

Software stored in non-volatile memory such as ROM or flash inside a device, including the start-up program a processor runs when switched on.

Firmware is the program that lives in a device rather than being loaded from a disk. It's stored in non-volatile memory, so it's there the moment the power comes on.

That timing is the point. At power-on, the RAM is volatile and holds nothing useful. The processor starts fetching instructions from a fixed address, and that address must be in non-volatile memory. The firmware found there tests the hardware, sets it up, and (in a computer) loads the operating system into RAM.

In small devices, the firmware is the whole program: a microwave's controller, a keyboard, a thermostat.

Where it's kept has changed over time:

  • Mask ROM and PROM: fixed forever; a bug meant new chips
  • EPROM: updatable, but only with the chip removed
  • EEPROM and flash: updatable in place, which is why devices can get firmware updates today

Worked example

Example

Planning a device's memory

A smart plug must run its control program at power-on and accept security updates after it ships.

  1. 1.

    The program must be present at power-on: non-volatile memory.

  2. 2.

    It must be updatable without opening the case: electrically rewritable.

  3. 3.

    So: flash (or EEPROM). RAM is used only while running.

Common mistakes

  • Putting the start-up program in RAM. RAM is empty at power-on, so the first instructions must come from non-volatile memory.

  • Thinking firmware can never be updated. With flash or EEPROM, it can be rewritten in the field.

Practice Firmware

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Firmware is taught in Memory.