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
42
votes
9 answers

How do you design a serial command protocol for an embedded system?

I have an embedded system I'm communicating with over serial. The command structure right now is designed to be operated interactively: it displays a prompt, accepts a few commands, and displays results in a human-readable form. I'm thinking about…
jparker
  • 1,569
  • 2
  • 16
  • 16
41
votes
6 answers

Lookup table vs switch in C embedded software

In another thread, I was told that a switch may be better than a lookup table in terms of speed and compactness. So I'd like to understand the differences between this: Lookup table static void func1(){} static void func2(){} typedef enum { …
Plouff
  • 3,290
  • 2
  • 27
  • 45
41
votes
9 answers

Algorithm to rotate an image 90 degrees in place? (No extra memory)

In an embedded C app, I have a large image that I'd like to rotate by 90 degrees. Currently I use the well-known simple algorithm to do this. However, this algorithm requires me to make another copy of the image. I'd like to avoid allocating…
user9876
  • 10,954
  • 6
  • 44
  • 66
41
votes
17 answers

Anyone using Python for embedded projects?

My company is using Python for a relatively simple embedded project. Is anyone else out there using Python on embedded platforms? Overall it's working well for us, quick to develop apps, quick to debug. I like the overall "conciseness" of the…
Fred Basset
  • 1,147
  • 1
  • 12
  • 10
41
votes
9 answers

C++, can I statically initialize a std::map at compile time?

If I code this std::map example = { (1, 'a'), (2, 'b'), (3, 'c') }; then g++ says to me deducing from…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
40
votes
6 answers

A good serial communications protocol/stack for embedded devices?

After writing several different custom serial protocols for various projects, I've started to become frustrated with re-inventing the wheel every time. In lieu of continuing to develop custom solutions for every project, I've been searching for a…
Gabe
  • 2,526
  • 1
  • 23
  • 24
39
votes
9 answers

How do you start running the program over again in gdb with 'target remote'?

When you're doing a usual gdb session on an executable file on the same computer, you can give the run command and it will start the program over again. When you're running gdb on an embedded system, as with the command target localhost:3210, how do…
jfm3
  • 36,964
  • 10
  • 32
  • 35
39
votes
13 answers

Fastest way to scan for bit pattern in a stream of bits

I need to scan for a 16 bit word in a bit stream. It is not guaranteed to be aligned on byte or word boundaries. What is the fastest way of achieving this? There are various brute force methods; using tables and/or shifts but are there any "bit…
user172783
37
votes
13 answers

Why are global variables bad, in a single threaded, non-os, embedded application

Most of the objections I see to using global variables make sense since they refer to issues of multiple threads, thread safety, etc. But in a small, single threaded, non-OS, case, what objections do you have? In my case, I'm writing my embedded…
loneRanger
  • 812
  • 1
  • 8
  • 14
37
votes
6 answers

Learning kernel hacking and embedded development at home?

I was always attracted to the world of kernel hacking and embedded systems. Has anyone got good tutorials (+easily available hardware) on starting to mess with such stuff? Something like kits for writing drivers etc, which come with good…
abyx
  • 69,862
  • 18
  • 95
  • 117
37
votes
14 answers

Does it matter which microcontroller to use for 1st time embed system programmer?

I've experience in doing desktop and web programming for a few years. I would like to move onto doing some embed system programming. After asking the initial question, I wonder which hardware / software IDE should I start on... Arduino + Arduino…
Henry
  • 32,689
  • 19
  • 120
  • 221
37
votes
10 answers

Multiple assignment in one line

I just come across the statement in embedded c (dsPIC33) sample1 = sample2 = 0; Would this mean sample1 = 0; sample2 = 0; Why do they type it this way? Is this good or bad coding?
Riscy
  • 843
  • 4
  • 13
  • 28
37
votes
20 answers

AVR or PIC to start programming Microcontroller?

Which family should I start to learn? (Never did any programming on microcontroller)
Patrick Desjardins
  • 136,852
  • 88
  • 292
  • 341
36
votes
5 answers

Program received signal SIGTRAP, Trace/breakpoint trap

I'm debugging a piece of (embedded) software. I've set a breakpoint on a function, and for some reason, once I've reached that breakpoint and continue I always come back to the function (which is an initialisation function which should only be…
Randomblue
  • 112,777
  • 145
  • 353
  • 547
36
votes
1 answer

What exactly is a dual-issue processor?

I came across several references to the concept of a dual issue processor (I hope this even makes sense in a sentence). I can't find any explanation of what exactly dual issue is. Google gives me links to micro-controller specification, but the…
Phonon
  • 12,549
  • 13
  • 64
  • 114