Click the blue text aboveTalks Lab
Get more automotive cybersecurity information

Many embedded hardware devices integrate OTA functionality, allowing applications to be downloaded remotely after mass production.
Before using firmware with OTA functionality, it is necessary to download the BootLoader program in advance to further download the application program.
Today, let’s discuss several Flash partitioning methods when upgrading firmware via OTA.
01
Independent Type
The independent type refers to a dedicated portion of Flash memory allocated for storing the BootLoader.
As shown in the figure below:

Firmware Area A is used to execute the application program. When the BootLoader receives the new firmware and stores it in Firmware Area B, after successful verification, the application program in Firmware Area A will be erased, and the new firmware from Firmware Area B will be written into Firmware Area A.
This method is quite common, with a backup area (Firmware B) to enhance download safety.
02
Embedded Type
The embedded type means that the BootLoader is embedded within the application program.

When the BootLoader stores the new firmware in Firmware Area B, after successful verification, the BootLoader will jump to Firmware Area B to execute the application program.
03
External Type
The external type uses external Flash or EEPROM to store the new firmware.
When the built-in Flash of the MCU is small, an external storage chip can be chosen to cache the new firmware.
The BootLoader stores the new firmware in the external storage chip, and after successful verification, the application program in Firmware A will be erased and replaced with the new firmware from the external storage chip.

Can we partition the MCU’s Flash space arbitrarily based on our needs?
Of course not. Since the built-in Flash of the MCU is erased in blocks or pages, we must consider the actual block or page size of the MCU when partitioning the built-in Flash space.
Now, let’s take the TMPM3H6FWFG as an example to illustrate the “independent type” Flash partitioning method.
From the information in the following specification, we can see that this MCU has a built-in Flash size of 128KB, with a minimum erase page size of 4KB and a minimum erase block size of 32KB.

Based on the above information, we can partition the built-in Flash of this MCU as follows:

The above is a simple discussion on the Flash space partitioning of the MCU during firmware upgrades (OTA). The actual method that is more suitable still needs to be evaluated by the user.
Source: One Linux
end

Recommended Premium Events


AutoSec Series Salon


Professional Community

Some experts in the group come from:
New Force Car Companies:
Tesla, Hozon Auto – Nezha, Li Auto, Zeekr, Xiaomi, Binnli Auto, Jiyue, Leap Motor, Avita, Zhiji Auto, Xpeng, Lantu Auto, NIO, Geely Auto, Seres……
Foreign Traditional Mainstream Car Companies:
Volkswagen China, Volkswagen Coolwing, Audi, BMW, Ford, Daimler-Benz, General Motors, Porsche, Volvo, Hyundai, Nissan, Jaguar Land Rover, Scania……
Domestic Traditional Mainstream Car Companies:
Geely Auto, SAIC Passenger Cars, Great Wall Motors, SAIC Volkswagen, Changan Automobile, Beijing Automotive, Dongfeng Motor, GAC, BYD, FAW Group, FAW Liberation, Dongfeng Commercial, SAIC Commercial……
Global Leading Tier 1 Suppliers:
Bosch, Continental Group, United Automotive Electronics, Aptiv, ZF, KOSTAL, Schaeffler, Honeywell, DJI, Hitachi, Harman, Huawei, Baidu, Lenovo, MediaTek, Preh, Desay SV, Honeycomb Steering, Junlian Intelligent Travel, Wuhan Guangting, Xingji Meizu, CRRC Group, Wintech, Weichai Group, Horizon, Unisoc, ByteDance,……
Tier 2 Suppliers (500+):
Upstream, ETAS, Synopsys, NXP, TUV, Shanghai Software Center, Deloitte, Qihoo 360, Weichan Xinan, Yunchi Future, Xinda Jiexin, Xinchangcheng, Zelu Safety, Niuchuang Xinan, Fudan Microelectronics, Tianrongxin, Qihoo 360, China Automotive Center, China Automotive Research, Shanghai Automotive Inspection, Ruangan Technology, Zhejiang University……
Personnel Proportion

Company Type Proportion

More Articles
Don’t miss out, this could be the largest exclusive community in the automotive cybersecurity industry!
Lawyer’s statement regarding the alleged imitation of the AutoSec conference brand
One article to help you understand the in-vehicle network communication security architecture of smart cars
Cybersecurity: TARA methods, tools, and cases
Key analysis of automotive data security compliance
A brief analysis of automotive chip information security and secure boot
Exploration of automotive in-vehicle communication security solutions in domain centralized architecture
System security architecture for vehicle network security
Privacy protection issues in the Internet of Vehicles
Research on cybersecurity technology for intelligent connected vehicles
AUTOSAR information security framework and key technology analysis
What are the information security mechanisms in AUTOSAR?
Underlying mechanisms of information security
Automotive network security
Usage of AUTOSAR hardware security module HSM
First release! Lei Jun from Xiaomi made suggestions on automotive data security issues at the two sessions: Suggestions for building a complete automotive data security management system