Vehicle, Program Update Method

By dividing the ECU's storage medium into multiple regions and changing the target region for reading when the ECU starts, the problem of insufficient convenience in ECU updates is solved, achieving convenience and cost reduction in OTA updates.

CN123125574APending Publication Date: 2026-11-17SUBARU CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202480091135.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

When the storage medium capacity of the ECU is insufficient, existing technologies cannot efficiently update the boot image via OTA, resulting in a lack of convenience.

Method used

The ECU's storage medium is divided into multiple areas. One area is used to store the updated boot image, and another area is not read when the ECU starts. The updated boot image is stored in the unused area by the processor control, and the target area to be read is changed at startup.

Benefits of technology

It improves the convenience of ECU updates, supports OTA updates during driving, and reduces the cost of ECUs and the need for storage media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123125574A_ABST
    Figure CN123125574A_ABST
Patent Text Reader

Abstract

The present invention relates to a vehicle including an ECU, the ECU including one or more processors and a storage medium storing a program executed by the one or more processors. The ECU includes a first ECU and one or more second ECUs. The storage medium in the first ECU includes a non-volatile storage medium divided into a greater number of regions than the number of second ECUs. Each divided region serves as a first region and a second region. The first region is where a boot image corresponding to any one of the second ECUs is written and is read when the corresponding second ECU is started, while the second region is not read when any of the second ECUs is started. The number of first regions is set according to the number of second ECUs. The program in the execution subject ECU, which is one of the first or second ECUs, includes one or more instructions. The one or more instructions cause the one or more processors in the execution subject ECU to perform the following processes: for an update target ECU selected from the second ECUs as the update target of the boot image, storing the updated new boot image in the second region; and setting the region where the boot image before the update was written as the second region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of updating the software of information processing devices installed in vehicles. Background Technology

[0002] Due to the electronic control, vehicles are equipped with various information processing devices such as ECUs (Electronic Control Units).

[0003] This information processing device needs to be updated to eliminate software errors and improve performance (see, for example, Patent Document 1).

[0004] Existing technical documents Patent documents Patent Document 1: Japanese Patent Application Publication No. 2023-052938 Summary of the Invention

[0005] The problem that the invention aims to solve Software updates also include a boot image that is read when the ECU starts. If the storage medium, such as flash memory, has sufficient capacity, the boot image can be updated during driving via OTA (Over-The-Air).

[0006] On the other hand, when the capacity of storage media such as flash memory is small and there is no spare space to store multiple boot images, it is necessary to use external terminals or the like for updates, which presents difficulties in terms of convenience.

[0007] The purpose of this disclosure is to improve the ease of ECU updates.

[0008] Technical solutions for solving technical problems One aspect of this technology involves a vehicle including an ECU, the ECU comprising one or more processors and a storage medium storing a program executed by the one or more processors. The ECU includes a first ECU and one or more second ECUs. The storage medium in the first ECU comprises a non-volatile storage medium divided into a greater number of regions than the number of second ECUs. Each divided region includes a first region and a second region, the first region being a region for writing a boot image corresponding to any of the second ECUs and being read upon startup of the corresponding second ECU, the second region not being read upon startup of any of the second ECUs. The number of first regions is set according to the number of second ECUs. The program in the execution subject ECU, which is one of the first or second ECUs, comprises one or more instructions. The one or more instructions cause the one or more processors in the execution subject ECU to perform the following processes: for an update target ECU selected from the second ECUs as the update target of the boot image, storing the updated new boot image in the second region; and setting the region for writing the boot image before the update to the second region.

[0009] Invention Effects This technology can improve the ease of ECU updates. Attached Figure Description

[0010] Figure 1 This is a block diagram representing an example of a vehicle's configuration.

[0011] Figure 2 This is a block diagram illustrating an example of the configuration of an ECU.

[0012] Figure 3 It is a diagram used to illustrate the various regions set in the ROM of the first ECU.

[0013] Figure 4 This is a diagram showing the state of the boot image in each region of the ROM set in the first ECU before it is updated.

[0014] Figure 5 It is a diagram showing the status of the boot image writing process for each region set in the ROM of the first ECU.

[0015] Figure 6 It is a diagram showing the state of the boot image after it has been written to each region of the ROM in the first ECU.

[0016] Figure 7 This is a flowchart illustrating an example of the processing performed by the CPU of the ECU that updates the boot image.

[0017] Figure 8 This is a diagram showing the state of the boot image in each region of the ROM of the first ECU before it is updated, in a modified example.

[0018] Figure 9 This is a diagram showing the state of the boot image writing process in the ROM of the first ECU in a modified example.

[0019] Figure 10 This is a diagram showing the state of the boot image after it has been written to each region of the ROM in the first ECU in a modified example.

[0020] Figure 11 This is a diagram showing the state of the boot image copying in the ROM of the first ECU in a modified example.

[0021] Figure 12 This is a diagram showing the state of the boot image after it has been copied to each region of the ROM in the first ECU in a modified example.

[0022] Figure 13 This is a flowchart illustrating an example of the process performed by the ECU's CPU in order to update the boot image in a variant example.

[0023] Figure 14 This is a block diagram illustrating a vehicle configuration example where a wireless communication unit is set up as a second ECU.

[0024] Figure 15 This is a diagram illustrating an example where the boot image of the first ECU is also updated in the same way as that of the second ECU. Detailed Implementation

[0025] <1. Vehicle Composition> An embodiment of the vehicle 100 of this disclosure will now be described with reference to the accompanying drawings.

[0026] like Figure 1 As shown, vehicle 100 includes multiple ECUs. Specifically, the multiple ECUs are configured with a first ECU1 and one or more second ECUs2.

[0027] The first ECU1 is a NASECU, which functions as NAS (Network Attached Storage) to collect and store the boot-time data (specifically the boot image) of each second ECU2.

[0028] The second ECU2 can be configured for each controlled object, such as ACECU (air conditioning ECU), engine control ECU, charging control ECU, airbag ECU, and display control ECU.

[0029] In the following description, vehicle 100 is described as including four second ECUs 2, specifically second ECU 2a, second ECU 2b, second ECU 2c and second ECU 2d.

[0030] However, the number of second ECU2 included in vehicle 100 is not limited to this. Vehicle 100 may include one second ECU2, or it may include two, three or more second ECU2.

[0031] Furthermore, the second ECU2a, as an aspect of the second ECU2, is a CECU (Central ECU). As a CECU, the second ECU2a is a control unit for the overall control of the vehicle 100, and performs overall control of the vehicle 100 by giving appropriate instructions to the first ECU1 and the second ECU2b, second ECU2c and second ECU2d, which are other second ECUs 2.

[0032] In addition to the first ECU1 and various second ECU2, the vehicle 100 also includes a wireless communication unit 3 and a bus 4 for wireless communication.

[0033] The first ECU1, various second ECUs2, and wireless communication unit 3 can communicate via bus 4. Bus 4 is configured, for example, to use CAN [Controller Area Network (registered trademark)] for communication and can send and receive information between devices such as ECUs.

[0034] The wireless communication unit 3 is a vehicle communicator that communicates with other devices via an external communication network. For example, the wireless communication unit 3 can obtain data for updating the aforementioned program from an external file server via OTA (Over-The-Air) updates. The obtained data is provided to the ECU (Electronic Control Unit) for update processing via bus 4.

[0035] It should be noted that in the following description, the second ECU2a will be used as an example, serving as the ECU in the second ECU2 that performs the program update process. However, this is only one example; the update process can be performed by the first ECU1, or by the second ECU2 other than the second ECU2a. In addition to the first ECU1 and the second ECU2, the update process can also be performed by the control units included in the vehicle 100.

[0036] Furthermore, in the following description, the ECU that performs the main program update process is sometimes referred to as the "executor ECU".

[0037] The second ECU2a communicates wirelessly with the outside of the vehicle 100 by controlling the wireless communication unit 3. Thus, the second ECU2a can obtain program update data from external devices.

[0038] The following explanation will use a boot image as an example of program update data. The boot image is data read when the second ECU2 is started and is updated appropriately to improve the functionality of the second ECU2 or fix faults. Furthermore, the boot image may be downgraded if problems arise with the updated program.

[0039] The following description includes not only updating the boot image but also downgrading, and will be referred to together as "updating the boot image".

[0040] Configuration examples of the first ECU1 and the second ECU2 are as follows: Figure 2 As shown.

[0041] Each ECU, including the first ECU1 and the second ECU2, includes a microcomputer 5 and a communication circuit 6.

[0042] The microcomputer 5 includes a CPU (Central Processing Unit) 7, ROM (Read Only Memory) 8, and RAM (Random Access Memory) 9.

[0043] CPU7, ROM8 and RAM9 can communicate with each other via the on-chip bus 10.

[0044] CPU7 performs various processes based on programs stored in ROM8 or loaded into RAM9.

[0045] The second ECU2a, acting as the execution unit ECU, performs the decoding of the boot image for update, the verification of the version, and the determination of whether to perform the update process. Then, the second ECU2a sends the decoded boot image for update to the second ECU2 that needs to be updated.

[0046] It should be noted that at least some of these processes can also be performed in the second ECU2 that is to be updated.

[0047] ROM8 is a non-volatile memory such as flash memory. It should be noted that the first ECU1 is a NASECU, and the boot images of each second ECU2 are centrally stored in the flash memory of ROM8, which is the first ECU1. This will be explained in detail later.

[0048] RAM9 stores temporary data required by CPU7 for scheduled processing.

[0049] Communication circuit 6 controls data communication based on CAN communication specifications, etc., conducted via bus 4.

[0050] <2. An example of information stored in the ROM of the first ECU> As described above, the flash memory of ROM8, which is the first ECU1, stores the boot images of each of the second ECU2. Here, ROM8 of the first ECU1 will be referred to as ROM8a.

[0051] ROM8a is divided into multiple regions. These regions in ROM8a can be physically divided, for example, by different chips, or they can be virtually divided into regions located within a single chip.

[0052] For example, ROM8a Figure 3 As shown.

[0053] The ROM8a of the first ECU1 has an area for storing the boot image of the second ECU2 and other areas. The diagram showing the area storing the boot image of the second ECU2 is shown below. Figure 3 .

[0054] Here, the area storing the boot image of the second ECU2 is denoted as "boot image area ArB".

[0055] The boot image region ArB is divided into multiple partitioned regions, each with a uniform size of "X bytes".

[0056] ROM8a is configured with a first region Ar1 and a second region Ar2. The first region Ar1 is the region that stores the boot image of the second ECU2 and is read during startup. The second region Ar2 is not read when either second ECU2 is started. That is, each segmented region is one of the first region Ar1 and the second region Ar2.

[0057] Figure 4 It shows in Figure 1 In the example shown, vehicle 100 includes ROM8a in the case of four second ECUs 2.

[0058] The boot image region ArB is divided into five segments, one more than the number of segments in the second ECU2.

[0059] Specifically, the boot image region ArB is divided into a first region Ar1a for storing the boot image of the second ECU2a, a first region Ar1b for storing the boot image of the second ECU2b, a first region Ar1c for storing the boot image of the second ECU2c, a first region Ar1d for storing the boot image of the second ECU2d, and a second region Ar2, which is an unused region that is not read at startup.

[0060] It should be noted that the "unused area" refers to the area that is not used when the second ECU2 is started, but is used when updating the boot image of the second ECU2. That is, the second area Ar2 can be understood as a spare area or an update working area.

[0061] The boot image size used by the second ECU2a is set to "Y1 bytes". Similarly, the boot image size used by the second ECU2b is set to "Y2 bytes", the boot image size used by the second ECU2c is set to "Y3 bytes", and the boot image size used by the second ECU2d is set to "Y4 bytes".

[0062] Each of the first regions Ar1 and the second region Ar2 is a region of “X bytes”. Here, the value of “X” is the maximum value among “Y1”, “Y2”, “Y3”, and “Y4”.

[0063] For example, when the size of "Y2" among "Y1", "Y2", "Y3" and "Y4" is the largest, the size of "X" is a size with a certain margin compared to "Y2".

[0064] This margin is set because the boot images before and after the update may not have the same data size.

[0065] in addition, Figure 4 An example of the state before updating the boot image is shown. Additionally, an example is shown where the second ECU2 to be updated is configured as the second ECU2b, and its boot image is the boot image used by the second ECU2b.

[0066] Each segmented region included in the boot image region ArB is named sequentially from the smallest address as boot image region ArBa, ArBb, ArBc, ArBd, and ArBe.

[0067] During the boot image update process, the changes in the information stored in the boot image region ArB are as follows: Figure 5 As shown in the following figures. It should be noted that in each figure, the newly downloaded boot image used for updating is also referred to as the "new boot image". Additionally, as mentioned above, the new boot image is also the boot image of the older version, to avoid fatal defects contained in the current version.

[0068] like Figure 5 As shown, the new boot image is stored in the boot image region ArBe, which is the second region Ar2, within the ROM8a of the first ECU1, which is the NASECU. That is, during the writing of the new boot image, the data of the new boot image is written sequentially to the second region Ar2.

[0069] Then, the boot image previously read during the startup of the second ECU2b and stored in the first region Ar1b is set as the "old boot image".

[0070] Figure 6 This shows the state after the new boot image for the second region Ar2 has been written.

[0071] like Figure 6 As shown, the new boot image is written to... Figure 5 ArBe, which serves as the boot image region for the second region Ar2, Figure 5 The boot image region ArBb, which is designated as the first region Ar1b, is considered an unused region. It should be noted that the unused region can continue to store old boot images, or it can delete old boot images.

[0072] In addition, Figure 5 The boot image region ArBb, which was originally designated as region Ar1b, was reassigned to region Ar2 as the second region. Figure 5 The boot image region ArBe, which was originally the second region Ar2, was reset to the first region Ar1b.

[0073] These resets mean that the bootloader settings of the second ECU2b have changed, meaning that the region to be read at startup has changed from the boot image region ArBb to the boot image region ArBe.

[0074] from Figure 4 and Figure 5 It can be seen that the boot image region ArBe, which was set as the second region Ar2 before updating the boot image, is used as the working area for updating the boot image during the update operation.

[0075] from Figure 6 It can be seen that the boot image region ArBb, which is set as the second region Ar2 after the boot image is updated, is the region used as the working region during the next boot image update.

[0076] <3. Processing Example> Figure 7 An example of the processing performed by CPU7 of the second ECU2a, which is the execution subject ECU, is shown.

[0077] In step S101, the CPU7 of the second ECU2a receives an update request. This update request can be received from the second ECU2 or from the server that publishes the boot image.

[0078] For example, upon receiving an update request from the second ECU2, the CPU7 of the second ECU2a performs a process in step S101 to confirm with the server whether a new boot image has been released. Furthermore, when receiving an update request from the server, the CPU7 of the second ECU2a can determine in step S101 whether it is an opportune time to update the boot image.

[0079] In step S102, the CPU7 of the second ECU2a obtains a new boot image from the server.

[0080] In step S103, the CPU7 of the second ECU2a performs the processing of the second ECU2 to be updated.

[0081] In step S104, the CPU7 of the second ECU2a determines whether the boot image update process can be executed. This process includes determining whether a new boot image has already been stored and whether the timing for updating the boot image is appropriate.

[0082] If it is determined that the boot image update process will not be executed (step S104: determined to be "No"), the CPU7 of the second ECU2a will not execute any of the processes after step S105, and will end the process. Figure 7 The series of processes shown.

[0083] On the other hand, if it is determined that a boot image update process needs to be performed (step S104: determination is "yes"), the CPU7 of the second ECU2a performs processing on the second region Ar2, which is designated as an unused region, in step S105. As described above, this processing is performed because the second region Ar2 is not fixed but may change.

[0084] In step S106, the CPU7 of the second ECU2a executes the process of writing the new boot image into the second region Ar2, which is an unused region.

[0085] In step S107, the CPU7 of the second ECU2a changes the settings of the bootloader. This setting change alters the region read by the bootloader of the second ECU2 to be updated at startup, changing it to the region previously set as the second region Ar2.

[0086] <4. An example of information stored in the ROM of the first ECU in a variant> In the example above, the partitioned regions of the boot image region ArB are set to be of the same size. However, when the data sizes of the boot images of the various second ECU2s are different, and only the data size of the boot image of a specific second ECU2 is extremely large, it is difficult to effectively utilize the boot image region ArB.

[0087] In this variant, this is improved by determining the segmented regions of the boot image region ArB based on the data size of each stored boot image.

[0088] Specific combination Figure 8 Please provide an explanation.

[0089] Similar to the previous example, the boot image region ArB is divided into five regions, named ArBa, ArBb, ArBc, ArBd, and ArBe, starting with the smallest address.

[0090] The boot image region ArBa is the region that stores the boot image used by the second ECU2a. Its size is set to "Y1+n bytes", which is the size of the boot image used by the second ECU2a, "Y1 bytes", plus a certain amount of "n bytes".

[0091] Similarly, the boot image region ArBb is the region that stores the boot image used by the second ECU2b, and it is a region of "Y2+n bytes", that is, the region after adding "n bytes" as a margin to the size of the boot image used by the second ECU2b, which is "Y2 bytes".

[0092] Additionally, the boot image region ArBc is the region that stores the boot image used by the second ECU2c, and it is a region of "Y3+n bytes", that is, the region after adding "n bytes" as a margin to the size of the boot image used by the second ECU2c, which is "Y3 bytes".

[0093] Then, the boot image region ArBd is the region that stores the boot image used by the second ECU2d, and it is a region of "Y4+n bytes", that is, the region after adding "n bytes" as a margin to the size of the boot image used by the second ECU2d, which is "Y4 bytes".

[0094] Finally, the size of the boot image region ArBe is set based on the largest size Y2 among Y1 to Y4. That is, the size of the boot image region ArBe is set to "Y2 + n bytes".

[0095] Here, the margin for each partition is set to "n bytes," but the margin can be set to a different size for each partition. Especially after updating the boot images, the size of the boot images changes, and therefore "n bytes" also changes. That is, the margin for each partition can be different from each other.

[0096] in addition, Figure 8This illustrates an example of the state before updating the boot image. Boot image regions ArBa, ArBb, ArBc, and ArBd are all the first region Ar1. Then, the boot image region ArBe is set as the second region Ar2, which is an unused region.

[0097] During the boot image update process, the changes in the information stored in the boot image region ArB are as follows: Figure 9 As shown in the following figures.

[0098] like Figure 9 As shown, the new boot image is stored in the boot image region ArBe, which is the second region Ar2, in the ROM8a of the first ECU1, which is the NASECU.

[0099] Then, the boot image previously read when the second ECU2b was started, stored in the first region Ar1b, is set as the old boot image.

[0100] Figure 10 This shows the state after the new boot image for the second region Ar2 has been written.

[0101] like Figure 10 As shown, the new boot image is written to... Figure 9 ArBe, which serves as the boot image region for the second region Ar2, Figure 5 The boot image region ArBb, which is designated as the first region Ar1b, is set as an unused region. It should be noted that the unused region can continue to store old boot images, or it can delete old boot images.

[0102] In addition, Figure 9 The boot image region ArBb, which was originally designated as region Ar1b, was temporarily set as region Ar2, the second region. Figure 5 The boot image region ArBe, which is the second region Ar2, is temporarily set as the first region Ar1b.

[0103] The temporary settings of the first region Ar1 and the second region Ar2 are used to ensure proper operation, for example, in the case of restarting the second ECU2 to be updated during a boot image update. Therefore, during a boot image update, the region to be read at startup in the bootloader of the second ECU2b is temporarily changed from the boot image region ArBb to the boot image region ArBe.

[0104] Subsequently, the boot image of the second ECU2b, written into the boot image region ArBe, is copied to the boot image region ArBb, which is temporarily set as the second region Ar2. That is, the new boot image is copied to the region where the old boot image was originally stored.

[0105] It should be noted that even during the copying process, the boot image region ArBe is still set to the first region Ar1b, and the boot image region ArBb is still set to the second region Ar2.

[0106] The status after the new boot image is copied is shown below. Figure 12 As shown in the figure, the boot image region ArBb, which has been copied with the new boot image, is set back to the first region Ar1b, while the boot image region ArBe, which was initially written with the new boot image, is restored to the second region Ar2.

[0107] from Figures 8 to 11 As can be seen from the figures, in this variant example, the second region Ar2 is a region used only during the update operation.

[0108] Then, from Figure 8 and Figure 12 It can be seen that, except during the update of the boot image, the settings of the bootloader remain unchanged before and after the update, and the area read when each second ECU2 starts remains unchanged.

[0109] By adopting such a structure, in the modified vehicle 100, each segment of the guide image region ArB can be set to a compact size, thereby enabling miniaturization of the flash memory of the ROM8a, which serves as the first ECU1.

[0110] <5. Examples of handling variations> An example of the processing performed by CPU7 of the second ECU2a, which is the execution body ECU, in this variation is shown below. Figure 13 It should be noted that, regarding... Figure 7 For the same process, label the same step numbers and omit the descriptions as appropriate.

[0111] After executing steps S101 to S103, the CPU7 of the second ECU2a determines in step S104 whether the boot image update process can be executed. If it is determined that the update process should not be executed (step S104: determination is "No"), the CPU7 of the second ECU2a terminates. Figure 13 The series of processes shown.

[0112] On the other hand, if it is determined that an update process needs to be performed (step S104: determination is "yes"), the CPU7 of the second ECU2a stores the new boot image in the second region Ar2, which is an unused region, i.e., the boot image region ArBe, in step S106. It should be noted that in this variant example, since the specific region, i.e., the boot image region ArBe, is always set as the second region Ar2 before updating the boot image, it is not necessary to specify the processing of the second region Ar2 in step S105 of the previous example.

[0113] In step S111, the CPU7 of the second ECU2a changes the settings of the bootloader. During this setting change, the boot image region ArBb, which stores the old boot image, is temporarily set as the second region Ar2. Furthermore, in this process, the boot image region ArBe, which stores the new boot image, is temporarily set as the first region Ar1b.

[0114] In step S112, the CPU7 of the second ECU2a performs the process of copying the new boot image from the boot image region ArBe, which stores the new boot image, to the boot image region ArBb, which is the region where the old boot image was written.

[0115] When the copying of the new boot image is complete, the CPU7 of the second ECU2a changes the bootloader settings again in step S113. This process reverts the bootloader settings to their state before the update. Specifically, the boot image region ArBe, which initially stored the new boot image, is reassigned to the second region Ar2. Furthermore, the boot image region ArBb, which stored the old boot image, is reassigned to the first region Ar1b.

[0116] <6. Other> In the above example, the wireless communication unit 3 is described differently from the second ECU 2, but the wireless communication unit 3 can also be configured as the communication ECU that controls the entire communication process. That is, as shown in the example above. Figure 14 As shown, as one aspect of the second ECU2, the wireless communication unit 3 can be configured as the second ECU2x, in which case the boot image of the wireless communication unit 3 can be updated by the method described above.

[0117] Furthermore, the boot image read during the startup of the first ECU1 can also be updated using the methods described above. For example, as... Figure 15 As shown, the ROM8a of the first ECU1 may be configured with a boot image area ArBz, which is a first area Ar1z storing a boot image for the first ECU1; boot image areas ArBa, ArBb, ArBc, and ArBd, which are the first area Ar1 storing a boot image for the second ECU2; and a second area Ar2, which is an unused area.

[0118] These other examples also apply Figure 8 The variations shown are as follows.

[0119] It should be noted that the second ECU2 can also function solely as an ECU that requires OTA (Over-The-Air) updates. For example, an ECU that does not require OTA updates can function as a third ECU, and its boot image can be stored in a ROM such as flash memory within the third ECU. That is, there is no need to centralize the boot image of the third ECU that does not require OTA updates into the ROM8a of the first ECU1.

[0120] <7. Summary> As described in the examples above, the vehicle 100 of this technology includes an ECU, which includes one or more processors (CPU7) and storage media (ROM8, ROM8a and RAM9) storing programs executed by the one or more processors. The ECU includes a first ECU1 and one or more second ECU2.

[0121] Furthermore, the storage medium (ROM8a) in the first ECU1 includes a non-volatile storage medium (e.g., flash memory), which is divided into a greater number of regions (boot image regions ArB) than the number of second ECUs. Each region includes a first region Ar1 and a second region Ar2. The first region Ar1 is the region where the boot image corresponding to any of the second ECUs is written and is read when the corresponding second ECU is started. The second region Ar2 is not read when any of the second ECUs is started.

[0122] Then, the number of Ar1 in the first region is set according to the number of the second ECU2.

[0123] Furthermore, the program in either the first ECU1 or the second ECU2 (in the embodiment, the second ECU2a as a CECU) includes one or more instructions that cause one or more processors in the execution ECU to perform the following processes.

[0124] The first process is to store the updated new boot image in the second region Ar2 for the target ECU (in the embodiment, the second ECU2b) selected from the second ECU2 as the target of the boot image update.

[0125] The second process is to set the region containing the boot image before the update (in this implementation, the boot image region ArBb) as the second region Ar2.

[0126] The first ECU1 is, for example, a NASECU that serves as the boot image for the second ECU2, which is also a component of the other ECUs. That is, each second ECU2 boots by accessing a non-volatile memory (ROM8a) such as the flash memory of the first ECU1 to read the boot image during startup.

[0127] Therefore, each second ECU2 can be configured to exclude non-volatile memory such as flash memory for storing the boot image, or to include only a small amount of non-volatile memory. This reduces the cost of the second ECU2.

[0128] Furthermore, in the case where the original second ECU2's non-volatile memory only has the capacity to store one boot image, OTA is not supported. However, for such a second ECU2, by storing the boot image in the non-volatile memory within the first ECU1, it can be updated using the second region Ar2, thereby supporting OTA. Moreover, each second ECU2 can, for example, update the boot image during driving.

[0129] Furthermore, compared to a configuration where each second ECU2 includes non-volatile memory with a capacity more than twice the size of the boot image data to support OTA, the total capacity of the non-volatile memory of each ECU (first ECU1 and second ECU2) can be reduced, thereby reducing costs and saving resources related to the manufacture of non-volatile memory, such as semiconductor components.

[0130] Furthermore, since the safety boot function for each second ECU2 can be integrated into the first ECU1, only one location is needed to store the program for the safety boot function, compared to the case where each ECU has a safety boot function. Moreover, since the second ECU2 does not have a safety boot function, the development time for the second ECU2 can be reduced, thereby enabling the second ECU2 to be provided at a lower cost.

[0131] Furthermore, since the function of updating the boot image of each ECU is also concentrated in the first ECU1, only one location is needed to store the program for the update function, compared to the case where each ECU has the function of updating the boot image. In addition, since the second ECU2 does not have the update function, the development time of the second ECU2 can be reduced, thereby enabling the second ECU2 to be provided at a lower cost.

[0132] In vehicle 100, one or more instructions may cause one or more processors (CPU7) in execution body ECU (in the embodiment, the second ECU2a as CECU) to execute a bootloader for update target ECU (in the embodiment, the second ECU2b), and to set the area written with the updated new boot image (in the embodiment, the boot image area ArBe) as the area to be read at startup.

[0133] Therefore, the target ECU will start based on the updated boot image upon the next startup. Furthermore, the setup process of reading the target region for the bootloader, which is part of the preparation process, can be performed during the startup of the target ECU. Thus, this preparation process can be completed while driving, improving convenience.

[0134] In vehicle 100, the segmented regions (guide image regions ArBa, ArBb, ...) can be regions of the same size.

[0135] For example, "same size" means larger than the size of the boot image with the largest data capacity in the boot images of each second ECU2. Thus, the unused area that was set as the first region Ar1 before the update and was reassigned as the second region Ar2 after the update only has the capacity to write boot images of any second ECU2.

[0136] Therefore, all updates to the second ECU2 can be performed smoothly and without hindrance.

[0137] In vehicle 100, the size of each segmented region (guide image region ArBa, ArBb, ...) can be determined according to the maximum size of the guide image of each second ECU2.

[0138] For example, suppose that the size of each of the first region Ar1 and the second region Ar2 has a small margin (n bytes) relative to the maximum size of the boot image.

[0139] Therefore, even when the sizes of the first region Ar1 and the second region Ar2 are the same, the capacity of the non-volatile storage medium (ROM8a) can be reduced.

[0140] Therefore, the cost of storage media can be reduced.

[0141] In vehicle 100, the number of segmented regions (guide image regions ArBa, ArBb, ...) can be one more than the number of second ECU2.

[0142] That is, the second region Ar2 is set to one. This reduces the size of the second region Ar2, which is the remaining region that is not read when the second ECU2 starts.

[0143] In vehicle 100, one or more instructions can cause one or more processors (CPU7) in the execution body ECU (in the embodiment, the second ECU2a as CECU) to perform the following processes: using the region storing the updated new boot image (in the embodiment, the boot image region ArBe) as the copy source region, using the region storing the previous boot image (old boot image) (in the embodiment, the boot image region ArBb) as the copy target region, copying the updated new boot image, and setting the copy source region back to the second region Ar2.

[0144] Therefore, the new boot image is moved to the area where the old boot image was originally stored. That is, the second area Ar2 when updating the boot image again is always the same area (in the implementation, the boot image area ArBe).

[0145] Therefore, it is not necessary to confirm the processing of the second region Ar2 at the start of the update, which simplifies the procedure.

[0146] In vehicle 100, one or more instructions may cause one or more processors (CPU7) in execution body ECU (in the embodiment, the second ECU2a as CECU) to perform the following processes: for the bootloader of the updated target ECU (in the embodiment, the second ECU2b), before the copying process, the copy source region (in the embodiment, the boot image region ArBe) is set as the target region to be read at startup, and after the copying process, the copy target region (in the embodiment, the boot image region ArBb) is set as the target region to be read at startup.

[0147] Therefore, during the copying of the new boot image, the copy source region is set as the target region to be read at startup. Thus, since the startup process for updating the target ECU is based on the boot image stored in its complete state even during copying, failures to boot the target ECU for updating can be avoided even in the event of an unexpected reboot.

[0148] In vehicle 100, the size of the second region Ar2, which serves as the copy source region (in this embodiment, the boot image region ArBe), can be determined according to the maximum size of the boot image of each second ECU2 (in this embodiment, "Y2 bytes").

[0149] For example, the size of the second region Ar2, which is the source region for copying, is the size of the second region Ar2, which is the remaining region, plus a small margin (n bytes) to the maximum size of the boot image.

[0150] Therefore, the capacity of the second region Ar2 can be kept very small, thereby achieving a cost reduction effect for the non-volatile storage medium (ROM8a).

[0151] In vehicle 100, the size of each first region Ar1 can be determined according to the size of the corresponding second ECU2's guide image.

[0152] For example, when there are two second ECUs with different boot image sizes, one with a smaller boot image size and the other with a larger boot image size, the size of the first region Ar1 corresponding to the former second ECU2 is smaller than the size of the first region Ar1 corresponding to the latter second ECU2.

[0153] Therefore, since the first region Ar1 is also compactly integrated without much margin, the capacity of the non-volatile storage medium (ROM8a) can be reduced, thereby achieving a cost reduction effect for the storage medium.

[0154] The program update method of this technology is executed by the processor (CPU7) of the execution subject ECU (in this embodiment, the second ECU2a as a CECU) of any one of the first ECU1 and the second ECU2 located in the vehicle 100. The method includes: for an update target ECU (in this embodiment, the second ECU2b) selected from one or more second ECU2 located separately from the first ECU1 as the boot image update target, storing the updated new boot image in a second region Ar2 that is different from the first region Ar1 storing the boot image read when the second ECU2 is started; and setting the region where the boot image before the update is written (in this embodiment, the boot image region ArBb) as the second region Ar2. The first ECU1 includes a non-volatile storage medium (ROM8a) divided into a greater number of regions than the number of second ECU2s. The first region Ar1 and the second region Ar2 are set as respective divided regions in the storage medium (boot image regions ArBa, ArBb, ArBc, ...), and the number of first regions Ar1 is set according to the number of second ECU2s.

[0155] By using such a program update method, the aforementioned functions and effects can be achieved.

[0156] Furthermore, the above-described embodiments and variations can be appropriately combined.

[0157] Symbol Explanation 1 First ECU 2 Second ECU 2a Second ECU 2b Second ECU 2c Second ECU 2d Second ECU 2x Second ECU 7. CPU (Processor) 8 ROM (storage medium) 8a ROM (storage medium) 9 RAM (storage medium) 100 vehicles Ar1 First Region Ar1a First Region Ar1b First Region Ar1c Region 1 Ar1d First Region Ar1x Region 1 Ar1z First Region Ar2 Second Region.

Claims

1. A vehicle, the vehicle including an ECU, the ECU including one or more processors and a storage medium storing a program executed by the one or more processors, The ECU includes a first ECU and one or more second ECUs. The storage medium in the first ECU includes a non-volatile storage medium, which is divided into a greater number of regions than the number of regions in the second ECU. Each segmented region includes a first region and a second region. The first region is where a boot image corresponding to any of the second ECUs is written and is read when the corresponding second ECU is started. The second region is not read when any of the second ECUs is started. The number of the first region is set according to the number of the second ECU. The program in the ECU, which is the execution subject ECU of either the first ECU or the second ECU, includes one or more instructions. The one or more instructions cause the one or more processors in the execution entity ECU to perform the following processes: For the update target ECU selected from the second ECU as the update target of the boot image, the process of storing the updated new boot image in the second region; and, The process of setting the region of the boot image written before the update to the second region.

2. The vehicle according to claim 1, wherein, The one or more instructions cause the one or more processors in the execution entity ECU to perform the following processes: For the bootloader of the updated target ECU, the process of setting the area where the updated new boot image is written to the target area read at startup.

3. The vehicle according to claim 1, wherein, Each of the aforementioned segmented regions is a region of the same size.

4. The vehicle according to claim 3, wherein, The size of each of the segmented regions is based on the maximum size of the boot image of each of the second ECUs.

5. The vehicle according to claim 1, wherein, The number of the segmented regions is one more than the number of the second ECU.

6. The vehicle according to claim 1, wherein, The one or more instructions cause the one or more processors in the execution entity ECU to perform the following processes: The process of copying the updated boot image involves using the region storing the new, updated boot image as the source region and the region storing the original, updated boot image as the target region; and... The process of setting the source region of the copy back to the second region.

7. The vehicle according to claim 6, wherein, The one or more instructions cause the one or more processors in the execution entity ECU to perform the following processes: For the bootloader of the target ECU to be updated, before the copying process, the copy source region is set as the target region to be read at startup, and after the copying process, the copy target region is set as the target region to be read at startup.

8. The vehicle according to claim 6, wherein, The size of the second region, which serves as the source region for replication, is based on the maximum size of the boot image for each second ECU.

9. The vehicle according to claim 6, wherein, The size of each of the first regions is determined according to the size of the boot image of the corresponding second ECU.

10. A program update method, wherein the program update method is executed by a processor of an execution main ECU, which is one of a first ECU and a second ECU, located in a vehicle, the program update method comprising: The step of storing the updated new boot image in a second region that is different from the first region that stores the boot image read when the second ECU is started, for an update target ECU selected from one or more second ECUs that are separately set up from the first ECU; The step of setting the area containing the boot image before the update as the second area. The first ECU includes a non-volatile storage medium, which is divided into a greater number of regions than the second ECU. The first region and the second region serve as respective segmented regions within the storage medium. The number of the first region is set according to the number of the second ECU.

Citation Information

Patent Citations

  • Program update system, program update server, information processing device, vehicle, method, and program

    JP2023052938A