Firmware and Software differences. Where is the line between them?

To differentiate Firmware from Software is always a discussion aspect when speaking in the embedded systems world.

Firstly I want to introduce another discussion: What is an embedded system? A mobile phone is an embedded system? what about a TV, tablets or a GPS navigator? what about a Raspberry Pi or Beaglebone?

Lets take a formal definition of an embedded system, for example from Wikipedia:

"An embedded system is a computer system with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints."

Well, I mostly agree with that definition, however I would say "computational" instead of "computer" as computers are nowadays more associated with personal computers, far away from the idea that an abacus is a formerly a computer, and neither I would not say "whithin a larger mechanical or electrical system" as there could be simple embedded systems that could work alone, e.g. an alarm or a podometer.

It is true that the concept of an embedded system nowadays is actually diffused, mainly because some devices that previously were just embedded systems, today they are not. The best example is the mobile phone. The Nokia 3310 was an embedded system as the final user could only do limited functions with it: to call, to write a SMS, play to Snake... But now a mobile phone in fact is not an embedded system as it can do unlimited functions. You can install a new app and use it with a totally new function, like control you home lights or prepare some slides for a presentation, in the same way that you do with your - general - computer. This is why they are formerly known as smartphones, being not the same as a mobile phone.

In that way, answering to the devices presented, a GPS navigator is an embedded system, either a TV while a smart TV is not, neither a tablet. What about the Raspberry Pi? Good question: it depends on the targeted final user. Raspberry Pi was created to be used as a - cheap - personal computer with the main purpose of teaching programming, it has a general operative system where you can install different software, in the same way that you do with a smartphone.

The answer about the difference between Firmware and Software is the same: it depends. But in what?

Lets search the definition of Firmware, again from Wikipedia:

"In electronic systems and computing, firmware is a type of software that provides control, monitoring and data manipulation of engineered products and systems. Typical examples of devices containing firmware are embedded systems (such as traffic lights, consumer appliances, remote controls and digital watches), computers, computer peripherals, mobile phones, and digital cameras. The firmware contained in these devices provides the low-level control program for the device."

Uh, fine, wait... but where is the line between that "low-level control program" and the high level? An operative system is below or above that line? All code contained in an embedded system is just Firmware? Or maybe there are no firmware in a general use computer?

After some years I would stablish the following dependences which defines Firmware:

  • Firmware is commonly not to be changed by the final user.
  • Firmware is developed for an specific hardware and commonly it does not work if you load it into another hardware.
  • Firmware is always contained in a non volatile memory.
  • Software depends on Firmware in the same way that Firmware depends on Hardware.

Ok, then it is clear that the code developed for a remote control or traffic lights is just firmware and the code for any Android app is software as I can develop it knowing nothing about the hardware. But do not fall into the trap, it not depends on if code is done for an embedded system or not. In that way there would not be any software in an embedded system and in fact there is, alike there is firmware contained in a personal computer

In a personal computer, the FSBL (first stage bootloader) is just firmware, but a personal computer operative system is mainly software as you can replace, update or reinstall it. The most compromising aspect may be the device drivers contained in the OS, as the final user can replace or uninstall them, but in fact it should not be the common way (look at MACs, have you replaced manually and consciously any device driver?). In fact the same happens with the computer FSBL or BIOS.

Commonly is told that an embedded system only contains Firmware, but in fact nearly always there is a Firmware layer supporting the software.