Electronic – Is firmware code or data


When someone says they "flashed" firmware to a device, I'm curious as to what this actually implies.

  1. Is firmware just a native binary that is stored in memory and that can be interpreted by the device's CPU (like any other EXE on a computer)? Or is firmware just data that acts as input to an immutable program already hardcoded/wired onto the device?
  2. If the latter example isn't firmware, what would you call it? For instance, let's say a device has some binary (someapp.exe) on it, and you cannot remove or modify this binary. The binary, when ran, takes input from a memory chip. You can "flash" data to this chip, and thus affect the input/configuration of someapp.exe that will take affect the next time it runs. If not firmware, what would this be called?

Best Answer

As often with such definitions, we agree in most cases, but there is no really firm boundary between what is firmware and what isn't. Firmware is

  • stored permanently (except for some knowledgeable person who can change it ...)
  • not intended to be changed (except ...)
  • operates on the processor without the help of other software (except ... you get it?)

As to data that is interpreted by a (firmware) interpreter: this is not often done in a professional setting, because it makes the product more expensive: more memory, CPU power, etc. is needed to achieve the same end goal. It is however sometimes used in hobbyist setting, often with a Basic interpreter in flash, and a (tokenized) Basic application stored in eeprom (or in Flash too). Check for instance the PICAXE and the various Basic stamps.

IMO in such a setting both the Basic interpreter and the Basic application should be called firmware.

An interesting use of a firmware interpreter that interprets stored code (which should IMO be considered firmware too) is the XBOX 360 startup. This excellent talk describes it in some detail.

Below MSalters wonders whether FPGA code / configuration data should be considered firmware.

In the aspects that matter most (it is information that is changeable late in the production process, but it is not intended to be changed at will by the end user) FPGA bits behave like firmware. That makes the question whether it is firmware according to any definition moot. The important point is that it can (and should) be written, handled and managed like firmware. (If it walks and quacks like a duck, is it a duck?)

Don't bother with definitions when they are not useful. Is microcode firmware? Does representation matter? Does context matter? Are the ROM bits for an IWM firmware?

Vaxquis' comment to OP's question prompted me to read the wiki article he links to. IMO the definition of firmware given there (persistent memory and program code and data stored in it) is troublesome. IMO the maps stored in a car navigation system are data, not firmware, no matter how they are stored (according to the wiki they should be firmware). And the apps in your iPhone or Android phone are applications, not firmware (according to the wiki they too should be firmware).