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
70
votes
11 answers

What does this GCC error "... relocation truncated to fit..." mean?

I am programming the host side of a host-accelerator system. The host runs on the PC under Ubuntu Linux and communicates with the embedded hardware via a USB connection. The communication is performed by copying memory chunks to and from the…
ysap
  • 7,723
  • 7
  • 59
  • 122
68
votes
13 answers

Simple serial point-to-point communication protocol

I need a simple communication protocol between two devices (a PC and a microcontroller). The PC must send some commands and parameters to the micro. The micro must transmit an array of bytes (data from sensor). The data must be noise protected…
Vanuan
  • 31,770
  • 10
  • 98
  • 102
67
votes
10 answers

Unit Testing Embedded Software

What best practices have you used in unit testing embedded software that are peculiar to embedded systems?
Brandon E Taylor
  • 24,881
  • 6
  • 47
  • 71
65
votes
7 answers

What is a jump table?

Can someone explain the mechanics of a jump table and why is would be needed in embedded systems?
JeffV
  • 52,985
  • 32
  • 103
  • 124
63
votes
6 answers

Will printf still have a cost even if I redirect output to /dev/null?

We have a daemon that contains a lot of print messages. Since we are working on an embedded device with a weak CPU and other constraint hardware, we want to minimize any kinds of costs (IO, CPU, etc..) of printf messages in our final version. (Users…
Michael
  • 1,313
  • 11
  • 25
62
votes
1 answer

What is the difference between RTOS and Embedded Linux?

RTOS and Embedded Linux are used for embedded systems programming. Is Embedded Linux itself an RTOS ? Can anyone list the comparison or difference please?
NayabSD
  • 1,112
  • 2
  • 15
  • 26
59
votes
8 answers

Alternatives to Lua as an embedded language?

I am working on an embedded system running Linux on a DSP. Now we want to make some parts of it scriptable and we are looking for a nice embeddable scripting language. These scripts should integrate nicely with our existing C++ code base, be small…
bastibe
  • 16,551
  • 28
  • 95
  • 126
58
votes
8 answers

How much footprint does C++ exception handling add

This issue is important especially for embedded development. Exception handling adds some footprint to generated binary output. On the other hand, without exceptions the errors need to be handled some other way, which requires additional code, which…
oo_olo_oo
  • 2,815
  • 5
  • 28
  • 25
58
votes
5 answers

Using Haskell for sizable real-time systems: how (if?)?

I've been curious to understand if it is possible to apply the power of Haskell to embedded realtime world, and in googling have found the Atom package. I'd assume that in the complex case the code might have all the classical C bugs - crashes,…
Andrew Y
  • 5,107
  • 2
  • 28
  • 29
55
votes
7 answers

What is the difference between C and embedded C?

Can any body tell me the differences between them?
srujan
54
votes
7 answers

How to determine maximum stack usage in embedded system with gcc?

I'm writing the startup code for an embedded system -- the code that loads the initial stack pointer before jumping to the main() function -- and I need to tell it how many bytes of stack my application will use (or some larger, conservative…
David Cary
  • 5,250
  • 6
  • 53
  • 66
54
votes
7 answers

Floating point linear interpolation

To do a linear interpolation between two variables a and b given a fraction f, I'm currently using this code: float lerp(float a, float b, float f) { return (a * (1.0 - f)) + (b * f); } I think there's probably a more efficient way of doing…
Thomas O
  • 6,026
  • 12
  • 42
  • 60
54
votes
12 answers

How does an assembly instruction turn into voltage changes on the CPU?

I've been working in C and CPython for the past 3 - 5 years. Consider that my base of knowledge here. If I were to use an assembly instruction such as MOV AL, 61h to a processor that supported it, what exactly is inside the processor that interprets…
user407896
  • 950
  • 1
  • 8
  • 12
53
votes
10 answers

Optimizing member variable order in C++

I was reading a blog post by a game coder for Introversion and he is busily trying to squeeze every CPU tick he can out of the code. One trick he mentions off-hand is to "re-order the member variables of a class into most used and least…
DevinB
  • 8,231
  • 9
  • 44
  • 54
52
votes
6 answers

Embedded C++ : to use exceptions or not?

I realize this may be subjective, so will ask a concrete question, but first, background: I have always been an embedded software engineer, but usually at Layer 3 or 2 of the OSI stack. I am not really a hardware guy. I have generally always done…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551