Introduction:
As the functions of smart vehicles become increasingly complex, the vehicle software also needs to be continuously updated to fix vulnerabilities, optimize performance, and add new features. If there is a problem during the update process, such as a sudden power outage or network interruption halfway through the upgrade, the vehicle’s functions may become abnormal or even unusable, posing a significant risk to driving safety.
“Differential Compression Backup Upgrade + SOTA Technology” is a solution born to address this challenge. It combines a dual-partition strategy with incremental update methods, significantly reducing the MCU hardware resource usage while making upgrades more reliable and efficient. In simple terms, this method not only saves storage space but also significantly improves upgrade speed, ensuring that even if the upgrade process is unexpectedly interrupted, the vehicle can seamlessly revert to the previous stable version, maintaining a safe and continuous driving experience. Its highlight is that it can achieve reliable and stable upgrades even with limited hardware resources.
1. What constitutes an excellent OTA solution?
1.1 What is OTA?
The OTA for smart vehicles, short for Over-the-Air Technology, is a technology that enables remote management of mobile terminal devices and SIM card data through mobile communication’s air interface. It allows vehicles to receive upgrade packages via wireless networks for software updates and functional improvements. This technology enables vehicles to continuously expand their functions, enhance performance, and improve user experience.
1.2 Elements of an excellent OTA solution
An excellent OTA solution should possess the following:
-
High speed: The application of differential, compressed, and modular upgrade methods brings extreme upgrade speed.
-
High reliability: The primary and backup partition strategy ensures automatic rollback in case of upgrade failure.
-
High security: Data encryption prevents interception and leakage during the process.
1.3 Mainstream OTA upgrade solutions in the industry
Currently, there are two mainstream OTA upgrade solutions in the automotive industry. The first is the traditional A/B upgrade solution, and the second is the traditional bootloader upgrade solution, each with its advantages and disadvantages.
1.3.1 Traditional A/B upgrade solution

As shown in the figure, this upgrade solution adopts an A/B partition layout, dividing the MCU’s storage space into two partitions: one is the currently running active partition, and the other is the inactive backup partition. During each upgrade, the system downloads the new software completely to the inactive partition for updating. After successful verification, it switches the boot to set the inactive partition as active. This ensures that if the update fails, the device can boot from the active partition to restore normal operation.
-
Advantages: The failure of the upgrade does not affect the normal operation of the ECU, ensuring vehicle safety.
-
Disadvantages: Flash resource usage is relatively high, leading to higher costs, and using this solution on certain chips may also result in resource wastage.
1.3.2 Traditional bootloader upgrade solution

As shown in the figure, in this upgrade solution, there is only one running space. The upgrade is executed through a boot program called bootloader, which overwrites the old version with the new version.
-
Advantages: Low Flash resource usage and low cost.
-
Disadvantages: If the upgrade fails, the program remains in boot mode, with no application functionality, and the vehicle cannot operate normally.
1.4 Challenges faced by traditional OTA methods
In the digital transformation of the automotive industry, updating vehicle software has become key to enhancing user experience and expanding functionality. However, traditional OTA updates face significant challenges in the automotive sector, as cost constraints prevent the adoption of A/B upgrade solutions. Issues such as unstable networks, slow upgrade speeds, high risks during the update process, and limited vehicle functionality due to update failures often affect user experience.
During the implementation of MCU OTA, the main challenges faced include:
-
Network stability: The uncertainty of the network environment can easily lead to firmware transmission interruptions.
-
Slow upgrade speed: Full MCU upgrade firmware is large, leading to long transmission times and slow upgrade speeds.
-
Insufficient storage space: Embedded devices typically have limited storage capacity, which restricts the storage space for backups and new firmware, making traditional bootloader upgrade solutions more common for MCU upgrades.
-
Reliability of the upgrade process: Interrupted or failed upgrades may cause the device to fail to start, affecting user experience and device safety.
2. Differential Compression Backup SOTA Upgrade Solution
To address the above issues and achieve the three key elements of an excellent OTA solution, we innovatively introduced a SOTA solution that integrates MCU differential, compression, backup, and modular upgrades. Through the primary and backup partition backup strategy, we ensure that when a new update fails, the vehicle system can immediately and seamlessly roll back to the previous safe version, ensuring driving safety. Additionally, by utilizing incremental compression update technology, we optimized update efficiency, reduced the burden of data transmission, and shortened update times. This technology also reduces MCU resource usage, providing a more reliable and faster upgrade experience.

3. How to implement the technical elements?
How does the SOTA solution mentioned in this article achieve the elements of an excellent OTA solution? Let’s explore this from the aspects of high speed, high reliability, and high security.
3.1 High speed
The approach to achieving high speed mainly includes the following two points:
-
Using dynamic compilation to run and upgrade each functional module as an independent APP, only updating specific functional modules, significantly reducing the overall firmware upgrade data volume.
-
Using differential transmission and compression technology to further reduce data transmission volume and accelerate upgrade speed.
3.1.1 Dynamic compilation
3.1.1.1 Traditional compilation method

In the traditional compilation method, ECU software typically consists of two main parts:
-
Bsw (Basic Software) includes low-level modules that directly support hardware operation, such as Mcal (Microcontroller Abstraction Layer), System Services, and CDD (Complex Device Driver);
-
Asw (Application Software), such as PBox, VMM, and other functional modules, is responsible for implementing specific vehicle business logic.
In the traditional model, these basic software and application software modules are integrated and compiled into a complete firmware program (FW program) using a single compiler (such as gcc, ghs, tasking, etc.). This “integrated build” structure is simple but lacks flexibility in updates—modifying even a small functional module in Asw requires recompiling and repackaging the entire firmware. This leads to large upgrade package sizes, long transmission times, and the need for the MCU to reserve enough space to store the entire new firmware, resulting in high storage and hardware resource overhead.
3.1.1.2 Dynamic compilation method

In contrast, the dynamic compilation method splits ECU software into multiple independently buildable modules:
-
The Mcal and System Services in Bsw can be combined to build a component firmware, while CDD can be built separately;
-
Modules such as PBox and VMM in Asw can also be built separately or in combination.
Each module is independently processed by the compiler and dynamic linker, generating its own component firmware program (component FW program), which is stored in different storage areas. The MCU can dynamically load these modules as needed during runtime. When an upgrade is required, only the modified modules need to be recompiled and replaced, without affecting the operation of other modules. This significantly reduces the size of the update package, accelerates OTA upgrade speed, lowers the risk of transmission failure, and alleviates the demand for MCU storage capacity.
In comparison, dynamic compilation supports modular upgrades, with clear advantages—it transitions from “overall replacement” to “precise replacement,” resulting in faster speeds, lower resource usage, and higher flexibility and maintainability, making it very suitable for the storage-limited and frequently updated in-vehicle MCU application scenarios.
3.1.2 Incremental update technology
Incremental update technology is a method to optimize the update process, with the core idea being: during software, firmware, or data updates, only the changed portions (incremental content) between the old and new versions are transmitted, rather than the entire update package. By reducing the amount of data transmitted, it can lower traffic consumption, shorten update times, and alleviate storage pressure on devices.
In this solution, we mainly use differential updates, which involve transmitting and applying only the changed portions (for example, binary differential updates) to reduce the size of the update package, thereby lowering data traffic consumption and update times, achieving high speed.

3.1.3 Compressed upgrades
During OTA upgrades for vehicle MCUs, firmware packages are often large, and directly transmitting the complete file can lead to long transmission times and high traffic costs. Compressed upgrades involve using appropriate compression algorithms to compress the firmware into smaller files before transmission, which are then decompressed on the device side. This reduces the amount of data transmitted and enhances the efficiency of transmission and upgrades.
The table below shows a performance comparison of various common compression algorithms using OTA package BIN files for XCU and ZCU as test subjects.

-
RAM: The memory required for the algorithm to run; the smaller the value, the easier it is to run on resource-limited MCUs.
-
ROM: The space required to store the algorithm program.
-
Compression ratio: The ratio of the compressed file size to the original file size; the lower the value, the better the compression effect. For example, the XCU file compressed with LZMA2 is only 23% of the original size.
Data compression brings three main advantages:
-
Reduced data volume, significantly lowering traffic costs.
-
Shortened data transmission time, reducing transmission failures caused by network issues and improving transmission stability.
-
Storing compressed firmware in flash reduces flash resource overhead.
3.2 High reliability
To ensure the stability and reliability of the OTA upgrade process, we adopted a primary and backup partition strategy + rollback mechanism, ensuring that even in the event of an exception during the upgrade process, the device remains available.
-
Primary and backup partition strategy: Create two firmware partitions for the device (commonly referred to as the primary and backup partitions), with the backup partition using compressed storage to ensure that the new firmware is copied to the primary partition only after successful verification in the backup partition, supporting rollback in case of data loss.
-
Rollback mechanism: Design an automatic rollback function after an update failure to ensure that the device returns to the previous stable version if the new firmware verification fails.
3.3 High security
To ensure data security and integrity during the OTA upgrade process, we employed encrypted transmission + integrity verification as two major technical measures, providing comprehensive protection from the transmission link to the data itself.
-
Encrypting the transmitted data protects it from interception and leakage during the OTA upgrade process, ensuring data security.
-
Integrating integrity verification ensures that the upgrade data is not tampered with during transmission.
4. Conclusion
Overall, we have comprehensively applied dynamic compilation, differential updates, and compression algorithms to reduce firmware size and transmission volume, accelerate upgrade speed, and lower resource usage. Combined with the primary and backup partition and automatic rollback mechanism, we ensure the reliability of the upgrade process; through signing and encryption, we guarantee the security of transmitted and stored data. These technologies work together to effectively enhance the efficiency and reliability of MCU OTA upgrades while ensuring high security and cost-effectiveness.
