1
\$\begingroup\$

I've started learning about embedded coding. The words 'firmware' and 'software' are a bit ambiguous to me still. My understanding is that software is high level language tailored for user interaction, loaded into the CPU and modified frequently; whereas firmware is low level language, modified infrequently and loaded into a microcontroller for direct hardware control? What are the differences in terms of speed, timers, memory, peripherals, compiler, debugging etc.?

\$\endgroup\$
9
  • 5
    \$\begingroup\$ Does this answer your question? Firmware vs. Software \$\endgroup\$
    – StarCat
    Mar 25 at 14:17
  • 1
    \$\begingroup\$ As you said - the difference is defined by the intended usage and not by the internals. \$\endgroup\$
    – Eugene Sh.
    Mar 25 at 14:17
  • \$\begingroup\$ What speed? Number of cycles? Cycles needed to process an interrupt? \$\endgroup\$
    – Solar Mike
    Mar 25 at 14:18
  • \$\begingroup\$ @StarCat I would say the linked answer is a bit conservative and outdated. \$\endgroup\$
    – Eugene Sh.
    Mar 25 at 14:19
  • 1
    \$\begingroup\$ Some software is like you suggest, as is some firmware. But it's a mistake to try to make a definite distinction and say all firmware or all software, with words whose meanings have had to evolve over time to embrace new technologies and markets. I think of software as being user facing, and firmware as getting on with the behind the scenes stuff, but that too is 'some' rather than 'all'. \$\endgroup\$
    – Neil_UK
    Mar 25 at 14:51
1
\$\begingroup\$

In my industry, aerospace/defense, code written for a processor of any sort is considered software and has to follow a rigorous SW development process. This is irrespective of the complexity or size of the software product (1,000 SLOC or 1,000,000), and irrespective of what it executes on (uC, uP, SBC, etc).

FPGA/ASIC designs, since they are almost always done with a language such as VHDL or Verilog, are now considered to be firmware. I don't necessarily agree with this, but it is what it is. And as firmware, these designs have to follow many of the same processes that formal deliverable software has to follow. This is true even though as of today all FPGA and ASIC designs are done in our hardware group, and not by our software folks.

Back in the early days of FPGAs, that was not the case. I remember designers using the Xilinx PIP editor to program the early Xilinx devices, and I used schematic based tools to do some FPGA designs way back when. Those designs were never considered firmware, as they were more akin to a board level schematic-based design flow. The morphing of FPGA designs into the firmware lexicon happened over time as language based tools took over design task.

\$\endgroup\$
1
\$\begingroup\$

The Jargon File is as close to a reference as we have, it has even been cited by major English dictionaries as a a definitive reference for technical lexicology.

Firmware is a type of software, the distinction usually applies at the level at which the information is stored and updated. There are no special techniques to develop one vs the other, it depends on the project scope and definition and all software technologies should be considered in scope until you eliminate them .

http://www.catb.org/jargon/html/F/firmware.html

Firmware: Embedded software contained in EPROM or flash memory. It isn't quite hardware, but at least doesn't have to be loaded from a disk like regular software. Hacker usage differs from straight techspeak in that hackers don't normally apply it to stuff that you can't possibly get at, such as the program that runs a pocket calculator. Instead, it implies that the firmware could be changed, even if doing so would mean opening a box and plugging in a new chip. A computer's BIOS is the classic example, although nowadays there is firmware in disk controllers, modems, video cards and even CD-ROM drives.

fun fact, in firefighting and rescue, software refers to the webbing and rope materials vs hardware the metal carabiners and other hard pieces :) context matters.

I encourage you , Your organization, project, or team developing complex software to identify to your own satisfaction how you want to handle the hardware layer and a distinction if any between firmware and software to you

\$\endgroup\$
0
\$\begingroup\$

In the past, Firmware has had several different definitions, but today the most common one is that it is the code loaded into a FPGA device to define its internal configuration (i.e., what it appears to be structurally) rather than code that is executed by a microprocessor.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ I would argue that the most common is the FW for microcontrollers and not FPGAs. \$\endgroup\$
    – Eugene Sh.
    Mar 25 at 14:57
  • \$\begingroup\$ @EugeneSh.: Code running on microcontrollers is definitely software. Whether or not it can also be called firmware depends on your definition of firmware, and there are several competing definitions. Under the one Michael is using, there is no such thing as firmware for microcontrollers. \$\endgroup\$
    – Ben Voigt
    Mar 25 at 14:58
  • \$\begingroup\$ @BenVoigt You just said "everyone has their own definition of Firmware and this question has no answer" in a fancy way. \$\endgroup\$
    – Eugene Sh.
    Mar 25 at 15:01
  • \$\begingroup\$ @EugeneSh.: Not that everyone has their own, but there are multiple in competition (most with more than one adherent). And correct, the question has no answer. \$\endgroup\$
    – Ben Voigt
    Mar 25 at 15:02
  • \$\begingroup\$ I think the bottom line when it comes to microcontrollers, what runs on them can be called both Firmware (as it can be programmed to run on its own with just power supplied) or Software (as it can be programmed to required input to execute). \$\endgroup\$ Mar 25 at 15:54
-2
\$\begingroup\$

Nowadays:

Firmware is the software for embedded systems Software is meant for Windows or Linux or FreeBSD

Back in the 80', directly from Wikipedia:

Ascher Opler coined the term "firmware" in a 1967 Datamation article. Originally, it meant the contents of a writable control store (a small specialized high-speed memory), containing microcode that defined and implemented the computer's instruction set, and that could be reloaded to specialize or modify the instructions that the central processing unit (CPU) could execute.

Firmware was the microcode executed by CPU's and it was stored in a non-volatile memory.

Software was meant for PC's and MAC

\$\endgroup\$
7
  • 1
    \$\begingroup\$ I don't think firmware was ever hard-coded in silicon, that would be hardware, or just call it part of the processor architecture. \$\endgroup\$
    – Hearth
    Mar 25 at 15:08
  • 1
    \$\begingroup\$ We call the silicon one microcode these days… firmware was the stuff in ROMs and EPROMs which wasn't easily replaceable by the user. Think BIOS vs OS \$\endgroup\$ Mar 25 at 15:11
  • \$\begingroup\$ @Hearth Well, how would you call the bootcode which is fused in the ROM of some micros? \$\endgroup\$
    – Eugene Sh.
    Mar 25 at 15:12
  • \$\begingroup\$ @LorenzoMarcantonio Microcode isn't always hard-coded either. I know there have been updates to it, at least. \$\endgroup\$
    – Hearth
    Mar 25 at 15:13
  • \$\begingroup\$ @EugeneSh. Fair point. The way Enrico describes it sounds a lot more like processor architecture details to me, but you could consider code in mask ROM or write-once ROM to be hard-coded in silicon too. \$\endgroup\$
    – Hearth
    Mar 25 at 15:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.