What is an Embedded System

Embedded Systems

Currently, common embedded consumer products are either applications of bare-metal embedded systems based on microcontrollers or applications of embedded Linux systems. Among these, the former represents relatively low-end products with simple functions, while the latter is of higher grade, featuring complex functionalities and interactive systems that are more convenient for user operation. An embedded system is a computer system unit that is embedded within a machine (device) and can operate independently.

Section 1: What is an Embedded Operating System

An Embedded Operating System (EOS) refers to the operating system that runs on embedded boards. Commonly used embedded operating systems include C/OS-II, FreeRTOS, RTOS, VxWorks, Linux, and UNIX.

Section 2: The Concept of Embedded Trimming

For different application scenarios, a core development direction of embedded systems is the high degree of application domain segmentation. This segmentation aims to achieve multi-dimensional optimization while meeting functional requirements, where cost is often a key driving factor, but power consumption, physical size, real-time performance, and reliability are also crucial.

To achieve this goal, both hardware and software must undergo deep “trimming” and customization.

At the hardware level, this is reflected in:

Carefully selected core processors: Choosing an MCU or SoC with just the right processing power and memory size to avoid waste of cost and power consumption due to over-performance.

Simplified peripheral circuits: If the product only uses Bluetooth communication, irrelevant physical interface circuits like Ethernet and CAN bus will be removed from the design. A cheaper chip model that does not integrate these functions may even be selected.

Optimized power solutions: Designing the most efficient power management circuit (such as LDO or DCDC) based on power consumption requirements, rather than using a generic “overkill” solution.

At the software level, trimming means:

Customizing the operating system kernel: Configuring embedded Linux or RTOS to compile only the necessary drivers and functional modules for the project, removing all unrelated parts.

Trimming code libraries and functions: For example, if a mathematical library is only used for integer operations in the project, all code related to floating-point operations can be excluded through conditional compilation to save valuable Flash and RAM space.

Selecting lightweight protocol stacks: In IoT devices, lightweight protocols like CoAP/MQTT may be chosen instead of more comprehensive HTTP protocol stacks.

Section 3: Classification of Embedded Operating Systems

Embedded systems can be classified into four major categories based on processor type, system real-time performance, system software complexity, and application domain.

What is an Embedded System

From a hardware perspective, processors are classified based on their addressing space, which has evolved from 4-bit, 8-bit, 16-bit, and 32-bit to 64-bit high-performance processors, marking the transition of embedded systems from single-board systems to microprocessor systems.

Embedded systems are categorized based on the type and number of tasks into single execution, polling execution, foreground-background mode, single-core multitasking, and multi-core multitasking embedded systems.

When classifying embedded systems based on real-time performance and reliability, they can be divided into weak real-time embedded systems, general real-time embedded systems, and strong real-time embedded systems.

Finally, based on the application domain of embedded systems, they are mainly divided into industrial, scientific, medical, civilian, military, and aerospace fields.

Section 4: Architecture of Embedded Operating Systems

The architecture of embedded operating systems is pyramid-shaped: The top layer is the application layer, such as chat software, human-machine interaction interfaces, and file systems; Next is the system layer, where the core is the kernel, which primarily manages the memory system, file system, external devices, and system resources; Below that is the driver layer, which is primarily for physical hardware, providing interfaces for the kernel to call, such as hardware abstraction layers and board support packages; The final layer is the physical layer, which mainly involves the connection of electronic components and the standards for signal levels.

The application layer only cares about “what to do” (business logic).

The system kernel is responsible for “who does it, when to do it” (scheduling and management).

The driver layer is responsible for “how to do it” (details of hardware operations).

The physical hardware is responsible for “final execution” (interaction with the physical world).

For example, to light up an LED, the user first issues the command to light the LED through the human-machine interaction interface to the application software. The application software calls the process service interface of the operating system, and upon receiving the command to light the LED, the operating system invokes the GPIO driver through process management. The GPIO driver then controls the GPIO interface of the chip, and finally, the GPIO interface achieves the LED lighting operation through the flipping of signal levels.

What is an Embedded System

Leave a Comment