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
1618
votes
23 answers

Compiling an application for use in highly radioactive environments

We are compiling an embedded C++ application that is deployed in a shielded device in an environment bombarded with ionizing radiation. We are using GCC and cross-compiling for ARM. When deployed, our application generates some erroneous data and…
rook
  • 66,304
  • 38
  • 162
  • 239
952
votes
31 answers

Unit Testing C Code

I worked on an embedded system this summer written in straight C. It was an existing project that the company I work for had taken over. I have become quite accustomed to writing unit tests in Java using JUnit but was at a loss as to the best way…
Paul Osborne
  • 5,024
  • 6
  • 24
  • 20
761
votes
36 answers

Sorting 1 million 8-decimal-digit numbers with 1 MB of RAM

I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over another TCP connection. The list of numbers may…
Favourite Onwuemene
  • 4,247
  • 8
  • 28
  • 46
224
votes
20 answers

How can I unit test Arduino code?

I'd like to be able to unit test my Arduino code. Ideally, I would be able to run any tests without having to upload the code to the Arduino. What tools or libraries can help me with this? There is an Arduino emulator in development which could be…
Matthew Murdoch
  • 30,874
  • 30
  • 96
  • 127
203
votes
4 answers

Understanding Linux /proc/pid/maps or /proc/self/maps

I am trying to understand my embedded Linux application's memory use. The /proc/pid/maps utility/file seems to be a good resource for seeing the details. Unfortunately I don't understand all the columns and entries. What does the anonymous inode 0…
simon
  • 5,777
  • 7
  • 30
  • 36
170
votes
16 answers

How do you implement a class in C?

Assuming I have to use C (no C++ or object oriented compilers) and I don't have dynamic memory allocation, what are some techniques I can use to implement a class, or a good approximation of a class? Is it always a good idea to isolate the "class"…
Ben Gartner
  • 14,413
  • 10
  • 36
  • 34
154
votes
13 answers

How are everyday machines programmed?

How are everyday machines (not so much computers and mobile devices as appliances, digital watches, etc) programmed? What kind of code goes into the programming of a Coca-Cola vending machine? How does my coffee maker accept a pre-programmed time…
Josh Leitzel
  • 15,089
  • 13
  • 59
  • 76
147
votes
14 answers

When is CRC more appropriate to use than MD5/SHA1?

When is it appropriate to use CRC for error detection versus more modern hashing functions such as MD5 or SHA1? Is the former easier to implement on embedded hardware?
Gili
  • 86,244
  • 97
  • 390
  • 689
127
votes
15 answers

Quickly find whether a value is present in a C array?

I have an embedded application with a time-critical ISR that needs to iterate through an array of size 256 (preferably 1024, but 256 is the minimum) and check if a value matches the arrays contents. A bool will be set to true is this is the…
wlamers
  • 1,276
  • 2
  • 12
  • 14
109
votes
9 answers

Difference between const & const volatile

If we declare a variable as volatile every time the fresh value is updated If we declare a variable as const then the value of that variable will not be changed Then const volatile int temp; What is the use of declaring the variable temp as…
user559208
  • 1,485
  • 3
  • 13
  • 9
97
votes
29 answers

Is there any reason to use C instead of C++ for embedded development?

Question I have two compilers on my hardware C++ and C89 I'm thinking about using C++ with classes but without polymorphism (to avoid vtables). The main reasons I’d like to use C++ are: I prefer to use “inline” functions instead of macro…
Piotr Czapla
  • 25,734
  • 24
  • 99
  • 122
90
votes
4 answers

Writing a parser like Flex/Bison that is usable on 8-bit embedded systems

I'm writing a small interpreter for a simple BASIC like language as an exercise on an AVR microcontroller in C using the avr-gcc toolchain. If I were writing this to run on my Linux box, I could use flex/bison. Now that I restricted myself to an…
Johan
  • 3,072
  • 3
  • 27
  • 27
82
votes
12 answers

Embedded C++ : to use STL or not?

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 telecoms products, usually hand/cell-phones, which generally means something like an ARM 7…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
81
votes
3 answers

Why is C++ template use not recommended in a space/radiated environment?

By reading this question, I understood, for instance, why dynamic allocation or exceptions are not recommended in environments where radiation is high, like in space or in a nuclear power plant. Concerning templates, I don't see why. Could you…
Guillaume D
  • 2,202
  • 2
  • 10
  • 37
75
votes
16 answers

What are the available interactive languages that run in tiny memory?

I am looking for general purpose programming languages that have an interactive (live coding) prompt work in 32 KB of RAM by itself or 8 KB when the compiler is hosted on a separate machine run on a microcontroller with as little as 8-32 KB RAM…
dwhall
  • 657
  • 1
  • 8
  • 13
1
2 3
99 100