Understanding Automotive Embedded Software

What is Embedded Software?

Embedded software is the operating system and development tools that are 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 the combination of software + hardware to define the product, whereas non-embedded software or pure internet industries simply define software, which has poor compatibility and low software portability.

Embedded applications in traditional industries are quite broad. Even though the internet industry is so developed now, we must admit that traditional industries have an irreplaceable position in social development. The combination of traditional industries and the internet in embedded development applications has a bright future.

An embedded system generally consists of embedded microprocessors, peripheral hardware devices, embedded operating systems, and user applications to achieve control, monitoring, or management functions for other devices. Embedded software is designed based on embedded systems; it is also a type of computer software, composed of programs and their documentation, and is an important part 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 co-design method has emerged, which uses a unified method and tools to collaboratively design hardware and software architectures to maximize the potential of the system’s hardware and software capabilities, avoiding various disadvantages caused by independent design of hardware and software architectures, resulting in optimized design solutions with high performance and low cost.

Characteristics of Embedded Software:

  • Unique Practicality

Embedded software requires close integration with external hardware and devices. Embedded systems are application-centered, and embedded software is application-oriented, developed according to application needs, targeting industries that require specific industry experience. Each embedded software has its unique application environment and practical value.

  • Flexible Applicability

Embedded software can typically be considered modular software, which should be easily and flexibly applied to various embedded systems without damaging or altering the original system characteristics and functions. Embedded software should be flexible to use, optimizing configuration as much as possible, reducing overall system inheritance, and facilitating flexible upgrades and replacements.

  • Streamlined Code

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

  • High Reliability and Stability

Embedded system applications generally have stringent requirements, especially in safety-related fields, such as automotive electronics (which will be detailed below regarding automotive embedded software), industrial control, aerospace, etc. These fields require not only reliable hardware but also impose higher demands on embedded software. Embedded software needs to run reliably and stably, with error handling and fault recovery functions.

Classification of Embedded Software:

According to the usual classification method, embedded software can be divided into three main categories: system software, application software, and supporting software:

  • System Software

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

  • Application Software

Application software is the upper-layer software in embedded systems, defining the main functions and uses 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 targeting specific application fields.

  • Supporting Software

Supporting software refers to tool software that assists in software development, such as online simulation tools, cross-compilers, 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 of the software development tools run on the development platform (PC), running Windows or Linux operating systems.

Differences Between Embedded Software and Non-Embedded Software

Embedded: Porting the operating system on existing hardware (requires modifying the operating system source code, installation is not required) to address issues caused by hardware-software coupling.

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

The disadvantages of traditional development:

  • High coupling between hardware and software leads to poor software portability

  • Software developers must understand hardware

  • Poor software functionality

Advantages: Simple, low development cost

The advantages of embedded development:

  • Solving problems caused by high coupling between hardware and software in traditional development

  • Multi-tasking mechanism

  • Rich network protocol stacks

  • Rich open-source software and tools

Disadvantages: High hardware costs

Automotive Embedded Software Direction

The embedded software part is divided into several parts, including software architecture, software flashing, low-level software, application layer software, and fault diagnosis.

Software Architecture:

(1) Boot-loader;

(2) Software platform layer;

(3) Policy 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 reset, it will select the boot-to-flash mode based on external hardware configuration, jump to the Boot-loader, and execute 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-dependent layer (low-level drivers): includes complex drivers, watchdog, basic services (timers needed for system scheduling, interrupt management, and some general processing functions, such as PLL drivers, Flash drivers, memory management drivers, timer drivers), IO, CAN, and other drivers.

Hardware abstraction layer: Abstract definitions for IO ports, PWM, CAN, SPI, etc., enabling application programs to achieve portability across different low-level platforms.

Understanding Automotive Embedded Software

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

Understanding Automotive Embedded Software

The low-level will generate a series of interface variables (functions) based on hard lines or CAN lines input, and the application layer directly calls the interface variables (functions) uploaded from the low-level. The hardware abstraction layer (HAL) will complete the mapping from 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 program interfaces, such as functions).

VCU Vehicle Control Strategy:

Function modules are divided as follows: input signal processing, output signal processing, torque control, power control, gear mode, system capability estimation, fault diagnosis processing, 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 lower level, also known as the basic platform software layer, which functions similarly to the operating system in a computer; the bottom layer is the hardware layer, which corresponds to the circuit board in a computer.

Recommended Reading:

◆ Domain Controller | Internal Architecture and Performance Impact of Autonomous Driving Domain Control Chip

◆ EE Architecture | Tesla’s Wiring Harness and Controller Iteration

◆ Understanding Integrated AI Chips

◆ Domain Controller | Key Element Design of High-Performance Autonomous Driving Domain Controller

Leave a Comment

×