Understanding Automotive Embedded Software

What is Embedded Software?

Embedded software refers to the operating systems and development tools embedded in hardware. Its relationship in the industry is reflected as: chip design and manufacturing → embedded system software → embedded electronic device development and manufacturing.

The most basic understanding of embedded software is software + hardware integration, which defines the product, while non-embedded software or pure internet industries only define software, leading to poor compatibility and software portability.

The application of embedded systems in traditional industries is quite broad. Even though the internet industry is highly developed today, it is undeniable that traditional industries hold an irreplaceable position in social development. The integration of traditional industries and the internet in embedded development applications has a bright future.

Embedded systems generally consist of embedded microprocessors, peripheral hardware devices, embedded operating systems, and user applications, used to control, monitor, or manage other devices. Embedded software is software designed based on embedded systems; it is also a type of computer software, composed of programs and their documentation, and is an important component of embedded systems.

In embedded systems, hardware and software are no longer two completely separate concepts, but are closely integrated and mutually influential. Thus, the method of soft and hardware co-design (codesign) has emerged, which uses unified methods and tools to collaboratively design the architecture of both to maximize the system’s soft and hardware capabilities and avoid various pitfalls caused by independently designing the soft and hardware architecture, resulting in optimized designs with high performance and low cost.

Characteristics of Embedded Software:

  • Unique Practicality

Embedded software requires close integration with external hardware and devices, with embedded systems being application-centric. Embedded software is application-oriented development based on application requirements and requires specific industry experience. Each type of embedded software has its unique application environment and practical value.

  • Flexible Applicability

Embedded software can generally be considered modular software; it should be easily and flexibly applied to various embedded systems without damaging or altering the original system characteristics and functions. To ensure flexibility, embedded software should be optimized to minimize overall system inheritance and facilitate easy upgrades and replacements.

  • Simplified Code

Due to the requirements of embedded systems for small size, small storage space, low cost, and low power consumption, embedded software has characteristics such as simplified code and high execution efficiency compared to software on large machines.

  • High Reliability and Stability

Embedded systems generally have strict application requirements, especially in safety-related fields, such as automotive electronics (which will be elaborated on later regarding automotive embedded software), industrial control, aerospace, etc. These fields require not only reliable hardware but also higher demands on embedded software. Embedded software must run reliably and stably, with error handling and fault recovery capabilities.

Classification of Embedded Software:

According to common classification methods, embedded software can be divided into three main categories: system software, application software, and support software:

  • System Software

System software controls and manages the resources of embedded systems, providing support for embedded applications, such as device drivers, embedded operating systems, and embedded middleware.

  • Application Software

Application software is the upper-level software in embedded systems, defining the main functions and purposes of embedded devices and responsible for interacting with users. Application software embodies the functions of embedded systems, such as flight control software, mobile phone software, MP3 playback software, electronic map software, etc., generally oriented towards specific application fields.

  • Support Software

Support software refers to the tool software that assists in software development, such as online simulation tools, cross-compiler source code simulators, and configuration management tools.

In embedded systems, system software and application software run on the target platform (i.e., embedded devices), while most software development tools run on the development platform (PCs) operating Windows or Linux.

Differences Between Embedded Software and Non-Embedded Software

Embedded: Porting the operating system onto existing hardware (requires modifying the operating system source code, but installation is not necessary) to resolve issues caused by hardware-software coupling.

Differences between embedded software and non-embedded software (i.e., the pros and cons of traditional development versus embedded development):

Disadvantages of Traditional Development:

  • High degree of hardware-software coupling leads to poor software portability.

  • Software developers must understand hardware.

  • Poor software functionality.

Advantages: Simple, low development cost.

Advantages of Embedded Development:

  • Solves the issues caused by high hardware-software coupling in traditional development.

  • Multi-tasking mechanism.

  • Provides a rich network protocol stack.

  • Offers a wealth of open-source software and tools.

Disadvantages: High hardware costs.

Automotive Embedded Software Direction

Embedded software is divided into several parts: software architecture, software flashing, low-level software, application layer software, and fault diagnosis.

Software Architecture:

(1) Boot-loader;

(2) Software platform layer;

(3) Strategy application layer.

The Boot-loader is developed as a separate project, generating an independent binary file.

The following image shows the Boot-loader architecture based on the UDS protocol:

Understanding Automotive Embedded Software

The following image shows the software architecture:

Understanding Automotive Embedded Software

Software flashing: After the controller resets, it will choose the boot-to-flash mode based on external hardware configuration, jump to the Boot-loader, and perform RAM self-check. If the self-check is successful and valid application software is detected, it will jump to the application software; otherwise, it will enter Boot-loader mode, waiting to refresh valid application software. The following image shows the Boot-loader software logic.

Understanding Automotive Embedded Software

Low-level Software Architecture

Hardware dependency layer (low-level drivers): includes complex drivers, watchdogs, basic services (timers needed for system scheduling, interrupt management, and some common processing functions such as PLL drivers, Flash drivers, memory management drivers, timer drivers), IO, CAN, and other drivers.

Hardware abstraction layer: abstracts the definitions of functional modules such as IO ports, PWM, CAN, SPI, etc., allowing application programs to achieve portability across different low-level platforms.

Understanding Automotive Embedded Software

Software integration: Software integration is the process of combining application layer software with low-level software into a single software that can be flashed to hardware. The variable mapping relationship of software integration is detailed in the following image:

Understanding Automotive Embedded Software

The low-level layer will generate a series of interface variables (functions) based on hard wire or CAN line input, which the application layer directly calls. The hardware abstraction layer (HAL) will complete the mapping of low-level signals to global variables. To achieve hardware changes and platform portability, the low-level software platform uses macros and scripts to automatically generate global variables and APIs (application programming interfaces, such as functions).

VCU Vehicle Control Strategy:

The functional modules are divided as follows: input signal processing, output signal processing, torque control, power on/off control, gear mode, system capability estimation, fault diagnosis handling, accessory management, etc.

Understanding Automotive Embedded Software

As can be seen from the above image, the vehicle controller is divided into three levels: the top level is the application layer, also known as the control strategy layer; the middle layer is the low-level layer, also known as the basic platform software layer, which functions similarly to the operating system in a computer; and the bottom layer is the hardware layer, which is the circuit board in a computer.

Welcome to all angel round enterprises in the automotive industry chain (including the electrification industry chain) to join the group (Friendly connections include 500 automotive investment institutions, including top-tier institutions; we will select a portion of quality projects for thematic roadshows to existing institutions);there are communication groups for leaders of sci-tech innovation companies, automobile manufacturing, automotive semiconductors, key parts, new energy vehicles, intelligent connected vehicles, aftermarket, automotive investment, autonomous driving, Internet of Vehicles, and dozens of other groups. To join the group, please scan the administrator’s WeChat (please indicate your company name)

Understanding Automotive Embedded Software

Leave a Comment