Lecture 29 min.
An embedded system (built-in system) is a specialized microprocessor-based system for control, supervision and monitoring, whose design concept is that the system operates while built directly into the device it controls.
An embedded system is a specialized computer system — a combination of a computer processor, computer memory and input/output peripheral devices — that has a dedicated function within a larger mechanical or electronic system. ] It is embedded as part of a complete device, often including electrical or electronic hardware and mechanical parts. Because an embedded system typically controls the physical operations of the machine in which it is embedded, it often has real-time computing constraints. Embedded systems control many everyday devices. [ 3 ] In 2009, it was estimated that ninety-eight percent of all microprocessors manufactured were used in embedded systems.
Modern embedded systems are often based on microcontrollers (that is, microprocessors with integrated memory and peripheral interfaces), but ordinary microprocessors (using external chips for memory and peripheral interface circuits) are also common, especially in more complex systems. In either case, the processors used may range from general-purpose types to those specialized for a certain class of computations, or even custom-designed for a particular application. A common standard class of specialized processors is the digital signal processor (DSP).
Because an embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and to increase its reliability and performance. Some embedded systems are mass-produced, which yields savings through economies of scale.
Embedded systems range in size from portable personal devices such as digital watches and MP3 players to larger machines such as home appliances, industrial assembly lines, robots, vehicles, traffic light controllers and medical imaging systems. They are often subsystems of other machines, such as avionics in aircraft and astrionics in spacecraft. Large installations such as factories, pipelines and electrical grids rely on multiple networked embedded systems. Generalized through software customization, embedded systems such as programmable logic controllers often include their own functional units.
Embedded systems vary in complexity: from simple ones built around a single microcontroller to very complex ones with multiple units, peripherals and networks, which may be housed in equipment racks or span large geographic areas connected by long-distance communication lines.
The origins of the microprocessor and the microcontroller can be traced back to the MOS integrated circuit, which is an integrated circuit made from MOSFETs (metal-oxide-semiconductor field-effect transistors) and was developed in the early 1960s. By 1964, MOS chips had reached higher transistor density and lower manufacturing costs than bipolar chips. The complexity of MOS chips continued to increase at the rate predicted by Moore's law, leading to large-scale integration (LSI) with hundreds of transistors on a single MOS chip by the late 1960s. The application of MOS LSI chips to computing was the basis for the first microprocessors, as engineers began to realize that a complete computer processor system could be contained on several MOS LSI chips.
The first multi-chip microprocessors, the Four-Phase Systems AL1 in 1969 and the Garrett AiResearch MP944 in 1970, were developed with several MOS LSI chips. The first single-chip microprocessor was the Intel 4004, released in 1971. It was developed by Federico Faggin, using his silicon-gate MOS technology, along with Intel engineers Marcian Hoff and Stan Mazor, and Busicom engineer Masatoshi Shima.

One of the first recognizably modern embedded systems was the Apollo Guidance Computer, developed around 1965 by Charles Stark Draper at the MIT Instrumentation Laboratory. At the start of the project, the Apollo Guidance Computer was considered the riskiest item in the Apollo project, since it used the newly developed monolithic integrated circuits to reduce the size and weight of the computer.
One of the first mass-produced embedded systems was the Autonetics D-17 guidance computer for the Minuteman missile, released in 1961. When Minuteman II production began in 1966, the D-17 was replaced by a new computer that represented the first high-volume use of integrated circuits.
Since these early applications appeared in the 1960s, embedded systems have become cheaper, and their processing power and functionality have increased dramatically. The early Intel 4004 microprocessor (released in 1971) was designed for calculators and other small systems, but still required external memory and support chips. By the early 1980s, memory components and input and output systems had been integrated onto the same chip as the processor, forming a microcontroller. Microcontrollers find applications where a general-purpose computer would be too expensive. As the cost of microprocessors and microcontrollers fell, the prevalence of embedded systems grew.
A comparatively low-cost microcontroller can be programmed to fulfill the same role as a large number of separate components. With microcontrollers, it became possible to replace, even in consumer products, expensive knob-based analog components such as potentiometers and variable capacitors with up/down buttons or knobs read by a microprocessor. Although in this context an embedded system is usually more complex than the traditional solution, most of the complexity is contained within the microcontroller itself. Very few additional components may be needed, and most of the design effort goes into software. Software prototyping and testing can be faster compared with designing and building a new circuit that does not use an embedded processor.

PC system: ALIX.1C Mini-ITX motherboard with an AMD Geode LX 800 processor, including CF, Mini PCI and PCI slots, a 44-pin IDE interface, audio, USB and 256 MB of RAM
Because the control system will be housed inside a more complex device, the following factors play a key role in its design:
Simple embedded systems are often built around single-board (single-chip) computers (see: microcontroller), specialized or general-purpose microprocessors, and FPGAs.
It is common to use directly, or to provide a high degree of compatibility with, devices and interfaces that became obsolete over their long production life (decades), for example processors of the Intel 8086, i386, i486 and Pentium families and their analogs, or the ISA bus, because of the low cost of developing a specific solution.
Embedded systems are designed to perform a specific task, in contrast to general-purpose computers, which are designed to perform multiple tasks. Some of them have real-time performance constraints that must be met for reasons such as safety and usability; others may have low or no performance requirements, which allows the system hardware to be simplified to reduce costs.
Embedded systems are not always standalone devices. Many embedded systems are a small part of a larger device that serves a more general purpose. For example, the Gibson Robot Guitar features an embedded system for tuning the strings, but the overall purpose of the Robot Guitar is to play music. [ 9 ] Similarly, an embedded system in an automobile performs a specific function as a subsystem of the car itself.

e-con Systems eSOM270 and eSOM300 computer modules
The software instructions written for embedded systems are called firmware and are stored in read-only memory or flash memory chips. They run with limited computer hardware resources: a small amount of memory, and a small keyboard and screen or none at all.

An embedded system text user interface using MicroVGA
Embedded systems range from having no user interface at all in systems dedicated to a single task, to complex graphical user interfaces that resemble modern desktop computer operating systems. Simple embedded devices use buttons, light-emitting diodes (LEDs), and graphic or character liquid-crystal displays (LCDs) with a simple menu system. More sophisticated devices that use a graphical screen with touch sensing or on-screen soft keys provide flexibility while minimizing the space used: the meaning of the buttons can change along with the screen, and selection involves the natural behavior of pointing at what is wanted.
Some systems provide a user interface remotely by means of a serial (for example, RS-232 ) or network (for example, Ethernet ) connection. This approach extends the capabilities of the embedded system, avoids the cost of a display, simplifies the board support package (BSP), and allows designers to build a rich user interface on the PC. A good example of this is the combination of an embedded HTTP server running on the embedded device (such as an IP camera or a network router ). The user interface is displayed in a web browser on a PC connected to the device.

Close-up of the SMSC LAN91C110 (SMSC 91x) chip, an embedded Ethernet chip.
Embedded systems talk with the outside world through peripherals , such as:
As with other software, embedded system designers use compilers , assemblers and debuggers to develop embedded system software. However, they may also use some more specific tools:
Software tools can come from several sources:
As the complexity of embedded systems grows, higher-level tools and operating systems are migrating into machines where it makes sense. For example, cellular phones , personal digital assistants and other consumer computers often need significant software that is purchased or provided by a person other than the manufacturer of the electronics. In these systems, an open programming environment such as Linux , NetBSD , FreeBSD , OSGi or Embedded Java is required so that a third-party software provider can sell to a large market.
Areas of application of embedded systems include:
Embedded systems are commonly found in consumer, industrial, automotive , home appliance , medical, telecommunication, commercial, aerospace and military applications.
Telecommunications systems employ numerous embedded systems, from telephone switches for the network to cell phones at the end user . Computer networks use dedicated routers and network bridges to route data.
Consumer electronics include MP3 players , televisions , mobile phones , video game consoles , digital cameras , GPS receivers and printers . Household appliances, such as microwave ovens , washing machines and dishwashers , include embedded systems to provide flexibility, efficiency and features. Advanced heating, ventilation and air conditioning (HVAC) systems use networked thermostats to more accurately and efficiently control temperature, which can change by time of day and season . Home automation uses wired and wireless networking that can be used to control lights, climate, security, audio/visual, surveillance, etc., all of which use embedded devices for sensing and controlling.
Transportation systems from flight to automobiles increasingly use embedded systems. New airplanes contain advanced avionics such as inertial guidance systems and GPS receivers, which also have considerable safety requirements. Spacecraft rely on astrionics systems for trajectory correction. Various electric motors — brushless DC motors , induction motors and DC motors — use electronic motor controllers . Automobiles , electric vehicles and hybrid vehicles increasingly use embedded systems to maximize efficiency and reduce pollution. Other automotive safety systems using embedded systems include the anti-lock braking system (ABS), electronic stability control (ESC/ESP), traction control (TCS) and automatic four-wheel drive .
Medical equipment uses embedded systems for monitoring and for various medical imaging modalities (positron emission tomography (PET), single-photon emission computed tomography (SPECT), computed tomography (CT) and magnetic resonance imaging (MRI)) for noninvasive internal inspections. Embedded systems within medical equipment are often powered by industrial computers.
Embedded systems are used for safety-critical systems in the aerospace and defense industries. Unless they are connected to wired or wireless networks via embedded 3G cellular or other methods for IoT monitoring and control purposes, these systems can be isolated from hacking and thus be more secure. For fire safety, the systems can be designed to have a greater ability to handle higher temperatures and continue to operate. In terms of security, embedded systems can be self-sufficient and able to cope with cut electrical and communication systems.
Miniature wireless devices called motes are networked wireless sensors. A wireless sensor network uses the miniaturization made possible by advanced integrated circuit (IC) design to couple full wireless subsystems to sophisticated sensors, enabling people and companies to measure a myriad of things in the physical world and act on this information through monitoring and control systems. These motes are completely self-contained and will typically run off a battery source for many years before the batteries need to be changed or charged.
Some embedded systems are used on a massive scale, for example RFID devices. Embedded systems are an attractive target for malware authors because of their prevalence and relative lack of protection. Attackers are gradually trying to create malicious code for embedded systems (for example, the RFID virus and Cabir). This process is so far hampered by the heterogeneity of embedded devices, the absence of dominant software, and the limited functionality of some types of devices. On the other hand, the task of antivirus companies and computer security researchers is complicated by the same circumstances, as well as by the low power of embedded systems, which often does not allow the use of common antivirus software.
A great many modern microprocessors and microcontrollers can serve as the central processing unit of an embedded system. The specific type is determined at the design stage, based on the goals and tasks the embedded system performs.
Examples of the properties of typical embedded computers compared with their general-purpose counterparts are low power consumption, small size, rugged operating ranges and low per-unit cost. This comes at the price of limited processing resources.
Numerous microcontrollers have been developed for use in embedded systems. General-purpose microprocessors are also used in embedded systems, but they generally require more supporting circuitry than microcontrollers.
PC/104 and PC/104+ are examples of standards for ready-made computer boards intended for small, low-volume embedded and ruggedized systems. They are mostly x86-based and often physically small compared with a standard PC, although still quite large compared with most simple (8/16-bit) embedded systems. They may use DOS , FreeBSD , Linux , NetBSD , OpenHarmony or an embedded real-time operating system (RTOS) such as MicroC/OS-II , QNX or VxWorks .
In certain applications, where small size or power efficiency are not primary concerns, the components used may be compatible with those used in general-purpose x86 personal computers. Boards such as the VIA EPIA range help to bridge the gap by being PC-compatible but highly integrated, physically smaller or having other attributes that make them attractive to embedded engineers. The advantage of this approach is that low-cost commodity components may be used along with the same software development tools used for general software development. Systems built in this way are still regarded as embedded, since they are integrated into larger devices and fulfill a single role. Examples of devices that may adopt this approach are automated teller machines (ATMs) and arcade machines , which contain application-specific code.
However, most ready-made embedded system boards are not PC-oriented and do not use the ISA or PCI buses. When a system-on-a-chip processor is involved, there may be little benefit to having a standardized bus connecting discrete components, and the environment for both hardware and software tools may be very different.
One common design style uses a small system module, perhaps the size of a business card, containing high-density BGA chips such as an ARM-based processor and peripherals, external flash memory for storage, and DRAM for runtime memory. The module vendor will usually provide boot software and make sure there is a selection of operating systems, usually including Linux and some real-time choices. These modules can be manufactured in high volume by organizations familiar with their specialized test issues, and combined with much lower volume custom mainboards with application-specific external peripherals. Prominent examples of this approach are Arduino and Raspberry Pi .
A system on a chip (SoC) contains a complete system consisting of several processors, multipliers, caches, even different types of memory, and usually various peripherals such as interfaces for wired or wireless communication on a single chip. Graphics processing units (GPUs) and DSPs are often included in such chips. SoCs can be implemented as an application-specific integrated circuit (ASIC) or using a field-programmable gate array (FPGA), which can usually be reconfigured.
ASIC implementations are common for very high-volume embedded systems such as mobile phones and smartphones . ASIC or FPGA implementations may be used for embedded systems of not very high volume with special needs in signal processing performance, interfaces and reliability, for example in avionics.
Embedded debugging may be performed at different levels, depending on the available capabilities. Considerations include: whether it slows down the main application, how close the system or application being debugged is to the actual system or application, how expressive the triggers that can be set for debugging are (for example, examining memory when a certain program counter value is reached), and what can be inspected during debugging (for example, only memory, or memory and registers, and so on).
From the simplest to the most sophisticated, debugging techniques and systems can be loosely grouped into the following areas:
Unless the programmer is limited to external debugging, they can usually load and run software through the tools, view the code running in the processor, and start or stop its operation. The view of the code may be a high-level programming language , assembly code, or a mixture of the two.
Real-time operating systems often support tracing of operating system events. A graphical view is presented by a host PC tool, based on a recording of the system behavior. Trace recording can be done by software, by the RTOS, or by special trace hardware. RTOS tracing allows developers to understand timing and performance issues of the software system and gives a good understanding of the high-level system behavior. Trace recording in embedded systems can be achieved with hardware or software solutions. Software trace recording does not require specialized debugging hardware and can be used to record traces in deployed devices, but it can have an impact on CPU and RAM usage. One example of a software tracing method used in RTOS environments is the use of empty macros , which are called by the operating system at strategic places in the code and can be implemented as hooks (Hooking) .
Embedded systems are often found in machines that are expected to run continuously for many years without errors, and in some cases to recover by themselves if an error occurs. Therefore, the software is usually developed and tested more carefully than software for personal computers, and unreliable mechanical moving parts such as disk drives, switches or buttons are not used.
Specific reliability issues may include:
A variety of techniques are used, sometimes in combination, to recover from errors — both software bugs such as memory leaks and soft errors in the hardware:
For high-volume systems such as mobile phones , minimizing cost is usually the primary design consideration. Engineers typically select hardware that is just good enough to implement the necessary functions.
For low-volume or prototype embedded systems, general-purpose computers may be adapted by limiting the programs or by replacing the operating system with an RTOS.
In 1978 the National Electrical Manufacturers Association released ICS 3-1978, a standard for programmable microcontrollers, including almost any computer-based controllers, such as single-board computers , numerical and event-based controllers.
There are several different types of software architecture in common use.
In this design, the software simply has a loop that monitors the input devices. The loop calls subroutines , each of which manages a part of the hardware or software. Hence it is called a simple control loop or programmed input/output.
Some embedded systems are predominantly controlled by interrupts . This means that the tasks performed by the system are triggered by different kinds of events; an interrupt may be generated, for example, by a timer at a predefined interval, or by a serial port controller receiving data.
This architecture is used if the event handlers need low latency, and the event handlers are short and simple. These systems also run a simple task in a main loop, but this task is not very sensitive to unexpected delays. Sometimes the interrupt handler adds longer tasks to a queue structure. Later, after the interrupt handler has finished, these tasks are executed by the main loop. This method brings the system close to a multitasking kernel with discrete processes.
Cooperative multitasking is very similar to the simple control loop scheme, except that the loop is hidden in an API . [ 3 ] [ 1 ] The programmer defines a series of tasks, and each task gets its own environment to run in. When a task is idle, it calls an idle routine, which passes control to another task.
The advantages and disadvantages are similar to those of the control loop, except that adding new software is easier — one simply writes a new task or adds it to the queue.
In this type of system, a low-level piece of code switches between tasks or threads based on a timer that triggers an interrupt. This is the level at which the system is generally considered to have an operating system kernel. Depending on how much functionality is required, it introduces more or less of the complexity of managing multiple tasks running conceptually in parallel.
Because any code can potentially damage the data of another task (except in systems that use a memory management unit ), programs must be carefully designed and tested, and access to shared data must be controlled by some synchronization strategy, such as message queues , semaphores or a non-blocking synchronization scheme.
Because of these complexities, organizations often use an off-the-shelf RTOS, allowing application programmers to focus on device functionality rather than operating system services. However, the choice to include an RTOS brings its own problems, since the choice must be made before the application development process begins. This timing forces developers to choose the embedded operating system for their device based on current requirements, and so largely restricts future options.
The level of complexity of embedded systems is constantly growing, as devices are required to manage peripherals and tasks such as a serial interface, USB, TCP/IP, Bluetooth , wireless LAN , trunked radio, multiple channels, data and voice, enhanced graphics, multiple states, multiple threads, numerous wait states and so on. These trends are leading to the adoption of embedded middleware in addition to an RTOS.
A microkernel allocates memory and switches the CPU to different threads of execution. User-mode processes implement major functions such as file systems, network interfaces and so on .
Exokernels communicate efficiently through normal subroutine calls. The hardware and all the software in the system are accessible to and extensible by application programmers.
A monolithic kernel is a relatively large kernel with sophisticated capabilities, adapted to an embedded environment. This gives programmers an environment similar to a desktop operating system such as Linux or Microsoft Windows , and is therefore very productive for development. On the other hand, it requires considerably more hardware resources, is often more expensive, and because of the complexity of these kernels can be less predictable and reliable.
Typical examples of embedded monolithic kernels are embedded Linux , VXWorks and Windows CE .
Despite the increased hardware cost, this type of embedded system is becoming more and more popular, especially on more powerful embedded devices such as wireless routers and GPS navigation systems.
In addition to the core operating system, many embedded systems have additional upper-layer software components. These components include network protocol stacks such as CAN , TCP/IP , FTP , HTTP and HTTPS , as well as storage capabilities such as FAT and flash memory management systems. If the embedded device has audio and video capabilities, then the appropriate drivers and codecs will be present in the system. In the case of monolithic kernels, many of these software layers may be included in the kernel. In the RTOS category, the availability of additional software components depends on the commercial offering.
In the automotive industry, AUTOSAR is a standard architecture for embedded software.
Comments