
1. Overview of Embedded Software
Embedded software is a special type of software that is embedded in hardware to control and manage the functions of other devices. Unlike traditional definitions of software in the pure internet industry, embedded software combines software and hardware to achieve its functions by defining the product. The relationship of embedded software in the industry is reflected in a complete chain from chip design and manufacturing to embedded system software and then to the development and manufacturing of embedded electronic devices. As an important component of embedded systems, it consists of programs and their documentation, working in collaboration with embedded microprocessors, peripheral hardware devices, and embedded operating systems to achieve control, monitoring, or management functions of other devices. An embedded system typically consists of four parts: embedded microprocessor, peripheral hardware devices, embedded operating system, and user application programs. These components are closely integrated, influence each other, and together form a complete embedded system. In the design of embedded software, a hardware-software co-design method is widely used. This method employs a unified approach and tools for co-designing hardware and software to maximize the potential of the system’s hardware and software capabilities, avoiding various drawbacks caused by independently designing hardware and software architectures. Through hardware-software co-design, high-performance and low-cost optimized design solutions can be achieved.
2. Characteristics of Embedded Software
The characteristics of embedded software are mainly reflected in the following aspects: First, it has unique practicality. Embedded software is closely associated with external hardware and devices, developed directionally for specific application needs. Each embedded software has its unique application environment and practical value, enabling it to serve various industries and requiring specific industry experience. Second, embedded software has flexible applicability. It is often viewed as modular software, capable of being easily and flexibly applied to various embedded systems without destroying or changing the characteristics and functions of the original system. To achieve flexible use, embedded software should be optimized to reduce overall system inheritance, making upgrades and replacements flexible and convenient. Additionally, embedded software also features code simplification. Due to the application requirements of embedded systems for small size, small storage space, low cost, and low power consumption, embedded software has more streamlined code and higher execution efficiency compared to software on large machines. Finally, embedded software emphasizes reliability and stability. Especially in applications involving safety-related fields, such as automotive electronics, industrial control, and aerospace, embedded software not only requires reliable hardware but also imposes higher demands on the software itself. Therefore, embedded software must operate reliably and stably, with error handling and fault recovery functions to ensure the safe and stable operation of the system.
3. Classification of Embedded Software

Embedded software can mainly be classified into three categories based on common classification methods: system software, application software, and support software. System software is a crucial component of embedded systems, responsible for controlling and managing the resources of the embedded system and providing necessary support for embedded applications. This type of software includes device drivers, embedded operating systems, and embedded middleware, ensuring the stable operation and efficient resource utilization of the system. Application software resides on top of the embedded system, defining the main functions and uses of the embedded device and interacting with users. These application software are a direct reflection of the functions of the embedded system, such as flight control software, mobile software, MP3 playback software, and electronic map software. They are developed for specific application fields to meet diverse user needs. Support software is a type of tool software that assists in software development. It includes online simulation tools, cross-compilers, source program simulators, and configuration management tools, providing necessary support and convenience for the development of embedded software. Most of these tools run on development platforms (such as PCs) based on Windows or Linux operating systems, helping developers design, test, and debug embedded software more efficiently. In summary, the classification of embedded software encompasses system software, application software, and support software. They each play important roles in embedded systems, ensuring the stable operation and realization of functions.
4. Automotive Embedded Software

1. Software Architecture The architecture of automotive embedded software is usually divided into three layers: Boot-loader, software platform layer, and policy application layer.

Boot-loader: As an independent engineering development, it generates a standalone binary file responsible for loading and initializing the hardware environment at system startup, providing a stable foundation for the subsequent software platform layer and application layer. Software platform layer: Located above the Boot-loader, it provides basic system services and functions, such as memory management, interrupt handling, task scheduling, etc. It ensures that application layer software can run in a unified and stable software environment. Policy application layer: This is the top layer of the software architecture, directly facing user needs and vehicle control strategies. It contains the logic and algorithms necessary to implement various functions of the vehicle, as well as interfaces for user interaction, etc. 2. Software Flashing In embedded systems, software flashing is an important means of updating and upgrading software. When the controller is reset, it selects the boot-to-flash mode based on external hardware configuration, jumps to the Boot-loader, and performs a RAM self-test. If the self-test is successful and valid application software is detected, it jumps to run the application software; otherwise, it enters Boot-loader mode, waiting to refresh valid application software. 3. Low-Level Software and Hardware Abstraction Layer

Low-level software (hardware-dependent layer): This includes complex drivers, watchdogs, basic services, etc. These basic services, such as timers needed for system scheduling, interrupt management, and some general processing functions (like PLL drivers, Flash drivers, memory management drivers, timer drivers), ensure the effective management and utilization of hardware resources.

Hardware Abstraction Layer (HAL): This abstracts the definitions of IO ports, PWM, CAN, SPI, and other functional modules, allowing application programs to achieve portability across different underlying platforms. It provides a unified interface that enables application layer software to shield the differences in underlying hardware, thereby achieving cross-platform compatibility. 4. Software Integration Software integration is the process of combining application layer software with low-level software into a single software that can be flashed onto hardware. During the integration process, it is necessary to handle various variable mapping relationships, ensuring that the application layer can correctly call the interface variables or functions uploaded by the low-level software. Additionally, to enable hardware changes and platform migration, the low-level software platform uses macros and scripts to automatically generate global variables and APIs, improving the maintainability and scalability of the software. In summary, automotive embedded software is a complex and detailed system engineering that involves collaborative work across multiple levels and links. Through reasonable software architecture design and meticulous software flashing and integration processes, the stable operation and efficient execution of embedded software in automobiles can be ensured.