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
32
votes
3 answers

C: Volatile Arrays in C

The volatile keyword is used in C to prevent the compiler performing certain optimizations, amongst other subtle changes, on a variable. For example; volatile int my_int = 0; creates an integer. In some situations it may prevent the following…
FreelanceConsultant
  • 13,167
  • 27
  • 115
  • 225
32
votes
13 answers

Convert ASM to C (not reverse engineer)

I googled and I see a surprising amount of flippant responses basically laughing at the asker for asking such a question. Microchip provides some source code for free (I don't want to post it here in case that's a no-no. Basically, google AN937,…
Steven
  • 576
  • 1
  • 5
  • 12
32
votes
6 answers

Does a LibC os exist?

I remember hearing about an embeddable OS that is essentially just libc (maybe it had support for c++). It didn't have a kernel, pipes or any of the other stuff you expect from an os. I tried looking for it in wikipedia but I didn't see it…
user34537
31
votes
3 answers

Compiler optimization of bitwise not operation

I have a simple function testing if two arrays are each others inverse. They are seemingly identical, except for a tmp variable. One works the other doesn't. I can't for the life of me figure out why the compiler would optimize this out - if it…
SupAl
  • 517
  • 3
  • 12
31
votes
3 answers

How does Linux determine the order of module init calls?

I have a device with SPI flash storage I'd like to use an UBIFS filesystem on that flash device as my rootfs. The problem I'm facing is that the UBI module initializes before the SPI module initializes. Because of this, when UBI loads, it cannot…
Shawn J. Goff
  • 4,635
  • 8
  • 34
  • 38
30
votes
2 answers

Beagleboard bare metal programming

I just got my BeagleBoard-Xm and I'm wondering if there is any detailed step by step tutorials on how to get a very simple bare metal software running on the hardware? The reason I ask is I want to deeply understand how the hardware architecture…
MrGigu
  • 1,729
  • 3
  • 23
  • 37
30
votes
4 answers

Who uses POSIX realtime signals and why?

I am not being flip I really don't get it. I just read a whole bunch of material on them and I can't figure out the use case. I am not talking talking so much about the API for which the advantages over things like signal() are clear enough. …
ValenceElectron
  • 2,678
  • 6
  • 26
  • 27
30
votes
1 answer

Device tree compiler not recognizes C syntax for include files

I want to compile my board device tree manually. I have downloaded the latest version of dtc from its official source, but when I try to run the following command, I get an error advising me to change all #include directives to /include/ and so on…
Saleh
  • 1,819
  • 1
  • 17
  • 44
30
votes
7 answers

Driving Beaglebone GPIO through /dev/mem

I'm trying to write a C program for blinking a LED on the Beaglebone. I know I can use the sysfs way...but I'd like to see if it is possible to get the same result mapping the physical address space with /dev/mem. I have a header file,…
Salvatore
  • 1,145
  • 3
  • 21
  • 42
29
votes
5 answers

Is it OK to #include .c source file for maintainability of embedded C code?

I am not an expert C programmer and I know that including .c source file from another is considered bad practice, but I have a situation where I think it could help maintainability. I have a big structure with a lot of elements and I use #define to…
ncenerar
  • 1,517
  • 12
  • 25
29
votes
4 answers

How "Real-Time" is Linux 2.6?

I am looking at moving my product from an RTOS to embedded Linux. I don't have many real-time requirements, and the few RT requirements I have are on the order of 10s of milliseconds. Can someone point me to a reference that will tell me how…
Robert Deml
  • 12,390
  • 20
  • 65
  • 92
28
votes
5 answers

SIGTRAP despite no set breakpoints; hidden hardware breakpoint?

I am debugging this piece of software for an STM32 embedded system. In one of the functions my programs keeps hitting some sort of breakpoint: SIGTRAP, Trace/breakpoint trap However, in GDB, when I do info breakpoints I get No breakpoints or…
Randomblue
  • 112,777
  • 145
  • 353
  • 547
28
votes
4 answers

Why would ch341-uart is disconnected from ttyUSB?

Here's the deal, I want to flash my stm32 board with my USB serial port. And my stm32 board comes with an extended board which carries CH340. When I connected the board to my computer, I can see the device with the command lsusb, and the output is…
LunarEclipse
  • 661
  • 1
  • 4
  • 14
28
votes
12 answers

Generate sine signal in C without using the standard function

I want to generate a sine signal in C without using the standard function sin() in order to trigger sine shaped changes in the brightness of a LED. My basic idea was to use a lookup table with 40 points and interpolation. Here's my first…
Peter123
  • 557
  • 1
  • 5
  • 13
28
votes
13 answers

GUI-Library for microcontroller

I want to create a GUI driven application for a micro-controller (Atmel XMEGA) that is connected to a 128x64 dots graphics LCD (EA DOGL128-6) and 4 buttons for navigation. Controlling the display itself (e.g. drawing pixels and characters) is no…
Martin
  • 10,738
  • 14
  • 59
  • 67