未解决
知从青龙多核刷写功能介绍ZC.QINGLONG MULTICORE BOOTLOADER MANUAL

ZC.Qinglong Multicore Bootloader Manual_页面_1.jpg

1  方案介绍Solution Introduction

  汽车通过 OTA 对车载控制器软件进行刷写,能够便捷修复软件缺陷、升级新增功能,同时大幅降低线下服务的人力与物力成本,软件刷新能力已成为车载控制器的标配基础功能。随着汽车芯片技术不断迭代升级,主流车用微控制器 MCU 已从传统单核架构全面升级为双核及多核架构,为高性能、高可靠的刷写方案提供了硬件基础。本文重点阐述多核控制器如何利用双核 / 多核架构实现 Bootloader 并行刷写,从而提升软件刷写速度,优化升级体验,提高客户满意度。

 By flashing the software of vehicle controllers via OTA, automakers can conveniently fix software bugs, upgrade new functions, and greatly reduce labor and material costs for offline maintenance. Software refresh capability has become a standard basic function of most on-board controllers.

 With the iterative upgrading of automotive chips, mainstream vehicle MCUs have evolved from traditional single-core architecture to dual-core and multi-core architectures, providing a hardware foundation for high-performance and high-reliability flashing solutions.

 This document mainly introduces how multi-core controllers implement Bootloader flashing based on dual-core / multi-core architecture, so as to speed up software flashing, optimize upgrade experience and improve customer satisfaction.


 

2  软件构成 Software Element

      MCU Bootloader 软件主要由以下核心模块构成,各模块协同保障多核刷写高效、安全运行:

The MCU Bootloader software is mainly composed of the following core modules, which work together to ensure efficient and safe multi-core flashing:

底层驱动 / Low-level Drivers

核心功能:与MCU硬件交互,负责初始化、通信及存储驱动,实现多核独立运行与协同,为各模块提供硬件访问接口。

Core Function: Interact with MCU hardware, responsible for initialization, communication and storage drivers, enabling independent operation and collaboration of multiple cores, and providing hardware access interfaces for each module.

任务调度管理 / Task Scheduling

核心功能:统筹Bootloader任务,分配优先级,实现多核任务同步与通信,避免冲突,保障“边收边写”顺畅执行。

Core Function: Coordinate Bootloader tasks, assign priorities, realize multi-core task synchronization and communication, avoid conflicts, and ensure smooth "receiving while writing".

Bootloader Manager(升级管理) / Bootloader Manager (Upgrade Management)

核心功能:管控整个刷写流程,启动刷写、协调多核协同、处理异常并触发回滚,保障升级完整安全。

Core Function: Control the entire flashing process, start flashing, coordinate multi-core collaboration, handle abnormalities and trigger rollback, ensuring complete and safe upgrade.

UDS 诊断服务 / UDS Diagnostic Services

核心功能:基于UDS协议,负责接收刷写指令、解析固件数据并传输,反馈刷写状态,实现远程管控。

Core Function: Based on UDS protocol, responsible for receiving flashing instructions, parsing and transmitting firmware data, feeding back flashing status, and realizing remote control.

Flash 擦写 / Flash Erase, Write

核心功能:负责Flash擦除与固件写入,支持分片写入,配合“边收边写”,确保操作高效精准。

Core Function: Responsible for Flash erasure and firmware writing, supporting block writing, cooperating with "receiving while writing" to ensure efficient and accurate operation.

数据校验 / Data Verification

核心功能:贯穿刷写全程,校验报文、写入数据及整体固件,防止非法或错误数据,保障刷写安全。

Core Function: Throughout the flashing process, verify messages, written data and the entire firmware to prevent illegal or wrong data and ensure flashing security.

1.png

Bootloader SW modules


 

3  多核任务分配 Task assignment

  知从科技可为客户提供完整的多核刷写解决方案,并可根据项目特定需求、硬件平台及芯片特性进行定制化开发。在双核 MCU 架构下,青龙多核 Bootloader 方案将 Bootloader 相关任务进行解耦与分工,分配至不同核心并行运行,相比传统单核架构,可显著提升运行速度、刷写效率与系统实时性。

 ZC provides customers with a complete multi-core flashing solution, which can be customized according to specific project requirements, hardware platforms and chip features. In a dual-core MCU architecture, the ZC.QingLong multi-core Bootloader decouples and assigns Bootloader tasks to different cores for parallel execution. Compared with the traditional single-core architecture, it significantly improves running speed, flashing efficiency and system real-time performance.

 Core 0 task assign

 负责:OS 任务调度、底层驱动、Bootloader Manager、UDS 诊断服务、CAN/CAN FD 报文接收与解析

 Responsible for: OS task scheduling, low-level drivers, Bootloader Manager, UDS diagnostic services, CAN/CAN FD message reception and parsing

 Core 1 task assign

 专注执行 Flash 相关硬核操作,负责:Flash 擦除、Flash 写入、固件数据校验、刷写状态监控等任务

 Focused on Flash-related hard real-time operations, Responsible for: Flash erasure, Flash programming, firmware data verification, flashing status monitoring and other tasks


 

4  多核并行刷写Multicore Reflash

 知从科技可提供完整的安全诊断与并行刷写方案,可针对项目需求与硬件模块做定制化开发,实现的核心刷写特性包括:

 ZC can provide customers with a complete solution for secure diagnosis and parallel flashing, with customizable development according to project requirements and hardware modules. Key flashing features include:

 Core 0:持续接收并解析诊断报文

 Core 0: Continuously receive and parse diagnostic messages

 Core 1:同步执行 Flash 擦除与编程操作

 Core 1: Perform Flash erase and write operations synchronously

 双核之间通过通用共享 RAM 实现高效数据交互与任务同步,真正实现边接收报文、边写入 Flash 的流式并行刷写效果,大幅缩短整体升级时间。为实现数据交互的精准性与高效性,共享 RAM 设计专属数据缓冲区,Core 0 与 Core 1 分别配置独立的读写指针,通过指针协同完成数据的有序传递,避免数据错乱与冲突。

 具体实现逻辑:Core 0(负责接收 CAN 报文)配置写指针(Write Pointer),接收并解析 CAN 报文后,将有效固件数据按顺序写入共享 RAM 缓冲区,每写入一段数据,写指针自动偏移对应长度,标记当前可写入的空闲地址;Core 1(负责 Flash 写入)配置读指针(Read Pointer),实时监测共享 RAM 中的数据,当读指针与写指针不重合时,从读指针指向的地址读取数据执行 Flash 写入操作,读取完成后,读指针同步偏移,释放已读取的缓冲区空间。

 通过读写指针的独立协同,Core 0 可持续接收 CAN 报文并写入共享 RAM,Core 1 同步读取数据执行刷写,无需等待对方完成操作,真正实现“边收边写”的并行效果,同时有效避免双核心对共享 RAM 的读写冲突,保障数据传递的完整性与刷写效率。

 The two cores achieve efficient data interaction and task synchronization through general shared RAM, realizing a true streaming parallel flashing effect: receiving messages while writing to Flash, which greatly shortens the overall upgrade time. To ensure the accuracy and efficiency of data interaction, the shared RAM is designed with an exclusive data buffer. Core 0 and Core 1 are respectively configured with independent read and write pointers, and the ordered data transmission is completed through pointer coordination to avoid data disorder and conflicts.

Specific implementation logic: Core 0 (responsible for receiving CAN messages) is configured with a Write Pointer. After receiving and parsing CAN messages, it writes valid firmware data into the shared RAM buffer in sequence. Each time a segment of data is written, the Write Pointer automatically offsets by the corresponding length to mark the current free address for writing; Core 1 (responsible for Flash writing) is configured with a Read Pointer, which monitors the data in the shared RAM in real time. When the Read Pointer does not coincide with the Write Pointer, it reads data from the address pointed by the Read Pointer to execute Flash writing operation. After reading, the Read Pointer offsets synchronously to release the read buffer space.

Through the independent coordination of read and write pointers, Core 0 can continuously receive CAN messages and write them into the shared RAM, while Core 1 synchronously reads data to execute flashing, without waiting for the other party to complete the operation. This truly realizes the parallel effect of "receiving while writing", and effectively avoids read-write conflicts of the shared RAM between the two cores, ensuring the integrity of data transmission and flashing efficiency.

 The two cores achieve efficient data interaction and task synchronization through general shared RAM, realizing a true streaming parallel flashing effect: receiving messages while writing to Flash, which greatly shortens the overall upgrade time.

 同时,多核任务并行架构避免了单核因长时间 Flash 操作导致任务阻塞、系统卡死等问题,有效解决传统单核 Bootloader 喂狗不及时、任务卡死等行业痛点,显著提升系统稳定性与可靠性。

 In addition, the multi-core parallel architecture avoids task blocking and system freezes caused by long-time Flash operations in single-core design. It effectively solves industry pain points such as untimely watchdog feeding and task stuck in traditional single-core Bootloader, greatly improving system stability and reliability.

2.png

 

5  多核刷写的优势Advantage

1、刷写速度显著提升:报文接收与 Flash 编程并行执行,消除 “先收完再写入” 的等待耗时。

Significantly improved flashing speed: Message reception and Flash programming run in parallel, eliminating the waiting time of “receive first, then write”.

2、系统更稳定,不卡死、不复位:诊断任务与 Flash 操作分离,避免长时间阻塞导致看门狗复位。

More stable system, no stuck or reset: Diagnosis tasks and Flash operations are separated, avoiding watchdog reset caused by long-time blocking.

3、架构清晰,易于维护与扩展:多核任务解耦,模块化设计,便于适配不同芯片、多节点 OTA 与批量升级。

Clear architecture, easy to maintain and extend: Multi-core task decoupling and modular design make it easy to adapt to different MCUs, multi-node OTA and batch upgrades.

4、支持高安全合规场景:可无缝集成安全启动、安全诊断、固件验签等机制,满足车载功能安全与信息安全要求。

Supports high security and compliance scenarios: Can seamlessly integrate Secure Boot, secure diagnosis, firmware verification, meeting automotive functional safety and cybersecurity requirements.



标志.png

发布于 2026-04-28 16:56:08
写回答
好问题0
好问题0
已收藏
收藏问题
写回答