Method and device for self-updating BOOT of vehicle-mounted electronic control unit based on APP
By automating the update of the vehicle's electronic control unit (ECU) boot program using an app-based method, the problems of traditional update methods relying on dedicated equipment and requiring high user awareness are solved, achieving a fast, safe, and efficient update process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN JIANGXIA CHUNENG AUTOMOBILE TECHNOLOGY R&D CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-12
AI Technical Summary
The current system for updating the BOOT program of the vehicle's electronic control unit relies on dedicated equipment, which is inefficient and highly noticeable to users, and cannot achieve automated updates.
By using an app-based method, the original boot address of the vehicle's electronic control unit chip is modified, and the writing and verification of the BOOT information header file and code segment are automatically executed to ensure the correctness and effectiveness of the update.
It enables rapid, safe, and efficient updates of the vehicle's electronic control unit (ECU) BOOT program without the need for specialized equipment or manual operation, thus improving the level of automation and the reliability of the updates.
Smart Images

Figure CN122018940A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle control technology, and specifically to a method for self-updating the BOOT of an on-board electronic control unit based on an APP. Background Technology
[0002] The BOOT program of the on-board electronic control unit (ECU) guides the controller to complete initialization and load the core underlying program of the application. Its software stability directly determines the operating status of the controller.
[0003] The mainstream methods for updating the BOOT program of automotive electronic control units (ECUs) in existing technologies include the following: First, flashing using specialized flashing tools such as Lauterbach and iSYSTEM. This method can flash any software, but it requires direct connection to the circuit board's debugging port. However, mass-produced controllers are constrained by information security features, making it difficult to have an external debugging port, and it requires significant manpower for offline updates, thus this method has significant limitations. Second, flashing using a dedicated BOOT update program. This method does not require specialized tools, but can only be performed offline by professional technicians. This necessitates vehicle recalls, which is very user-unfriendly. Third, flashing using controller A / B side backup software. This method can self-update the BOOT. However, this update method divides the chip's storage unit into two parts: one for operation and the other for updating and backup. This means that half of the chip's storage space is inoperable, making it unsuitable for controllers with high cost requirements. Summary of the Invention
[0004] In view of this, it is necessary to provide an APP-based method for self-updating the BOOT of the vehicle electronic control unit, so as to solve the technical problems of traditional vehicle electronic control unit BOOT program updates relying on dedicated equipment, low efficiency, and high customer perception.
[0005] To address the aforementioned problems, this invention provides a method for self-updating the boot order of an on-board electronic control unit based on an app, comprising:
[0006] In response to the BOOT application to be flashed meeting the preset flashing conditions, the original boot address of the corresponding chip of the vehicle electronic control unit is modified to the preset address. In response to the completion of the preset address modification, the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed are written to the BOOT of the vehicle electronic control unit, and the flashing verification of the BOOT of the vehicle electronic control unit is performed. In response to successful flash verification, the preset address is modified to the starting address of the BOOT code segment in the flashed BOOT, and the flashed BOOT is reset.
[0007] In one possible implementation, the preset write conditions include: The BOOT application to be flashed has been detected to exist; The BOOT application to be flashed is matched with the hardware version of the vehicle electronic control unit; The software version of the BOOT application to be flashed is inconsistent with the software version of the BOOT in the vehicle electronic control unit.
[0008] In one possible implementation, the address space architecture of the BOOT application to be flashed includes the address space occupied when executing the BOOT application to be flashed and the address space occupied by the BOOT application to be flashed.
[0009] In one possible implementation, the address space occupied by the BOOT application to be flashed is the same as the address space architecture of the BOOT of the vehicle electronic control unit. The address space architecture of the BOOT of the vehicle electronic control unit includes: BOOT information header file space, BOOT code segment space, and BOOT verification information space.
[0010] In one possible implementation, writing the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the vehicle electronic control unit includes: Determine the erase parameters stored in the BOOT information header file of the BOOT application to be flashed. The erase parameters include the erase address position and erase position length for erasing the address space corresponding to the BOOT space architecture. The BOOT space architecture is the address architecture of the BOOT of the vehicle electronic control unit. The memory driver program of the vehicle electronic control unit is invoked to erase the BOOT information header file space and BOOT code segment space in the BOOT space architecture according to the erase parameters, so as to obtain the first target address space and the second target address space. Write the BOOT information header file of the BOOT application to be flashed into the first target address space; Write the BOOT code segment of the BOOT application to be flashed into the second target address space.
[0011] In one possible implementation, the post-flash verification of the BOOT of the vehicle electronic control unit includes: The BOOT of the vehicle electronic control unit is verified according to preset flashing verification conditions, which include: The version of the BOOT application to be flashed is the same as the version of the BOOT after flashing. The target verification value is consistent with the verification value in the BOOT verification information space of the BOOT application to be flashed. The target verification value is calculated based on the BOOT code segment written in the BOOT after flashing. When the BOOT meets the flash verification conditions after the flash, the flash verification is determined to be successful. If the BOOT does not meet the flash verification conditions after the flash is performed, the flash verification is determined to have failed.
[0012] In one possible implementation, the method further includes: In response to successful flash verification, the target verification value calculated based on the written BOOT code segment during flash verification is written into the BOOT verification information space corresponding to the flashed BOOT. In response to a failed write verification, the preset address is reset to the original startup address of the chip corresponding to the vehicle electronic control unit.
[0013] The present invention also provides an app-based device for self-updating the boot of an on-board electronic control unit, comprising: The pre-flash module is used to modify the original boot address of the corresponding chip of the vehicle electronic control unit to a preset address in response to the BOOT application to be flashed meeting the preset flashing conditions. The flashing module is used to respond to the fact that the preset address has been modified, write the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the vehicle electronic control unit, and perform flashing verification on the flashed BOOT of the vehicle electronic control unit. The post-processing module is used to modify the preset address to the starting address of the BOOT code segment in the BOOT after flashing in response to the successful flashing verification, and to reset the BOOT after flashing.
[0014] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a program; the processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of the above-described method for self-updating the BOOT of an on-board electronic control unit based on an APP.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method for self-updating the BOOT of an on-board electronic control unit based on an APP.
[0016] The beneficial effects of the above implementation method are as follows: The APP-based self-updating BOOT method for vehicle electronic control units provided by this invention uses the BOOT application to be flashed to perform the self-updating of the vehicle electronic control unit's BOOT. Its flashing process is fully automated; simply running the BOOT application directly applies to the vehicle electronic control unit to update the BOOT program, eliminating the need for specialized flashing tools connected to the circuit board's debugging port. Therefore, offline updates by professional technicians are unnecessary. Furthermore, pre-flashing is achieved by modifying the original boot address of the corresponding chip in the vehicle electronic control unit. This allows for automatic re-triggering based on the preset address in case of subsequent flashing failures, eliminating the need for manual reset and resulting in high automation and flashing efficiency. During the flashing process, the BOOT of the vehicle electronic control unit is automatically flashed through the BOOT application, and post-processing including flashing verification and modification of the preset address after flashing ensures the correctness and effectiveness of the BOOT update. In this way, simply running the BOOT application to be flashed enables a fast, safe, efficient, and low-user-perception update of the vehicle's electronic control unit BOOT program. It does not rely on dedicated update equipment, avoids the efficiency and error problems caused by manual flashing operations, and balances the reliability and convenience of the update. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the method for self-updating the BOOT of an on-board electronic control unit based on an APP provided by the present invention. Figure 2 A schematic diagram illustrating the principle of the APP-based self-updating BOOT method for vehicle electronic control units provided by the present invention; Figure 3 A schematic diagram of the address space architecture of the BOOT application to be flashed provided by the present invention; Figure 4 A schematic diagram of the address space architecture of the BOOT of the vehicle-mounted electronic control unit provided by the present invention; Figure 5 A schematic diagram of the structure of the APP-based vehicle electronic control unit self-updating BOOT device provided by the present invention; Figure 6 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] In the description of the embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0021] In this embodiment of the invention, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, apparatus, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such process, method, product or device.
[0022] The naming or numbering of steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical order indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effect can be achieved.
[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0024] The APP-based self-updating BOOT method for vehicle electronic control units provided in this invention can be applied to BOOT update scenarios for vehicle electronic control units. The executing entity can be a server, terminal, or remote cloud device. By installing the BOOT application to be flashed in the vehicle electronic control unit, when an update of the BOOT is required, the APP-based self-updating BOOT method for vehicle electronic control units is triggered, automatically realizing the flashing and updating of the vehicle electronic control unit BOOT.
[0025] The following describes in detail the method for self-updating the BOOT of an on-board electronic control unit based on an APP provided by the present invention.
[0026] Figure 1 This is a flowchart illustrating the method for self-updating the BOOT of an on-board electronic control unit based on an app provided by the present invention, as shown below. Figure 1As shown, the method for self-updating the BOOT of the vehicle electronic control unit based on the APP can be implemented by the following steps 101 to 103, which are explained in detail below.
[0027] Step 101: In response to the BOOT application to be flashed meeting the preset flashing conditions, the original boot address of the corresponding chip of the vehicle electronic control unit is modified to the preset address.
[0028] like Figure 2 As shown, at the start of the self-update, the BOOT application to be flashed is deployed to the vehicle's electronic control unit (ECU). This application, denoted as APPFBL, is essentially an application (APP), which includes the application that executes it, namely APPL. After the BOOT application is deployed, APPL can be initialized. Furthermore, a checksum verification is performed in the ECU's BOOT. If the verification is successful, it indicates that the ECU's BOOT can undergo self-update; if the verification fails, the ECU's BOOT runs normally, and the self-update ends.
[0029] After successful verification of the verification code, the self-update can begin. This embodiment of the invention first performs a flashing requirement judgment, specifically determining whether the APPFBL meets the preset flashing conditions.
[0030] In one possible implementation, the preset flashing conditions include: the existence of the BOOT application to be flashed has been detected; the BOOT application to be flashed matches the hardware version of the vehicle electronic control unit; and the software version of the BOOT application to be flashed is a new version of the BOOT in the vehicle electronic control unit.
[0031] like Figure 2 As shown, during the flashing condition determination, the system first checks whether the BOOT application to be flashed already exists, i.e., whether the APPFBL exists. If not, it means that the APPFBL has not been successfully deployed and the flashing condition is not met. The system then runs the BOOT of the vehicle's electronic control unit normally and ends the self-update. If yes, it further checks whether the BOOT application to be flashed matches the hardware version of the vehicle's electronic control unit, i.e., whether the APPFBL matches the hardware version of the vehicle's electronic control unit. If not, it means that the BOOT application to be flashed cannot be flashed normally and the flashing condition is not met. The system then runs the BOOT of the vehicle's electronic control unit normally and ends the self-update. If yes, it further checks whether the software version of the BOOT application to be flashed matches the software version of the BOOT in the vehicle's electronic control unit, i.e., whether the APPFBL matches the software version of the BOOT in the vehicle's electronic control unit. If yes, it means that the current version of the BOOT in the vehicle's electronic control unit does not need to be updated and the flashing condition is not met. The system then runs the BOOT of the vehicle's electronic control unit normally and ends the self-update.
[0032] In response to the BOOT application being flashed meeting the preset flashing conditions, the original boot address of the corresponding chip of the vehicle electronic control unit is modified to the preset address.
[0033] See also Figure 2 When determining whether the software version of the APPFBL is consistent with that of the vehicle's electronic control unit (ECU) BOOT, if they are not, it indicates that the current version of the ECU BOOT needs to be updated. At this point, it can be determined that the APPFBL has simultaneously met three preset flashing conditions: the BOOT application to be flashed has been detected, the BOOT application to be flashed matches the hardware version of the ECU, and the software version of the BOOT application to be flashed is inconsistent with the software version of the ECU BOOT. The self-update process can then be executed. The first step is pre-flashing, which mainly modifies the original boot address of the corresponding chip in the ECU, specifically modifying it to a preset address as a marker. If the APPFBL flashing fails, the ECU can be restarted again based on the preset address determined by the marker, continuing the self-update process and preventing the inability to trace back and restart after a flashing failure.
[0034] In this embodiment of the invention, the BOOT self-update is triggered by setting flashing conditions, so that the BOOT application to be flashed can run successfully and complete the BOOT flashing of the vehicle electronic control unit. This ensures the effectiveness of the self-update and avoids the risk to the chip of the vehicle electronic control unit caused by flashing failure.
[0035] Step 102: In response to the completion of the preset address modification, write the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the vehicle electronic control unit, and perform flash verification on the BOOT of the vehicle electronic control unit after flashing.
[0036] like Figure 2 As shown, after the preset address is modified, the pre-flash is complete, and the formal BOOT self-update begins. The main task of this process is to directly write the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the vehicle's electronic control unit (ECU) BOOT.
[0037] In one possible implementation, the address space architecture of the BOOT application to be flashed includes the address space occupied when executing the BOOT application to be flashed, as well as the address space occupied by the BOOT application to be flashed.
[0038] To facilitate the flashing process, this invention provides an APP address architecture for the BOOT application to be flashed. For example... Figure 3As shown, the APP address architecture is divided into two parts: the normal APP program space and the BOOT application architecture space to be flashed. The normal APP program space is the address space occupied when the BOOT application to be flashed is executed, which is also the address space occupied by APPL. The BOOT application architecture space to be flashed is the address space occupied by the BOOT application to be flashed.
[0039] In one possible implementation, the address space occupied by the BOOT application to be flashed is the same as the address space architecture of the BOOT of the vehicle electronic control unit, and the address space architecture of the BOOT of the vehicle electronic control unit includes: BOOT information header file space, BOOT code segment space and BOOT verification information space.
[0040] Specifically, such as Figure 4 As shown, the address space architecture of the vehicle's electronic control unit (ECU) BOOT is divided into three parts. The first part is the BOOT header file space, denoted as FBLHEADER. This space stores essential information such as the BOOT hardware version number, software version number, erase address location, and erase address length. The erase address location and erase address length indicate the address location and length of space that need to be erased during BOOT flashing.
[0041] The second part is the BOOT code segment space, denoted as FBLCODE, which stores the code of the BOOT executable program. The third part is the BOOT verification information space, denoted as FBLCHECKINFO, which stores the starting address of the BOOT executable program, the address length, and the checksum, etc.
[0042] And such Figure 3 As shown, the address space occupied by the BOOT application to be flashed is the same as the address space architecture of the vehicle's electronic control unit (ECU) BOOT. Specifically, it is divided into three parts: the BOOT header file space, the BOOT code segment space, and the BOOT verification information space, denoted as APPFBLHEADER, APPFBLCODE, and APPFBLCHECKINFO, respectively. The content stored in each address space is also corresponding. Therefore, during the ECU BOOT self-update, the contents of APPFBLHEADER and APPFBLCODE in the BOOT application to be flashed are directly written into the address spaces corresponding to APPFBLHEADER and APPFBLCODE in the BOOT.
[0043] In this embodiment of the invention, an address space architecture for the BOOT application to be flashed is designed on the address space architecture of the BOOT of the vehicle electronic control unit. The address space occupied by the BOOT application to be flashed is designed to correspond to the BOOT of the vehicle electronic control unit, thereby establishing a BOOT self-updating environment and laying the foundation for further content flashing.
[0044] In one possible implementation, the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed are written to the BOOT of the vehicle's electronic control unit. This can be achieved in the following ways, which are explained in detail below.
[0045] Determine the erase parameters for the BOOT header file stored in the BOOT application to be flashed.
[0046] The APPFBLHEADER address space of the BOOT application to be flashed stores the corresponding erase parameters, including the erase address location and erase location length for erasing the address space corresponding to the BOOT space architecture.
[0047] The BOOT space architecture is the address architecture of the BOOT in the vehicle electronic control unit. Here, the erase address location and erase location length represent the locations and parameters that need to be erased in the FBLHEADER and FBLCODE in the BOOT address architecture.
[0048] Next, the memory driver of the vehicle electronic control unit is called to erase the BOOT information header file space and BOOT code segment space in the BOOT space architecture according to the erase parameters, so as to obtain the first target address space and the second target address space.
[0049] Here, the erasure is specifically implemented by calling the memory driver. The erasure parameters are input into the memory driver for execution. Based on the erasure position corresponding to the erasure parameters in the FBLHEADER space of the BOOT space architecture, the content with the corresponding erasure length is erased to obtain the first target address space. Then, at the erasure position corresponding to the FBLCODE, the content with the corresponding erasure length is erased to obtain the second target address space.
[0050] Write the BOOT header file of the BOOT application to be flashed into the first target address space, and write the BOOT code segment of the BOOT application to be flashed into the second target address space.
[0051] Here, after erasure is complete, content can be written. The contents of the APPFBLHEADER address space in the BOOT application to be written are written to the first target address space, and the contents of the APPFBLCODE address space in the BOOT application to be written are written to the second target address space.
[0052] In this embodiment of the invention, during BOOT self-update, the content to be flashed can be directly written into the corresponding address space of the BOOT according to the correspondence of the address space architecture, thereby realizing BOOT content flashing, effectively reducing address space consumption and lowering the selection cost of the vehicle electronic control unit chip. Furthermore, this flashing mechanism connects the BOOT application to be flashed with the vehicle electronic control unit's BOOT self-update system, making the vehicle electronic control unit an intelligent control unit that can both respond to business needs and realize software self-update functionality.
[0053] like Figure 2 As shown, after the BOOT self-update is completed, the BOOT data verification is further performed. Specifically, the BOOT of the vehicle electronic control unit is flashed and verified to verify the correctness of the written content.
[0054] In one possible implementation, the BOOT of the vehicle's electronic control unit is flashed and verified. This can be achieved in the following way, which is explained in detail below.
[0055] First, the BOOT of the vehicle's electronic control unit is verified according to the preset flashing verification conditions.
[0056] The specific conditions for flashing verification include: the version of the BOOT application to be flashed is consistent with the version of the BOOT after flashing, and the target verification value is consistent with the verification value in the BOOT verification information space of the BOOT application to be flashed.
[0057] Here, after the BOOT of the vehicle's electronic control unit is flashed, it is necessary to verify and ensure that the version of the flashed BOOT is consistent with the version of the BOOT application to be flashed.
[0058] Furthermore, the flashing verification process also needs to ensure that the target checksum matches the checksum in the BOOT checksum information space of the BOOT application to be flashed. The target checksum is calculated based on the BOOT code segment written to the BOOT after flashing. After the contents of the APPFBLCODE address space in the BOOT application to be flashed are written to the BOOT, the checksum of the written APPFBLCODE data is automatically calculated as the target checksum. Then, the target checksum is compared with the checksum recorded in the APPFBLCHECKINFO of the BOOT application to be flashed to confirm whether they match.
[0059] If the BOOT meets the flash verification conditions after flashing, the flash verification is considered successful; if the BOOT does not meet the flash verification conditions after flashing, the flash verification is considered to have failed.
[0060] like Figure 2As shown, during the BOOT data verification process, the flashing verification is successful only when the BOOT meets both flashing conditions simultaneously: the version of the BOOT application to be flashed is consistent with the version of the BOOT after flashing, and the target verification value is consistent with the verification value in the BOOT verification information space of the BOOT application to be flashed. If one of the flashing conditions is not met, the flashing verification fails.
[0061] In this embodiment of the invention, after the BOOT self-update completes the content writing, the correctness and effectiveness of the content writing can be ensured by performing BOOT data verification.
[0062] Step 103: In response to successful flash verification, modify the preset address to the starting address of the BOOT code segment in the flashed BOOT, and reset the flashed BOOT.
[0063] like Figure 2 As shown, after the BOOT self-update is completed and the flashing verification is successful, this embodiment of the invention also performs post-processing, specifically modifying the preset address to the starting address of the BOOT code segment in the flashed BOOT and resetting the flashed BOOT.
[0064] The preset address is modified during pre-flashing. The goal is to reset and trace back based on the flag of this preset address in case of flashing failure. After successful write verification, it means that the BOOT self-update has been successful. At this time, in order to ensure that the subsequent program of the vehicle electronic control unit still needs to be booted through BOOT, the preset address is modified again to the starting address of the BOOT code segment in the flashed BOOT. Thus, when starting the program, it can be based on the BOOT code segment in the flashed BOOT.
[0065] Finally, the BOOT is reset after flashing, which means resetting the corresponding chip of the vehicle's electronic control unit to ensure that the BOOT can execute the application to be flashed normally after the update is completed, that is, to execute the APPL application normally.
[0066] In one possible implementation, in response to successful write verification, the target verification value calculated based on the written BOOT code segment during write verification is written into the BOOT verification information space corresponding to the BOOT after write.
[0067] Here, when the flash verification is successful, the embodiment of the present invention also implements the verification code update in the post-processing process. The target verification value calculated based on the BOOT code segment APPFBLCODE written during the flash verification is written as the new verification value into the FBLCHECKINFO space corresponding to the flashed BOOT for subsequent possible flash operations, and then the flashed BOOT is reset.
[0068] In addition, in response to a failed write verification, the preset address is reset to the original startup address of the corresponding chip of the vehicle electronic control unit.
[0069] like Figure 2 As shown, when the flashing verification fails, the BOOT is still reset after flashing, but the preset address needs to be reset to the original startup address of the chip corresponding to the vehicle electronic control unit. In other words, when the flashing fails, the preset address modified during the pre-flashing is restored to the original startup address of the chip corresponding to the vehicle electronic control unit, ensuring that the vehicle electronic control unit can still start and execute the BOOT self-update again.
[0070] In this embodiment of the invention, during the post-processing after the flashing verification is completed, the verification code is rewritten and the preset address is restored, so that the BOOT can return to the normal startup process after the self-update is completed. The post-processing process here is combined with the pre-flashing process before flashing to form a security mechanism, which eliminates the risk to the controller chip caused by abnormal behavior during the flashing process from the source, and greatly improves the security level of problem solving.
[0071] In summary, this invention employs a BOOT application to perform self-updating of the vehicle electronic control unit (ECU) BOOT. The entire flashing process is automated; simply running the BOOT application directly updates the ECU BOOT program without requiring specialized flashing tools connected to the circuit board's debugging port. Therefore, offline updates by professional technicians are unnecessary. Pre-flashing is achieved by modifying the original boot address of the corresponding chip in the ECU. This allows for automatic re-triggering based on a preset address in case of subsequent flashing failures, eliminating the need for manual reset and resulting in high automation and efficiency. During the flashing process, the BOOT is automatically flashed via the BOOT application, and post-processing including flash verification and address modification after completion ensures the correctness and effectiveness of the BOOT update. Thus, simply running the BOOT application automatically achieves fast, safe, efficient, and low-user-perception updates of the ECU BOOT program, without relying on dedicated update equipment. This avoids the inefficiencies and errors associated with manual flashing operations, balancing reliability and convenience.
[0072] The following is a detailed description of the APP-based device for self-updating the BOOT of an on-board electronic control unit provided by the present invention.
[0073] like Figure 5 As shown, the device for self-updating the BOOT of the vehicle electronic control unit based on the APP includes: a pre-flash module 501, a flash module 502, and a post-processing module 503.
[0074] Specifically, the pre-flash module 501 is used to modify the original boot address of the corresponding chip of the vehicle electronic control unit to a preset address in response to the BOOT application to be flashed meeting the preset flashing conditions; the flashing module 502 is used to write the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the vehicle electronic control unit in response to the preset address being modified; and to perform flashing verification on the flashed BOOT of the vehicle electronic control unit; the post-processing module 503 is used to modify the preset address to the starting address of the BOOT code segment in the flashed BOOT in response to the successful flashing verification, and to reset the flashed BOOT.
[0075] In one possible implementation, the post-processing module 503 is further configured to, in response to successful flash verification, write the target verification value calculated based on the written BOOT code segment during flash verification into the BOOT verification information space corresponding to the flashed BOOT; and in response to failed flash verification, reset the preset address to the original startup address of the chip corresponding to the vehicle electronic control unit.
[0076] The device for self-updating the BOOT of the vehicle electronic control unit based on the APP provided in the above embodiments can realize the technical solutions described in the above method embodiments for self-updating the BOOT of the vehicle electronic control unit based on the APP. The specific implementation principles of each module or unit can be found in the corresponding content in the above method embodiments for self-updating the BOOT of the vehicle electronic control unit based on the APP. Their technical effects can also be referred to each other, and will not be repeated here.
[0077] like Figure 6 As shown, the present invention also provides an electronic device 600. The electronic device 600 includes a processor 601, a memory 602, and a display 603. Figure 6 Only some components of the electronic device 600 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0078] In some embodiments, memory 602 may be an internal storage unit of electronic device 600, such as a hard disk or memory of electronic device 600. In other embodiments, memory 602 may also be an external storage device of electronic device 600, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 600.
[0079] Furthermore, the memory 602 may include both internal storage units of the electronic device 600 and external storage devices. The memory 602 is used to store application software and various types of data installed on the electronic device 600.
[0080] In some embodiments, processor 601 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 602 or process data, such as the APP-based vehicle electronic control unit self-updating BOOT method of the present invention.
[0081] In some embodiments, display 603 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 603 is used to display information from electronic device 600 and to display a visual user interface. Components 601-603 of electronic device 600 communicate with each other via a system bus.
[0082] In some embodiments of the present invention, when the processor 601 executes the BOOT self-update program in the memory 602, the following steps can be implemented: in response to the BOOT application to be flashed meeting the preset flashing conditions, the original boot address of the chip corresponding to the vehicle electronic control unit is modified to a preset address; in response to the preset address being modified, the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed are written to the BOOT of the vehicle electronic control unit, and the flashing verification of the BOOT of the vehicle electronic control unit is performed; in response to the successful flashing verification, the preset address is modified to the starting address of the BOOT code segment in the flashed BOOT, and the flashed BOOT is reset.
[0083] It should be understood that when the processor 601 executes the BOOT self-update program in the memory 602, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.
[0084] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 600 mentioned. Electronic device 600 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 600 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0085] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for self-updating the BOOT of an on-board electronic control unit based on an APP provided by the above methods. This method includes: in response to the BOOT application to be flashed meeting preset flashing conditions, modifying the original boot address of the chip corresponding to the on-board electronic control unit to a preset address; in response to the preset address being modified, writing the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the on-board electronic control unit, and performing a flashing verification on the flashed BOOT of the on-board electronic control unit; in response to successful flashing verification, modifying the preset address to the starting address of the BOOT code segment in the flashed BOOT, and resetting the flashed BOOT.
[0086] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0087] The above provides a detailed description of the method and apparatus for self-updating the BOOT of an on-board electronic control unit based on an APP provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for self-updating the BOOT of an on-board electronic control unit based on an APP, characterized in that, include: In response to the BOOT application to be flashed meeting the preset flashing conditions, the original boot address of the corresponding chip of the vehicle electronic control unit is modified to the preset address. In response to the completion of the preset address modification, the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed are written to the BOOT of the vehicle electronic control unit, and the flashing verification of the BOOT of the vehicle electronic control unit is performed. In response to successful flash verification, the preset address is modified to the starting address of the BOOT code segment in the flashed BOOT, and the flashed BOOT is reset.
2. The method for self-updating the BOOT of an on-board electronic control unit based on an APP according to claim 1, characterized in that, The preset write conditions include: The BOOT application to be flashed has been detected to exist; The BOOT application to be flashed is matched with the hardware version of the vehicle electronic control unit; The software version of the BOOT application to be flashed is inconsistent with the software version of the BOOT in the vehicle electronic control unit.
3. The method for self-updating the BOOT of an on-board electronic control unit based on an APP according to claim 1, characterized in that, The address space architecture of the BOOT application to be flashed includes the address space occupied when the BOOT application to be flashed is executed, as well as the address space occupied by the BOOT application to be flashed.
4. The method for self-updating the BOOT of an on-board electronic control unit based on an APP according to claim 3, characterized in that, The address space occupied by the BOOT application to be flashed is the same as the address space architecture of the BOOT of the vehicle electronic control unit. The address space architecture of the BOOT of the vehicle electronic control unit includes: BOOT information header file space, BOOT code segment space and BOOT verification information space.
5. The method for self-updating the BOOT of an on-board electronic control unit based on an APP according to claim 1, characterized in that, The step of writing the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the vehicle electronic control unit includes: Determine the erase parameters stored in the BOOT information header file of the BOOT application to be flashed. The erase parameters include the erase address position and erase position length for erasing the address space corresponding to the BOOT space architecture. The BOOT space architecture is the address architecture of the BOOT of the vehicle electronic control unit. The memory driver program of the vehicle electronic control unit is invoked to erase the BOOT information header file space and BOOT code segment space in the BOOT space architecture according to the erase parameters, so as to obtain the first target address space and the second target address space. Write the BOOT information header file of the BOOT application to be flashed into the first target address space; Write the BOOT code segment of the BOOT application to be flashed into the second target address space.
6. The method for self-updating the BOOT of an on-board electronic control unit based on an APP according to claim 1, characterized in that, The post-flashing verification of the BOOT of the vehicle's electronic control unit includes: The BOOT of the vehicle electronic control unit is verified according to preset flashing verification conditions, which include: The version of the BOOT application to be flashed is the same as the version of the BOOT after flashing. The target verification value is consistent with the verification value in the BOOT verification information space of the BOOT application to be flashed. The target verification value is calculated based on the BOOT code segment written in the BOOT after flashing. When the BOOT meets the flash verification conditions after the flash, the flash verification is determined to be successful. If the BOOT does not meet the flash verification conditions after the flash is performed, the flash verification is determined to have failed.
7. The method for self-updating the BOOT of an on-board electronic control unit based on an APP according to claim 1, characterized in that, The method further includes: In response to successful flash verification, the target verification value calculated based on the written BOOT code segment during flash verification is written into the BOOT verification information space corresponding to the flashed BOOT. In response to a failed write verification, the preset address is reset to the original startup address of the chip corresponding to the vehicle electronic control unit.
8. A device for self-updating the BOOT of an on-board electronic control unit based on an APP, characterized in that, include: The pre-flash module is used to modify the original boot address of the corresponding chip of the vehicle electronic control unit to a preset address in response to the BOOT application to be flashed meeting the preset flashing conditions. The flashing module is used to respond to the fact that the preset address has been modified, write the BOOT information header file and BOOT code segment stored in the BOOT application to be flashed into the BOOT of the vehicle electronic control unit, and perform flashing verification on the flashed BOOT of the vehicle electronic control unit. The post-processing module is used to modify the preset address to the starting address of the BOOT code segment in the BOOT after flashing in response to the successful flashing verification, and to reset the BOOT after flashing.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps of the APP-based vehicle electronic control unit self-updating BOOT method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the APP-based vehicle electronic control unit self-updating BOOT method as described in any one of claims 1 to 7.