Questions tagged [firmware]

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

Filter by
Sorted by
Tagged with
29
votes
9answers
8k views

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 ...
24
votes
2answers
6k views

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 ...
21
votes
7answers
5k views

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 ...
18
votes
4answers
7k views

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 ...
18
votes
2answers
2k views

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 ...
17
votes
6answers
21k views

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 ...
16
votes
7answers
32k views

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 ...
16
votes
5answers
2k views

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 ...
14
votes
4answers
2k views

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 ...
13
votes
3answers
8k views

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 (...
12
votes
10answers
3k views

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 ...
11
votes
4answers
2k views

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/...
9
votes
6answers
6k views

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 ...
9
votes
2answers
2k views

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 ...
8
votes
4answers
19k views

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 ...
8
votes
3answers
3k views

How to program multiple STM32Fs on same PCB

I work in a management roll and only have a very limited electronics knowledge (enough to make simple arduino projects etc). We are working on a product at the moment which has 3 STM32F303s and 2 ...
8
votes
2answers
2k views

Software only USB implementation for ARM-M0/M0+?

Since I'm worried about the future of AVR, I've been looking into software USB for ARM cortex-M0/M0+ that is similar to V-USB. All I've found is a port of LUFA, which is for MCUs with internal USB ...
7
votes
5answers
2k views

EEPROM endurance in energy meter?

I am designing an energy meter for electricity billing purposes by converting an analogue energy meter and counting the number of pulses given by the analogue meter's LED. Since power may be cut off ...
7
votes
1answer
3k views

Extracting firmware using JTAG

I've searched around and found quite a few examples of articles claiming to have extracted firmware from some device using the JTAG interface. I have read further that there is no general procedure ...
6
votes
1answer
1k views

How to get rid of shift and logical operations

I am trying to upgrade an old firmware of a 32-bit MCU. The fw has many macros in it which uses various operations eg., logical shift etc. I want to replace these shift and logical operations. An ...
6
votes
2answers
3k views

Is it worth it to go full stack as an embedded engineer? [closed]

In big companies, they tend to separate embedded engineers by disciplines such as firmware, hardware, interface software, and PCB layout. Still, I think it's more fun to work 'full stack' and build ...
6
votes
3answers
2k views

How to extend a microcontroller GPIO to ~300 inputs?

I need to find out the address of buttons pushed. Say I need about 300 Input port required dedicated for individual buttons. Then I would need 300 I/O pins to read the address of a pushed button which ...
6
votes
3answers
2k views

How can we read two digital inputs simultaneously from ATxMega128?

I am new here.. I have two IR sensors that give digital output (0 when there is something in front of it and 1 when there isn't). I am using a ATxMEGA128 to run motors using these sensors but I am ...
6
votes
3answers
1k views

Loading firmware via JTAG without soldering on headers every time?

Is there a good way to load firmware onto a PCB that has a 2x5 arrangement of JTAG headers that doesn't involve soldering on pins every time? I tried getting come pogo pins in the hopes of being able ...
6
votes
4answers
3k views

Error handling in embedded systems development

I am developing a Firmware and I am using 3 layers: Driver, Platform and Application. In order to handle the communication between these layers, I am using an approach where each function will return ...
6
votes
2answers
2k views

What are methods to mitigate or reduce brown out resets?

How can I prevent or reduce the effects of low voltage causing the Arduino to reset? What would be the best proactive or reactive methods to deal with brown out resets? Edit: is there a reactive way ...
6
votes
1answer
731 views

Time Base ISR Concurrency

This is sort of a "classic" problem, and I think I have a solution, but I want to vet it with this community. I am building a project using the ATtiny88 microcontroller, and I'm programming in avr-gcc....
5
votes
3answers
3k views

ESP8266-12E MicroPython Unable to access REPL (Python prompt)

I am trying to install MIcroPython Firmware on my ESP8266-12E chip. I am using esptool.py to flash the firmware. I have successfully uploaded the firmware ...
5
votes
1answer
638 views

Problem building Arduino Uno firmware

I am trying to build the Arduino firmware on Win7 using WinAVR and FLIP. I have successfully built the firmware and have a "arduino-usbserial.hex" file to upload, but when I flash the Uno and plug it ...
5
votes
0answers
669 views

How would one clone a BeagleBone? [closed]

tl;dr: Assuming I'd had a BeagleBone perfectly manufactured from the open-source schematics+layouts, what would be necessary to get it to the same level of functionality as a newly-unboxed BeagleBone? ...
4
votes
2answers
718 views

ARM Cortex M3 firmware

First some background information. There is one product (a sensor) bought from a far eastern manufacturer, bless their white cotton socks, that uses the STM32F103V microcontroller. The firmware that ...
4
votes
1answer
2k views

Documentation generator for embedded C projects

I'm looking for the equivalent of what Javadoc is to Java and from that, a way to standardize code documentation. Is doxygen more common in this context. Are there built-in, IDE-dependent options? I'...
4
votes
2answers
12k views

Basic Embedded Firmware testing essentials and Software Test plan [closed]

I am trying to make an embedded product, but I'm new to firmware testing and want to make sure I don't miss anything. What are the things that need to be checked for its firmware performance? Proper ...
4
votes
2answers
685 views

How do volume production manufacturers use contactless JTAG programming?

Do high volume manufacturing outfits all make a custom made 'bed of nails'? I have not been able to find a ready jtag contact pattern and spring loaded header other than tag-connect pointed in this ...
4
votes
1answer
108 views

How can I make it so that customers who buy my arm based product can easily update the firmware?

I'm building an arm-based (stm32F7) hardware device which will have a USB port. I would like to be able to update the firmware and distribute it such that customers with my device can easily install ...
4
votes
2answers
16k views

STM32 USART with DMA — which interrupts to use?

I'm working on firmware for an STM32F103 which is communicating over RS232 at 115200 baud with a motor controller. The motor controller (a Copley Xenus XTL) operates on a "speak when spoken to" ...
4
votes
1answer
2k views

Is there a preferred encryption scheme for encrypting firmware builds on external flash?

I have a product that is going to be deployed in large numbers, and I want to maximize the trouble that someone is going to go through to reverse engineer it (a high level of security). It is an ...
4
votes
1answer
613 views

Why is this hex file different than the code programmed onto the device?

I have a design using an STM32F105. My application written in C; using Eclipse and gcc. I have been using Eclipse (with OpenOCD and an ST-LINK/V2 programmer) to write the firmware to the devices. Now ...
4
votes
1answer
909 views

How to add memory to an ARM Cortex Microcontroller

I am looking into a design that would use the ARM Cortex M4F core but am just the software engineer for the project. The EE tells me that there will be an 64 MByte sdram memory module connected to the ...
4
votes
0answers
512 views

How to develop for the NRF24LE1? [closed]

I found about the nRF24LE1 chips a while ago and they seem perfect for really small applications that require RF since they are the same as the well-known nRF 24L01 but include an 8051 MCU and memory. ...
3
votes
3answers
728 views

Prevent Firmware theft

I would like to know if there is a 100% safe option today to prevent firmware copy from MCUs. Most MCUs can have an option set at programming that will block any code extraction, but this is usually ...
3
votes
1answer
9k views

How to flash protected STM8 MCU?

I would like to flash a new firmware on my STM8L15xC8. I have ST Visual Programmer (STVP) installed and can successfully flash the MCU of the STM8 Discovery board. Now, I setup the STM8 Discovery ...
3
votes
2answers
463 views

Multiple(five) alarm time setting in stm32f0 mcu

I am working on my hobbyist project and need to develop the alarm timings. And RTC and Timer are new for me and I am confused in RTC Alarm time setting. I need to make alarm with RTC for five ...
3
votes
2answers
363 views

Need of self testabilty code inside embedded firmware modules?

I have a question to ask about the self-testability code inside a firmware module. I have developed code, and it was in a shamble, and I was clueless about firmware architecture too. Later I found ...
3
votes
3answers
515 views

C to C++ How do I make h/w initialization look neat? [closed]

Doing an experimental conversion of some firmware from C to C++ to try and get a better structure in it, since the C code "evolved" in line with experiments across a 2 year period. The question is ...
3
votes
3answers
1k views

How to define 14-bit lookup table for PIC/XC8 (if it's possible to do without assembly)?

I'm writing the firmware for a simple testing device that would need to store a very large lookup table (I need 13500 entries with values 0..100 decimal). The target PIC MCU is PIC16F1829 (8K words of ...
3
votes
1answer
8k views

PIC32 PWM minimal example

I am having trouble getting a simple PWM output to work at all on a PIC32MX775F512H. Looking online, this seems to be all I need to get something working: ...
3
votes
2answers
1k views

Elegant structure for coding embedded systems in C

Some questions regarding efficient coding style using C: I'm working on 8-bit PIC controllers using C. I would like to know certain things about coding style and structure. I have read that keeping ...
3
votes
2answers
4k views

Bootloader jump to main application problem using STM32 with Keil Uvision

I am developing for the STM32F0 using Keil uVision. I have a custom bootloader loaded running at address 0x08000000. I need the bootloader to jump to my main application which I flash at address ...
2
votes
5answers
559 views

Measuring firmware performance

I am using C compiler and PIC controllers. I've been wondering about measuring the performance of the f/w code that we write. I have two versions of structures for the same code: First one: using <...

1
2 3 4 5