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

why need linker script and startup code?

I've read this tutorial I could follow the guide and run the code. but I have questions. 1) Why do we need both load-address and run-time address. As I understand it is because we have put .data at flash too; so why we don't run app there, but need…
dvn0zzz
  • 337
  • 3
  • 13
4
votes
1 answer

CppUtest: how to return a custom struct from mocked function

I'm starting using CppUTest for some C embedded projects. Now I'm dealing with mocked calls to the system. After learned how to pass C typicall types, in ex: Example that works properly: Mock file part of code: uint32_t…
Suvi_Eu
  • 255
  • 1
  • 3
  • 16
4
votes
4 answers

How to safely access memory mapped hardware register from C or C++ language level?

In C and C++ I usually access memory mapped hardware registers with the well known pattern: typedef unsigned int uint32_t; *((volatile uint32_t*)0xABCDEDCB) = value; As far as I know, the only thing guaranteed by the C or C++ standard is that…
mrn
  • 959
  • 5
  • 15
4
votes
2 answers

Possible to modify mini controller/micro controller code on store product?

My girlfriend recently bought a product for her skin, its basically a mask with lights on the inside that runs a power cord similar to an auxiliary cord into an auxiliary port on a mini controller. It is only good for 30 uses, every time you turn it…
NicholasByDesign
  • 781
  • 1
  • 11
  • 33
4
votes
3 answers

Where memory segments are defined?

I just learned about different memory segments like: Text, Data, Stack and Heap. My question is: 1- Where the boundaries between these sections are defined? Is it in Compiler or OS? 2- How the compiler or OS know which addresses belong to each…
doubleE
  • 1,027
  • 1
  • 12
  • 32
4
votes
1 answer

Minimum delay to communicate through serial using Python

I have a simple Python script to communicate with a micro-controller (STM32F103C8T6) using the serial port. I'm using pySerial to write a couple of 44-bytes messages at a time. [...] serial =…
gabrieljcs
  • 689
  • 6
  • 13
4
votes
0 answers

Failed to request_irq for kernel module

I am trying to port drivers from old kernel to new one on ARM based platform. While porting one of the drivers I have noticed that request_irq fails on new kernel. Actually, what this driver have is a number of hard coded irq numbers, and it tries…
Alex Hoppus
  • 3,821
  • 4
  • 28
  • 47
4
votes
1 answer

stm32 SPI + DMA

I try to send data with SPI using DMA channel. When I send without DMA everything is OK, but with DMA sth is wrong. When I debug my program SPI DR register is always 0. I would like to use dma circular mode to send my array all the time. There is my…
kmbm
  • 115
  • 2
  • 9
4
votes
3 answers

Writing array to specific flash location in the .hex file

For my embedded application on Atmel SAM4E16C i need to place an array with firmware information at the end of the .hex file. I'm using Atmel Studio 7 with GCC. I've already done this for Atmega168PB but somehow it doesn't work for this project.…
Maku
  • 199
  • 2
  • 15
4
votes
4 answers

How are floating point operations emulated in software?

How does software perform floating point arithmetic when the CPU has no (or buggy) floating point unit? Examples would be the PIC, AVR, and 8051 microcontrollers architectures.
andre_lamothe
  • 2,171
  • 2
  • 41
  • 74
4
votes
3 answers

Custom Linux GUI

I'm interested in creating a GUI for a Linux operating system. What I'm trying to do, is, a program will be the GUI -- the program will have be quite basic. I think this question will go into Embedded Linux development, but I'm not sure where to…
Sam Davis
  • 99
  • 2
4
votes
0 answers

Getting rid of cast-align warning for one specific case

I'm using this implementation of container_of on arm: #define container_of(ptr, type, member) \ ({ \ const typeof(((type *) NULL)->member) *__mptr = (ptr); \ (type *) (void*)((char *) __mptr -…
Martin
  • 3,509
  • 3
  • 26
  • 31
4
votes
2 answers

malloc() in newlib : does it waste memory after one big failure allocation?

I am writing an embedded software for STM32F7 and my libc is newlib-2.4.0.20160527. I have implemented _sbrk() as follows: extern intptr_t g_bss_end; /* value after the last byte in .bss */ extern intptr_t g_msp_lim; /* stack buffer starts at this…
Piotr Jedyk
  • 361
  • 1
  • 10
4
votes
1 answer

Executing code that is preloaded in flash NOR

I'm building a uClinux system to run on an NXP LPC2478. The chip has 512k on-board fast flash from which it can directly execute code. I want to load and run a user app out of regular external SDRAM. But I have a special graphics library that I…
user126593
  • 2,707
  • 4
  • 21
  • 16
4
votes
2 answers

Initialising int affects function return value

Sorry for the vagueness of this question's title, but I'm not sure how to ask this exactly. The following code, when executed on an Arduino microprocessor (c++ compiled for an ATMega328 microprocessor) works fine. Return values shows in comments in…
CharlieB
  • 704
  • 7
  • 14