Questions tagged [firmware]

Firmware refers to software running on an embedded system or microcontroller to control hardware directly.

243 questions
29
votes
9 answers

Is firmware code or data?

When someone says they "flashed" firmware to a device, I'm curious as to what this actually implies. 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…
HeineyBehinds
  • 645
  • 1
  • 7
  • 13
24
votes
2 answers

Firmware protection on AVR and PIC controllers

Can someone extract the HEX file that I burn in a microcontroller I provide them? If that is possible, how can someone ensure that their code is secured in embedded systems? In the case of PIC and AVR microcontrollers, how can one protect their…
Rookie91
  • 2,108
  • 4
  • 29
  • 46
22
votes
7 answers

C - wrapping globals in a struct?

A firmware style question concerning C. I have some legacy code I am tidying up. One of the nasty features is global variables being scattered through the source files. I can make a few of them locals, which is fine. However, how to deal with the…
Dirk Bruere
  • 13,425
  • 9
  • 53
  • 111
20
votes
6 answers

Use of global variables in Embedded Systems

I started writing firmware for my product and I'm a rookie here. I went through many articles about not using global variables or functions. Is there any limit for using global variables in an 8 bit system or is it a complete 'No-No'. How should I…
Rookie91
  • 2,108
  • 4
  • 29
  • 46
18
votes
4 answers

How does factory reset work?

All embedded devices includes a "Factory reset" option that allows the user to reset his device if something is wrong. I am developing a Firmware on an STM32 board. The firmware includes a boot loader that allows to upgrade the application via…
Pryda
  • 1,241
  • 2
  • 19
  • 30
18
votes
2 answers

Should all traps always be defined?

I've seen two cases now with dsPIC 30F4013 where the controller was resetting due to an undefined trap. Why these traps were getting raised in the first place is still a mystery, but that's not my immediate question. I'm starting to think it would…
Stephen Collings
  • 17,373
  • 17
  • 92
  • 180
16
votes
4 answers

What is a good way for the mcu to determine which hardware version it is running on?

I'm working on a new product design and there will probably be small or large hardware changes/fixes over the life of the product. For future firmware updates in the field I need a way to determine the hardware revision. What is a good strategy? I'm…
morten
  • 4,613
  • 4
  • 27
  • 26
16
votes
5 answers

Possibilities for allocating memory for modular firmware design in C

modular approaches are pretty handy in general (portable and clean), so I try to program modules as independent of any other modules as possible. Most of my approaches are based on a struct that describes the module itself. An initialization…
L. Heinrichs
  • 605
  • 3
  • 17
16
votes
7 answers

What's the motivation in using Verilog or VHDL over C?

I come from a programming background and have not messed around too much with hardware or firmware (at most a bit of electronics and Arduino). What is the motivation in using hardware description languages (HDL) such as Verilog and VHDL over a…
Reflection
  • 269
  • 1
  • 2
  • 5
14
votes
3 answers

What are the implications of using PROGMEM?

With large amounts of text variables, I've found it necessary to store them in the Flash memory using PROGMEM. What are the positive and negative consequences of storing large variables in Flash (using PROGMEM) vs SRAM vs EEPROM on the Arduino?
Robert
14
votes
4 answers

Encoding version or configuration on PCB

I need to encode information about either version or configuration on the board/electrically, so the firmware can detect which board layout is used. What options are possible and what are their pro/cons?
Henrik Hansen
  • 245
  • 1
  • 8
12
votes
10 answers

Is it practical for firmware to be uniquely identified in production

Are there systems available in large scale manufacturing that allow a unique serial number to be programmed into the firmware or some free memory space for each PCB that comes through? I've found that the FDA has decided to start enforcing it for…
Lukeyb
  • 223
  • 2
  • 5
9
votes
6 answers

How does program execution happen in firmware?

I have heard from people working in firmware domain, that there is no Operating system controlling firmware (eg firmware in a USB drive). There is just a single thread running in a while loop waiting for an external command, and this is the start…
Abhijit K Rao
  • 527
  • 1
  • 5
  • 10
9
votes
2 answers

Upgrade ARM over the air

We will create an ARM board with a GSM modem on-board. We want to be able to upgrade the ARM firmware over the air. Is there any good, reliable, open source solution for that? If not, is there a paid OS with this feature?
hotips
  • 389
  • 1
  • 3
  • 11
8
votes
4 answers

How do I upload a hex file firmware to a target board without using the arduino IDE?

Is there a way for me to create an installer that runs a shell script to upload a firmware update to an arduino that doesn't involve using the IDE? I have a thing that I make that sometimes needs a firmware update, and sometimes the people who…
Steve Cooley
  • 1,485
  • 1
  • 11
  • 16
1
2 3
16 17