EmbeddedRelated.com
Forums

Firmware vs Flash programming

Started by NightHawk12 3 weeks ago4 replieslatest reply 2 days ago177 views

Hi

I am having confusion between firmware and flash programming in a microcontroller.

In terms of how companies work knowledge, what is firmware programming, and is it different from flash memory programming we see in the programming manuals of microcontrollers? if it is different, what is the difference between firmware programming and flash memory programming?

is firmware is just a file(.bin or .hex) we use to flash the memory? or is it something related to internal memory or bootloader etc? Kindly clarify me on this

[ - ]
Reply by chidalgoApril 10, 2024

Adding to the previous answers:

"Firmware programming" could also refer to the process of writing firmware that will operate a device.  The source code is written in a development language (C, C++, assembly, etc.) and then "compiled" (or "assembled") into an executable file, which would then be "programmed" into permanent memory in the device.  That permanent memory is usually flash these days.  

The word flash is used as both a noun and a verb.  As a noun, it refers to flash memory.  As a verb, it refers to the process of electronically writing data into a flash memory device.

Similarly, "programming" can be used to mean the process of writing source code, or of writing an executable file or data into a memory device (which may be on-chip in a microprocessor), and probably a few other higher level actions as well.

The terms are used to mean multiple related things, probably adding to the potential for confusion.

In the early days, the executable program was masked into the IC at time of manufacture - truly unchangeable.  Then we progressed to the days of "One-Time-Programmable" (OTP) memory, where once programmed electronically, it was unchangeable.  If you needed to change the firmware in either of these generations, the memory device needed to be replaced.  Then we advanced to EPROM (Erase able PRogrammable Memory) which could be erased by exposing it to ultraviolet light (through a quartz window in the package) for a period of time which erased the data stored in it, after which it could be re-programmed.  These days, the erasure can be done electronically, and the memory is commonly known as "flash" memory.

[ - ]
Reply by CCDIApril 10, 2024

Good answer!  You are making me feel old, I used to bulk erase batches of EPROMs in a UV "toaster" and then was constantly swapping out EPROMs in dip sockets to debug my code. I didn't have an IDE that could simulate the code.

[ - ]
Reply by mikethewireApril 10, 2024

I agree with Steve.

My 2 pence...

Firmware = The program / operating system (OS) residing in (permanent) memory.

flash memory = physical solid state storage/(permanent) memory

Firmware programming = the action of transferring the OS to its location in permanent memory (flash memory)

Flash programming = the action of transferring data (not necessarily the OS) to its location in permanent memory (flash memory)

Mike

[ - ]
Reply by SteveBurckApril 10, 2024

Not entirely sure I understand the question, but as I understand things, "firmware programming" is programming the flash of a device with the contents of the firmware/software which it is running - either CPU/MPU or other programmable device like an FPGA or CPLD, whereas "flash programming" is just that - programming a flash device, with anything including firmware programming, but also data, like data loggers or parameter storage.