Software flashing method and system for controller of vehicle, vehicle and equipment

By pre-writing hardware identification information in the controller and pre-writing calibrated values ​​in the software, compatibility verification can be performed directly, solving the compatibility problem between controller versions with different hardware part numbers and reducing the complexity and cost of flashing controller software.

CN121807327APending Publication Date: 2026-04-07ANHUI DEEPWAY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In the existing technology, different versions of bootloaders need to be compiled for vehicle controllers with different hardware part numbers, resulting in a large workload for development and maintenance, and the versions are not compatible, which increases the software storage and management overhead.

Method used

By pre-writing hardware identification information in the controller and pre-writing calibrated values ​​in the software, compatibility verification can be performed by directly reading this information, thus avoiding the need to compile a dedicated bootloader and achieving compatibility verification between the controller and the software.

Benefits of technology

This reduces the complexity and cost of flashing controller software and improves the efficiency and accuracy of compatibility verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807327A_ABST
    Figure CN121807327A_ABST
Patent Text Reader

Abstract

The invention discloses a software flashing method and system for a controller of a vehicle, the vehicle and equipment. The software flashing method for the controller of the vehicle comprises the following steps: receiving a flashing command of the controller sent by a diagnostic instrument; hardware identification information of the controller is read from the controller according to a preset first address identification, and the hardware identification information is written into the controller in advance; according to a preset second address identifier, a calibration value is read from the software to be flashed, and the calibration value is written into the software in advance; judging whether the software is compatible with the controller or not according to the hardware identification information and the calibration value; and determining whether to run the flash operation or not according to the compatibility judgment result. By adopting the embodiment of the invention, the compatibility verification of the controller and the software is realized by directly reading the hardware identification information of the controller and the calibration value of the software, and a special boot loader does not need to be compiled, so that the complexity and the cost of controller software flashing are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a method, system, vehicle, and device for flashing software on a vehicle controller. Background Technology

[0002] During vehicle research and development and production, it is necessary to flash applications for the vehicle controller. To ensure compatibility between the flashing software and the controller hardware, existing methods typically involve compiling different versions of bootloaders (BTs) for controllers with different hardware part numbers, and embedding the corresponding hardware information within these bootloaders. During flashing, the BT compares the hardware information in the software package to be flashed with its own stored information to determine compatibility. However, this method requires the separate development and maintenance of a BT version for each hardware variant, and the versions are not interchangeable. This not only increases the workload of development and maintenance but also incurs additional software storage and management overhead. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, system, vehicle, and device for flashing the software of a vehicle controller to address the aforementioned technical problems. By directly reading the hardware identification information of the controller and the calibrated values ​​of the software, the compatibility verification between the controller and the software can be achieved without compiling a dedicated bootloader, thereby effectively reducing the complexity and cost of flashing the controller software.

[0004] Firstly, a method for flashing the software of a vehicle controller is provided, comprising: Receive the controller flashing command sent by the diagnostic tool; Based on a preset first address identifier, read the hardware identifier information of the controller from the controller, wherein the hardware identifier information is pre-written into the controller; According to the preset second address identifier, the calibration value is read from the software to be flashed, wherein the calibration value is pre-written into the software; The compatibility between the software and the controller is determined based on the hardware identification information and the calibrated value. Whether to perform the flashing operation is determined based on the compatibility assessment results.

[0005] Furthermore, before reading the hardware identification information of the controller from the controller according to the preset first address identifier, the method further includes: During the production phase of the controller, the hardware identification information of the controller is written into the first fixed address within the controller corresponding to the first address identifier.

[0006] Furthermore, the first fixed address is equipped with a security lock.

[0007] Furthermore, before reading the calibrated value from the software to be flashed based on the preset second address identifier, the process also includes: During the compilation phase of the software, the calibrated value is written into the second fixed address within the software corresponding to the second address identifier, wherein the calibrated value matches the hardware identifier information.

[0008] Further, the step of determining whether the software is compatible with the controller based on the hardware identification information and the calibrated value includes: Determine whether the hardware identification information matches the calibrated value; If a match is found, the software is determined to be compatible with the controller; otherwise, the software is determined to be incompatible with the controller.

[0009] Furthermore, determining whether to perform a flashing operation based on the compatibility assessment result includes: If the software is compatible with the controller, a compatibility test pass notification is sent to the diagnostic instrument so that the diagnostic instrument can perform the flashing operation; If the software is incompatible with the controller, a compatibility test failure notification is sent to the diagnostic instrument so that the diagnostic instrument can terminate the flashing operation.

[0010] Furthermore, it also includes: Obtain the storage information of the hardware identification information in the controller; Obtain the storage information of the calibrated value in the software; Based on the stored information of the hardware identification information, the first address identifier is set, and based on the stored information of the calibrated value, the second address identifier is set.

[0011] Secondly, a software flashing system for a vehicle controller is provided, comprising: The receiving module is used to receive the controller flashing command sent by the diagnostic instrument; The reading module is used to read the hardware identification information of the controller from the controller according to a preset first address identifier, and to read the calibration value from the software to be flashed according to a preset second address identifier, wherein the hardware identification information is pre-written into the controller and the calibration value is pre-written into the software; The judgment module is used to determine whether the software is compatible with the controller based on the hardware identification information and the calibrated value, and to determine whether to run the flashing operation based on the compatibility judgment result.

[0012] Thirdly, a vehicle is provided, comprising: a software flashing system for the controller of the vehicle according to the second aspect described above.

[0013] Fourthly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the steps of a software flashing method for a vehicle controller according to the first aspect and any possible implementation thereof.

[0014] In the embodiments of this application, the controller flashing command sent by the diagnostic instrument is first received; then, the controller's hardware identification information is read from the controller according to a preset first address identifier, wherein the hardware identification information is pre-written into the controller; next, a calibration value is read from the software to be flashed according to a preset second address identifier, wherein the calibration value is pre-written into the software; then, the compatibility between the software and the controller is determined based on the hardware identification information and the calibration value; finally, the flashing operation is determined based on the compatibility determination result. Thus, by directly reading the controller's hardware identification information and the software's calibration value, compatibility verification between the controller and the software is achieved without compiling a dedicated bootloader, thereby effectively reducing the complexity and cost of flashing the controller software. Attached Figure Description

[0015] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 A flowchart illustrating the software flashing method for the vehicle controller provided in this application embodiment; Figure 2 A diagram illustrating the apparatus configuration for the software flashing method for a vehicle controller provided in this application embodiment; Figure 3 A structural block diagram of a software flashing system for a vehicle controller provided in an embodiment of this application; Figure 4 This is a structural block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0016] The present application will now be described in further detail with reference to the embodiments and accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.

[0017] It should be noted that, unless otherwise specified, the embodiments and features of the embodiments in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0018] The following describes in detail, with reference to the accompanying drawings, a method, system, vehicle, and device for flashing the software of a vehicle controller according to embodiments of this application.

[0019] Figure 1 This is a flowchart illustrating a method for software flashing of a vehicle controller according to an embodiment of this application. Figure 1 As shown, the software flashing method for the vehicle controller according to an embodiment of this application includes the following steps: S101: Receives the controller flashing command sent by the diagnostic instrument.

[0020] like Figure 2 As shown in the device configuration diagram, the diagnostic tool is connected to the vehicle's in-vehicle controller and sends software flashing commands to the controller via a communication line.

[0021] S102: Read the hardware identification information of the controller from the controller according to the preset first address identifier, wherein the hardware identification information is pre-written into the controller.

[0022] In one embodiment of this application, the method further includes: obtaining storage information of the hardware identification information in the controller; and setting the first address identifier according to the storage information of the hardware identification information.

[0023] The controller's hardware identification information is obtained by reading the value of the diagnostic identifier 0xF187, and its last 6 bytes are unique.

[0024] In one embodiment of this application, before reading the hardware identification information of the controller from the controller according to the preset first address identifier, the method further includes: during the production stage of the controller, writing the hardware identification information of the controller into a first fixed address within the controller corresponding to the first address identifier.

[0025] The first fixed address is a preset fixed address, such as 0x0800C000. This first fixed address is equipped with a security lock to prevent subsequent modification, thereby providing a reliable reference source for subsequent verification and avoiding the risk of accidental data tampering.

[0026] S103: Read the calibration value from the software to be flashed according to the preset second address identifier, wherein the calibration value is pre-written into the software.

[0027] In one embodiment of this application, the method further includes: obtaining storage information of the calibrated value in the software; and setting the second address identifier based on the storage information of the calibrated value.

[0028] In one embodiment of this application, before reading the calibrated value from the software to be flashed according to the preset second address identifier, the method further includes: during the compilation stage of the software, writing the calibrated value into the second fixed address within the software corresponding to the second address identifier, wherein the calibrated value matches the hardware identifier information.

[0029] The second fixed address is a preset fixed address, such as 0x0800A000. This address must be fixed and consistent across all software versions. Through an automated compilation script, the last 6 bytes of the hardware identification information obtained in the above process are used as the calibration value to ensure its uniqueness. Then, the calibration value is compiled into the software package.

[0030] S104: Determine whether the software is compatible with the controller based on the hardware identification information and the calibrated value.

[0031] In one embodiment of this application, the step of determining whether the software is compatible with the controller based on the hardware identification information and the calibrated value includes: determining whether the hardware identification information matches the calibrated value; if they match, then determining that the software is compatible with the controller; otherwise, determining that the software is incompatible with the controller.

[0032] Specifically, the last 6 bytes of the read hardware identification information are compared with the calibrated value. If they match, the hardware identification information is determined to be a match with the calibrated value; otherwise, it is determined to be a mismatch.

[0033] S105: Determine whether to run the flashing operation based on the compatibility assessment results.

[0034] In one embodiment of this application, determining whether to run the flashing operation based on the compatibility determination result includes: if the software is compatible with the controller, then sending a compatibility test pass notification to the diagnostic instrument so that the diagnostic instrument can run the flashing operation; if the software is incompatible with the controller, then sending a compatibility test fail notification to the diagnostic instrument so that the diagnostic instrument can terminate the flashing operation.

[0035] If the software is incompatible with the controller, the compatibility verification failure notification sent to the diagnostic instrument will contain error information, such as "identifier mismatch," thus quickly locating the source of the error.

[0036] According to the vehicle controller software flashing method of this application embodiment, the following steps are taken: First, a flashing command for the controller is received from a diagnostic tool; then, the hardware identification information of the controller is read from the controller according to a preset first address identifier, wherein the hardware identification information is pre-written into the controller; next, a calibrated value is read from the software to be flashed according to a preset second address identifier, wherein the calibrated value is pre-written into the software; then, the compatibility between the software and the controller is determined based on the hardware identification information and the calibrated value; finally, the flashing operation is determined based on the compatibility determination result. Thus, by directly reading the controller's hardware identification information and the software's calibrated value, compatibility verification between the controller and the software is achieved without compiling a dedicated bootloader, thereby effectively reducing the complexity and cost of controller software flashing.

[0037] Figure 3 This is a structural block diagram of a vehicle controller software flashing system according to an embodiment of this application. Figure 3 As shown, the software flashing system for the vehicle controller according to an embodiment of this application includes: a receiving module 310, a reading module 320, and a judging module 330, wherein: The receiving module 310 is used to receive the controller flashing command sent by the diagnostic instrument; The reading module 320 is used to read the hardware identification information of the controller from the controller according to the preset first address identifier, and to read the calibration value from the software to be flashed according to the preset second address identifier, wherein the hardware identification information is pre-written into the controller and the calibration value is pre-written into the software; The judgment module 330 is used to determine whether the software is compatible with the controller based on the hardware identification information and the calibrated value, and to determine whether to run the flashing operation based on the compatibility judgment result.

[0038] The vehicle controller software flashing system according to an embodiment of this application first receives a flashing command from a diagnostic tool; then, based on a preset first address identifier, it reads the controller's hardware identifier information from the controller, wherein the hardware identifier information is pre-written into the controller; next, based on a preset second address identifier, it reads a calibrated value from the software to be flashed, wherein the calibrated value is pre-written into the software; then, it determines whether the software and the controller are compatible based on the hardware identifier information and the calibrated value; finally, it determines whether to run the flashing operation based on the compatibility determination result. Thus, by directly reading the controller's hardware identifier information and the software's calibrated value, compatibility verification between the controller and the software is achieved without compiling a dedicated bootloader, thereby effectively reducing the complexity and cost of controller software flashing.

[0039] Specific limitations regarding the software flashing system for the vehicle controller can be found in the above description of the software flashing method for the vehicle controller, and will not be repeated here. Each module of the aforementioned vehicle controller software flashing system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0040] Furthermore, a vehicle is provided, comprising: a software flashing system for the controller of the vehicle according to any of the above embodiments. The vehicle first receives a flashing command for the controller sent by a diagnostic tool; then, according to a preset first address identifier, it reads the controller's hardware identification information from the controller, wherein the hardware identification information is pre-written into the controller; next, according to a preset second address identifier, it reads a calibration value from the software to be flashed, wherein the calibration value is pre-written into the software; then, it determines whether the software and the controller are compatible based on the hardware identification information and the calibration value; finally, it determines whether to run the flashing operation based on the compatibility determination result. Thus, by directly reading the controller's hardware identification information and the software's calibration value, compatibility verification between the controller and the software is achieved without compiling a dedicated bootloader, thereby effectively reducing the complexity and cost of flashing the controller software.

[0041] Furthermore, other components and functions of the vehicle according to the embodiments of this application are known to those skilled in the art and will not be described in detail here.

[0042] In one embodiment, a computer device is provided. Figure 4 This is a structural block diagram of the computer device provided in the embodiments of this application, with reference to... Figure 4 The computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned embodiment of the software flashing method for the vehicle's controller. For example, it executes the following: receiving a flashing command for the controller sent by a diagnostic tool; reading the controller's hardware identification information from the controller according to a preset first address identifier, wherein the hardware identification information is pre-written into the controller; reading a calibrated value from the software to be flashed according to a preset second address identifier, wherein the calibrated value is pre-written into the software; determining whether the software is compatible with the controller based on the hardware identification information and the calibrated value; and determining whether to run the flashing operation based on the compatibility determination result.

[0043] This application also provides a computer-readable storage medium storing a computer program. When the processor executes the computer program, it implements the aforementioned embodiment of the software flashing method for the vehicle controller. For example, it executes the following: receiving a flashing command for the controller sent by a diagnostic tool; reading the hardware identification information of the controller from the controller according to a preset first address identifier, wherein the hardware identification information is pre-written into the controller; reading a calibrated value from the software to be flashed according to a preset second address identifier, wherein the calibrated value is pre-written into the software; determining whether the software is compatible with the controller based on the hardware identification information and the calibrated value; and determining whether to run the flashing operation based on the compatibility determination result.

[0044] This application provides a computer program product including instructions that, when executed, cause the method described in this application embodiment to be performed. For example, it can execute... Figure 1 The steps of the software flashing method for the vehicle controller shown are as follows: receiving a flashing command for the controller sent by a diagnostic tool; reading the hardware identification information of the controller from the controller according to a preset first address identifier, wherein the hardware identification information is pre-written into the controller; reading a calibration value from the software to be flashed according to a preset second address identifier, wherein the calibration value is pre-written into the software; determining whether the software is compatible with the controller based on the hardware identification information and the calibration value; and determining whether to run the flashing operation based on the compatibility determination result.

[0045] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0046] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0047] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A software flashing method for a vehicle controller software flasher, characterized in that, include: Receive the controller flashing command sent by the diagnostic tool; Based on a preset first address identifier, read the hardware identifier information of the controller from the controller, wherein the hardware identifier information is pre-written into the controller; According to the preset second address identifier, the calibration value is read from the software to be flashed, wherein the calibration value is pre-written into the software; The compatibility between the software and the controller is determined based on the hardware identification information and the calibrated value. Whether to perform the flashing operation is determined based on the compatibility assessment results.

2. The software flashing method for the vehicle controller software flasher according to claim 1, characterized in that, Before reading the hardware identification information of the controller from the controller according to the preset first address identifier, the method further includes: During the production phase of the controller, the hardware identification information of the controller is written into the first fixed address within the controller corresponding to the first address identifier.

3. The software flashing method for the vehicle controller software flasher according to claim 2, characterized in that, The first fixed address is equipped with a security lock.

4. The software flashing method for the vehicle controller software flasher according to claim 1, characterized in that, Before reading the calibrated value from the software to be flashed based on the preset second address identifier, the process also includes: During the compilation phase of the software, the calibrated value is written into the second fixed address within the software corresponding to the second address identifier, wherein the calibrated value matches the hardware identifier information.

5. The software flashing method for the vehicle controller software flasher according to any one of claims 1-4, characterized in that, The step of determining whether the software is compatible with the controller based on the hardware identification information and the calibrated value includes: Determine whether the hardware identification information matches the calibrated value; If a match is found, the software is determined to be compatible with the controller; otherwise, the software is determined to be incompatible with the controller.

6. The software flashing method for the vehicle controller software flasher according to claim 1, characterized in that, The step of determining whether to perform a flashing operation based on the compatibility assessment result includes: If the software is compatible with the controller, a compatibility test pass notification is sent to the diagnostic instrument so that the diagnostic instrument can perform the flashing operation; If the software is incompatible with the controller, a compatibility test failure notification is sent to the diagnostic instrument so that the diagnostic instrument can terminate the flashing operation.

7. The software flashing method for the vehicle controller software flasher according to claim 1, characterized in that, Also includes: Obtain the storage information of the hardware identification information in the controller; Obtain the storage information of the calibrated value in the software; Based on the storage information of the hardware identification information, the first address identifier is set, and based on the storage information of the calibrated value, the second address identifier is set.

8. A software flashing system for a vehicle controller, characterized in that, include: The receiving module is used to receive the controller flashing command sent by the diagnostic instrument; The reading module is used to read the hardware identification information of the controller from the controller according to a preset first address identifier, and to read the calibration value from the software to be flashed according to a preset second address identifier, wherein the hardware identification information is pre-written into the controller and the calibration value is pre-written into the software; The judgment module is used to determine whether the software is compatible with the controller based on the hardware identification information and the calibrated value, and to determine whether to run the flashing operation based on the compatibility judgment result.

9. A vehicle, characterized in that, include: The software flashing system for the vehicle controller according to claim 8.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the software flashing method for the vehicle controller according to any one of claims 1-7.