Questions tagged [embedded]

Embedded refers to embedded systems, which involves areas such as microcontroller/DSP firmware programming, real-time systems, electronic interfaces, hardware drivers, serial bus communication etc.

Embedded systems are computer systems which are an internal component of a product (that is, embedded within a product) for a specific, usually limited, purpose which includes control, reconfigurability, or translation. Examples include digital watches, smart thermostats, automotive engine supervision, firewalls, solar panel controllers, PC keyboards, digital billboards, digital cameras, GPS receivers, traffic signal control and MP3 players.

Embedded systems contain a processing core that is either a microprocessor, a or a digital signal processor .

The key characteristic is being dedicated to handle a particular task. Since the embedded system is dedicated to specific tasks, its design can be optimized to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale.

The complexity of an embedded system can be any point along several orders of magnitude: from a vehicle counter with 150 bytes of code to an iPad with a sophisticated operating system kernel which manages gigabytes of local information.

Two major aspects of embedded system design and implementation is to reduce power consumption and heat reduction.


Tag usage

Apart from the tag, also tag your question with a specific development platform, tool chain, and/or target platform. Relevant tags are the specific compiler, specific processor, specific evaluation boards etc. that are used. Avoid using manufacturer tags such as for example as they generally add nothing of value. Instead, specify the microcontroller being used, for example .

This tag is not for questions about embedding media into HTML pages (<embed>), the #embed preprocessor directive, embedding visual components in a GUI, or embedding programming languages, databases or other things into web/desktop programs.

Please note that Stack Overflow is a programming site, and therefore questions about embedded systems that are related both to software and hardware will likely get a better reception at Electronics.stackexchange.com, where embedded systems hardware questions always are on-topic. For example, if you have a problem which could either be caused by software or by hardware, it is better to ask it on the electronics site.

Other sites that may also give a better response to specific embedded system questions:


Books


Resources

  • Wikipedia overview: including history, manufacture, implementations, debugging, tools, UIs, and architectures.
10540 questions
36
votes
6 answers

C++ exception overhead

Why do embedded platform developers continuosly attempt to remove usage C++ exceptions from their SDKs? For example, Bada SDK suggests the following workaround for the exception usage, which looks exceptionally ugly: result MyApp::InitTimer() { …
Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148
36
votes
2 answers

How to find /dev/ name of USB Device for Serial Reading on Mac OS?

I am trying to plug in a device into my Macbook and connect to it to read it's serial port. I know the device connects on baudrate 115200. Currently, I run the command ioreg -p IOUSB -l -b | grep -E "@|PortNum|USB Serial Number" I can see the…
M.S.
  • 893
  • 1
  • 7
  • 12
36
votes
2 answers

What happens when an ISR is running and another interrupt happens?

What happens if an ISR is running, and another interrupt occurs? Does the first interrupt get interrupted? Will the second interrupt get ignored? Or will it fire when the first ISR is done? EDIT I forgot to include it in the question (but I included…
BenjiWiebe
  • 2,116
  • 5
  • 22
  • 41
36
votes
6 answers

Unit testing device drivers

I have a situation where I need to write some unit tests for some device drivers for embedded hardware. The code is quite old and big and unfortunately doesn't have many tests. Right now, the only kind of testing that's possible is to completely…
Noufal Ibrahim
  • 71,383
  • 13
  • 135
  • 169
36
votes
8 answers

Experiences with (free) embedded TCP / IP stacks?

Does anyone have especially good (or bad) experiences with any of the following embedded TCP / IP stacks? uIP lwIP Bentham's TCP/IP Lean implementation The TCP/IP stack from this book My needs are for a solid, easy-to-port stack. Code size isn't…
Dan
  • 10,303
  • 5
  • 36
  • 53
34
votes
7 answers

Pimpl idiom without using dynamic memory allocation

we want to use pimpl idiom for certain parts of our project. These parts of the project also happen to be parts where dynamic memory allocation is forbidden and this decision is not in our control. So what i am asking is, is there a clean and nice…
erelender
  • 6,175
  • 32
  • 49
34
votes
13 answers

Is there any alternative to using % (modulus) in C/C++?

I read somewhere once that the modulus operator is inefficient on small embedded devices like 8 bit micro-controllers that do not have integer division instruction. Perhaps someone can confirm this but I thought the difference is 5-10 time slower…
JeffV
  • 52,985
  • 32
  • 103
  • 124
34
votes
5 answers

Power off an USB device in software on Windows

I would like to power cycle an USB device through software on Windows. I am doing development on a small USB power microcontroller. This chip will revert to native behavior on a power cycle and allow a code download. Since my code will crash the…
Perpetual Student
34
votes
5 answers

Why would I consider using an RTOS for my embedded project?

First the background, specifics of my question will follow: At the company that I work at the platform we work on is currently the Microchip PIC32 family using the MPLAB IDE as our development environment. Previously we've also written firmware for…
spade78
  • 1,939
  • 1
  • 20
  • 29
34
votes
2 answers

Differences Between ARM Assembly and x86 Assembly

I'm now going to learn ARM Assembly, to develop for my Windows Mobile 5 iPAQ, but I have some questions: What Are The Main Differences Between ARM Assembly and x86 Assembly? Is Any Differences In The Interrupts(New Types)? Which Are They And…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
33
votes
1 answer

Set ALSA master volume from C code

I've been looking for a simple C code example to set the master volume of the ALSA mixer but could not find anything simple for this supposedly common operation. I'm totally unfamiliar with ALSA, so making my own minimal example will take time. I…
trenki
  • 7,133
  • 7
  • 49
  • 61
33
votes
10 answers

Stack Size Estimation

In multi-threaded embedded software (written in C or C++), a thread must be given enough stack space in order to allow it to complete its operations without overflowing. Correct sizing of the stack is critical in some real-time embedded…
jeremytrimble
  • 1,814
  • 1
  • 18
  • 22
32
votes
3 answers

Use a html renderer in an embedded environment

I'm working on a project where I will design a GUI for an embedded device and would love to go with HTML for this. I hope you guys can help me find a render engine that suits my needs. Requirements: The web-page must be rendered into a memory…
tkarls
  • 3,171
  • 3
  • 27
  • 27
32
votes
13 answers

Using floats with sprintf() in embedded C

Guys, I want to know if float variables can be used in sprintf() function. Like, if we write: sprintf(str,"adc_read = %d \n",adc_read); where adc_read is an integer variable, it will store the string "adc_read = 1023 \n" in str (assuming that …
aditya
  • 952
  • 3
  • 16
  • 33
32
votes
8 answers

Windows CE vs Embedded Linux

Now I'm sure we're all well aware of the relative merits of Linux vs Windows Desktop. However I've heard much less about the world of embedded development. I'm mainly interested in solutions for industry and am therefore uninterested about the…
Quibblesome
  • 25,225
  • 10
  • 61
  • 100