Software provision device and software update device
The software providing device generates flag information to reduce processing load on in-vehicle units by determining differential data presence, optimizing ROM capacity and CPU resources for efficient software updates.
Patent Information
- Application Number
- JP2023095050
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-19
AI Technical Summary
In-vehicle electronic control units face a heavy processing burden due to the need to determine the presence of differential data in sectors where version information is recorded, requiring temporary saving and erasing of old software, which increases processing load and resource consumption.
A software providing device generates flag information indicating whether difference data is applied to specific sectors, allowing the software update device to reduce processing load by determining this information beforehand and minimizing the need for sector-by-sector updates.
This approach reduces the processing load on in-vehicle electronic control units by minimizing the need for sector-by-sector determination of differential data, optimizing ROM capacity and CPU resources, and ensuring efficient software updates.
Smart Images

Figure 2024176490000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a software providing device that provides difference update information to a software update device that is an electronic control device, primarily for updating the software of an on-board electronic control device, a software update device that updates software using the received difference update information, methods executed by these devices, and programs executable by these devices. [Background technology]
[0002] Automobiles are equipped with various electronic control devices that are connected via an in-vehicle network. With the recent development of autonomous driving technology, the functions required of automobiles are becoming more complex, and the number of electronic control devices installed in automobiles is increasing.
[0003] Each electronic control unit is equipped with software that enables it to perform its functions. Software updates are performed to improve the functions of the electronic control unit or to repair software vulnerabilities.
[0004] When updating software, in order to shorten the software transfer time and update time, only the difference data between the new software and the old software is transmitted, as shown in Patent Document 1. In the update device that receives the difference data, new software is generated from the difference data and the old software and installed, completing the software update. Furthermore, as disclosed in Patent Document 2, version information of the software is also recorded in a recording area in which the software is recorded. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2017-199183 A [Patent Document 2] JP 2014-191574 A Summary of the Invention [Problem to be solved by the invention]
[0006] Here, the present inventors have found the following problem as a result of detailed investigation. When writing software to a flash memory in an electronic control unit, even if there is no update from the old software in the sector that records the version information, the old software must be temporarily saved in order to write the version information. As a result, in the sector that records the version information, the content of the processing differs depending on whether or not there is differential data, but when the electronic control unit determines the presence or absence of differential data to be applied to the sector that records the version information, the processing burden becomes heavy for an in-vehicle electronic control unit with limited resources. Furthermore, if the electronic control device proceeds with processing without determining whether or not there is differential data to be applied to the sector that records the version information, in the sector that records the version information, in either case where there is no update from the old software or where there is an update to the new software, the old software or the new software must be temporarily saved in order to record the version information, and the sector must be erased; particularly when updating to the new software, this erase operation must be performed twice.
[0007] SUMMARY OF THE PRESENT EMBODIMENTS Accordingly, an object of the present invention is to provide a software providing device or the like that reduces the processing load on an in-vehicle electronic control unit. [Means for solving the problem]
[0008] A software providing device according to one aspect of the present disclosure is a software providing device (100) that provides difference update information for old software stored in a flash memory that can be erased in sector units of a software updating device (200) mounted on a mobile object, comprising: A differential data acquisition unit (101) for acquiring differential data which is the difference between new software and the old software; a difference application position information acquisition unit (102) that acquires difference application position information indicating a first sector to which the difference data is applied; a related data acquisition unit (103) for acquiring related data that is data related to the new software; a related data position information acquisition unit (104) for acquiring related data position information indicating a second sector in which the related data is stored; a flag information generating unit (105) that generates flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information; and a transmission unit (106) that transmits the difference data, the difference application position information, the associated data, and the flag information to the software update device as the difference update information.
[0009] A software update device according to an aspect of the present disclosure is a software update device (200) mounted on a mobile object, which receives difference update information from a software providing device (100) and updates old software stored in a flash memory that can be erased in sector units using the difference update information, The software providing device includes: A differential data acquisition unit (101) for acquiring differential data which is the difference between new software and the old software; a difference application position information acquisition unit (102) that acquires difference application position information indicating a first sector to which the difference data is applied; a related data acquisition unit (103) for acquiring related data that is data related to the new software; a related data position information acquisition unit (104) for acquiring related data position information indicating a second sector in which the related data is stored; a flag information generating unit (105) that generates flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information; a transmission unit (106) that transmits the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information, The software update device includes: A receiving unit (201) for receiving the difference update information; a software update unit (202) that updates the old software of the first sector by using the difference data and the difference application position information included in the difference update information; a related information recording unit (203) for writing the related data to the second sector by using the flag information included in the difference update information, The related information recording unit includes: if the flag information indicates that the differential data is applied to the second sector, writing the associated data to the second sector; When the flag information indicates that the differential data is not applied to the second sector, the old software written in the second sector is evacuated, the second sector is erased, and the evacuated old software and the associated data are written to the second sector.
[0010] In addition, the claims and the numbers in parentheses attached to the constituent elements of the invention described in this section indicate the correspondence between the present invention and the embodiments described below, and are not intended to limit the present invention. Effect of the Invention
[0011] According to the above configuration, the software providing device generates flag information indicating whether or not differential data is applied to the second sector based on the difference application position information and related data position information, and transmits this to the software updating device. Therefore, the software updating device does not need to determine whether or not differential data is applied to the second sector, thereby reducing the processing burden on the software updating device. Also, each sector can be erased at most once. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram illustrating the positional relationship between a software providing device and a software updating device. [Diagram 2] A diagram explaining an example of the configuration of an electronic control system S. [Diagram 3] FIG. 1 is a diagram showing an overview of an update operation of the software update device according to the first embodiment; [Figure 4] FIG. 1 is a diagram showing an overview of an update operation of the software update device according to the first embodiment; [Diagram 5] FIG. 1 is a block diagram illustrating a configuration of a software providing device according to a first embodiment. [Figure 6] FIG. 1 is a diagram for explaining a specific example of flash memory information held by the software providing device of the first embodiment. [Figure 7] FIG. 1 is a block diagram illustrating a configuration of a software update device according to a first embodiment. [Figure 8] FIG. 1 is a main routine flow diagram illustrating the operation of the software providing device according to the first embodiment. [Figure 9] FIG. 13 is a subroutine flow diagram for explaining the operation of the related data position information acquisition unit of the software providing device according to the first embodiment. [Figure 10] FIG. 13 is a subroutine flow diagram for explaining the operation of the flag information generating unit of the software providing device according to the first embodiment. [Figure 11] FIG. 1 is a main routine flow diagram illustrating the operation of the software update device according to the first embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0014] The present invention means the invention described in the claims or in the Summary of the Invention section, and is not limited to the following embodiments. Furthermore, at least the words in quotation marks mean the words described in the claims or in the Summary of the Invention section, and are not limited to the following embodiments.
[0015] The configurations and methods described in the dependent claims are optional configurations and methods in the invention described in the independent claims. The configurations and methods of the embodiments corresponding to the configurations and methods described in the dependent claims, and the configurations and methods described only in the embodiments without being described in the claims, are optional configurations and methods in the present invention. The configurations and methods described in the embodiments when the description of the claims is broader than the description of the embodiments are also optional configurations and methods in the present invention in the sense that they are examples of the configurations and methods of the present invention. In either case, by being described in the independent claims, they become essential configurations and methods of the present invention.
[0016] The effects described in the embodiments are effects obtained when the configurations of the embodiments are provided as examples of the present invention, and are not necessarily effects that the present invention possesses.
[0017] When there are multiple embodiments (including modified examples; the same applies hereinafter in this paragraph), the configurations disclosed in each embodiment are not limited to each embodiment, but can be combined across the embodiments. For example, a configuration disclosed in one embodiment may be combined with another embodiment. Also, the configurations disclosed in each of the multiple embodiments may be collected and combined.
[0018] The problem described in the section on problems that the invention is intended to solve is not a publicly known problem, but was discovered independently by the inventor, and this, together with the configuration and method of the present invention, is a fact that affirms the inventive step of the invention.
[0019] 1. Configuration underlying each embodiment (1) Positional relationship between the software providing device and the software updating device The positional relationship between a software providing device 100 according to each embodiment and a software updating device 200 included in an electronic control system S will be described with reference to FIG.
[0020] The software providing device 100 is a device that provides software to a software updating device 200 that is at least one of electronic control units (Electric Control Units) 20 (hereinafter, abbreviated as ECUs 20) that constitute an electronic control system S. The software updating device 200 is a device that receives software provided by the software providing device 100 and updates the old software stored in a flash memory with the new software.
[0021] In Fig. 1(a), the software providing device 100 is a server device provided outside a vehicle, which is a "mobile body", and the software providing device 100 and the electronic control system S are connected by a wireless communication method. Examples of the wireless communication method include IEEE802.11 (Wi-Fi (registered trademark)), IEEE802.16 (WiMAX (registered trademark)), W-CDMA (Wideband Code Division Multiple Access), HSPA (High Speed Packet Access), LTE (Long Term Evolution), LTE-A (Long Term Evolution Advanced), 4G, 5G, etc. Alternatively, DSRC (Dedicated Short Range Communication) can be used.
[0022] In FIG. 1(b), the software providing device 100 is an external connection device provided outside a vehicle, which is a "mobile body", such as a diagnostic tool, a personal computer, or a smartphone, and the software providing device 100 and the electronic control system S are connected by a wired communication method or a wireless communication method. Examples of the wired communication method include Ethernet (registered trademark) and USB. Examples of the wireless communication method include the above-mentioned examples as well as Bluetooth (registered trademark) and infrared communication.
[0023] In Fig. 1(c), the software providing device 100 is a device "mounted" in a vehicle, which is a "mobile body", and the software providing device 100 and the software updating device 200 are connected by a wired communication method or a wireless communication method. Examples of the wired communication method include the above-mentioned wired communication method, as well as in-vehicle communication networks such as CAN (Controller Area Network) and LIN (Local Interconnect Network). Examples of the wireless communication method are as described above.
[0024] Where: "Mobile object" refers to an object that can move and can move at any speed. It also includes cases where the mobile object is stationary. For example, it includes, but is not limited to, automobiles, motorcycles, bicycles, pedestrians, ships, aircraft, and objects mounted on these. "Mounted" includes not only the case where the device is directly fixed to the moving body, but also the case where the device is not fixed to the moving body but moves with the moving body, such as the case where the device is carried by a person riding on the moving body, or the case where the device is mounted on cargo placed on the moving body.
[0025] (2) Configuration of Electronic Control System S Fig. 2 is a diagram showing an example of the configuration of an electronic control system S mounted on a vehicle. The electronic control system S is made up of a plurality of ECUs 20 and an in-vehicle network (NW1 to NW3) that connects these. Fig. 2 shows eight ECUs (ECU20a to ECU20h) as an example, but the electronic control system S is naturally made up of any number of ECUs. In the following explanation, when describing a single or a plurality of electronic control devices as a whole, they will be described as ECU20 or each ECU20, and when describing each individual electronic control device specifically, they will be described as ECU20a, ECU20b, ECU20c, ....
[0026] In the case of FIG. 2, the ECUs 20 are connected to each other via the in-vehicle network described above in the description of FIG. 1(c) or via other wired or wireless communication methods. In addition, a connection refers to a state in which data can be exchanged, and includes not only cases in which different hardware is connected via a wired or wireless communication network, but also cases in which virtual machines realized on the same hardware are virtually connected to each other.
[0027] The electronic control system S shown in FIG. 2 includes an integrated ECU 20a, an external communication ECU 20b, zone ECUs (20c, 20d), and individual ECUs (20e to 20h).
[0028] The integrated ECU 20a is an ECU that has a function of controlling the entire electronic control system S and also has a gateway function of mediating communication between the ECUs 20. The integrated ECU 20a is also called a gateway ECU (G-ECU) or a mobility computer (MC). The integrated ECU 20a may also be a relay device or a gateway device.
[0029] The external communication ECU 20b is an ECU having a communication module that communicates with a server device or an external connection device provided outside the vehicle. The communication method used by the external communication ECU 20b is the wireless communication method or the wired communication method described in the description of FIG. In order to realize a plurality of communication methods, a plurality of external communication ECUs 20b may be provided. Also, instead of providing the external communication ECU 20b, the integrated ECU 20a may include the function of the external communication ECU 20b.
[0030] The zone ECUs (20c, 20d) are ECUs with a gateway function appropriately arranged according to the location and function of the individual ECU. For example, the zone ECU 20c is an ECU having a gateway function to mediate communication between the individual ECUs 20e and 20f arranged at the front of the vehicle and other ECUs 20, and the zone ECU 20d is an ECU having a gateway function to mediate communication between the individual ECUs 20g and 20h arranged at the rear of the vehicle and other ECUs 20. The zone ECUs (20c, 20d) are sometimes called domain computers (DC). The individual ECUs 20e and 20f are connected to the zone ECU 20c via a network 2 (NW2), and the individual ECUs 20g and 20h are connected to the zone ECU 20d via a network 3 (NW3).
[0031] The individual ECUs (20e to 20h) can be configured with ECUs having any desired functions. For example, they can be drive system electronic control devices that control the engine, steering, brakes, etc., vehicle body electronic control devices that control meters, power windows, etc., information system electronic control devices such as navigation devices, or safety control system electronic control devices that perform control to prevent collisions with obstacles or pedestrians. Also, the ECUs may not be parallel to each other, but may be classified as master and slave.
[0032] Each ECU 20 may be a physically independent electronic control device, or a virtualized electronic control device realized using virtualization technology. When each ECU 20 is realized by different hardware, it is sufficient that they are connected via a wired or wireless communication method, and when multiple virtualized electronic control devices are realized on the same hardware, it is sufficient that the virtualized electronic control devices are virtually connected to each other.
[0033] The software providing device 100 in each embodiment only needs to have a function of providing software to another device, and may be either an internal or external device of the electronic control system S, as described in Fig. 1. The same is true in Fig. 2, where the software providing device 100 corresponds to a server device in Fig. 1(a), an externally connected device in Fig. 1(b), and, for example, an integrated ECU 20a of the electronic control system S in Fig. 1(c). Note that, in the case of Fig. 1(c), another ECU 20 may function as the software providing device 100.
[0034] The software update device 200 in each embodiment may be any ECU 20 constituting the electronic control system S as long as it is a device that receives software provided thereto. In the example shown in FIG. The software providing device 100 and the software updating device 200 of each embodiment will be described below in that order.
[0035] 2. Embodiment 1 (1) Overview of software update operation using differential data Before describing the configurations and operations of the software providing device 100 and the software updating device 200 of this embodiment, an overview of the software updating operation using differential data will be given. 3 and 4 are diagrams showing an update operation in which the software update device 200, having received the difference data, updates the old software stored in the flash memory with the new software.
[0036] In Fig. 3, software update device 200 stores old software in flash memory, and stores version information of the old software following the old software (abbreviated as old V information in the figure). In Fig. 3, the old software is stored across sector 0, sector 1, and part of sector 2 of the flash memory, and the version information of the old software is stored in the remainder of sector 2. The software updating device 200 receives difference data, which is the difference between the new software and the old software, from the software providing device 100 ([Reception S]). The difference data that is received is generated for each sector, and in FIG. 3, for example, difference information to be applied to sector 0 is received. There is no difference data to be applied to sectors 1 and 2. In other words, the new software does not update the old software in sectors 1 and 2, and the old software is used as is. Software updating device 200 uses the difference data to generate new software for sector 0 from the old software for sector 0 ([Generation S]). Strictly speaking, what is generated is a part of the new software, but in the following description, when a sector is specified and described as new software or old software, this refers to a part of the software. The software updating device 200 erases sector 0 ([Erase S]). Since flash memory allows erasure in sector units, erasure is performed for each sector, which is the smallest unit of erasure. Sectors 1 and 2 are not erased. Software updating device 200 writes the generated new software to sector 0 ([Write S]), completing the update from the old software to the new software.
[0037] In Fig. 3, the version information of the old software is not updated, but an example of updating the version information will be explained using Fig. 4. Below, the explanation will be given separately for the case where there is differential data applied to sector 2 and the case where there is no differential data applied. FIG. 4(a) shows the case where there is no differential data to be applied to sector 2. The software updating device 200 receives version information of the new software (abbreviated as new V information in the drawing) from the software providing device 100 ([Reception S]). The software updating device 200 temporarily saves the old software in sector 2 to a separately provided storage device ([Saving S]). The software updating device 200 erases sector 2 ([Erase S]). The software updating device 200 writes the saved version information of the old software and the new software to sector 2 ([Write S]).
[0038] FIG. 4(b) shows the case where there is differential data to be applied to sector 2. The software updating device 200 receives the difference data and the version information of the new software from the software providing device 100 ([Reception S]). The software updating device 200 generates new software for sector 2 from the old software for sector 2 using the difference data ([Generation S]). The software updating device 200 erases sector 2 ([Erase S]). The software updating device 200 writes the new software and version information of the new software to sector 2 ([Write S]).
[0039] 3 and 4, in a sector where both version information and software exist (hereinafter referred to as a coexisting sector), if there is differential data, the update operation is the same as in other sectors, but if there is no differential data, it is different from the update operation in other sectors. In other words, if there is no differential data in other sectors, the old software is used as the new software as is, so the sector is not erased. However, in a coexisting sector, it is necessary to update the version information to new version information even if there is no differential data, so after the old software is temporarily saved, the coexisting sector is erased and the saved version information of the old software and new software is written to the coexisting sector.
[0040] That is, it is necessary to change the update procedure depending on the presence or absence of differential data in the coexisting sector. However, when the software update device 200 determines the presence or absence of differential data in the coexisting sector, it is necessary to provide a program required for the determination operation in advance in a ROM or the like. However, when the software update device 200 is mounted on a vehicle with limited resources, it is desirable to reduce the ROM capacity and processing operation as much as possible. Therefore, in this embodiment, the software providing device 100 performs this determination and provides information indicating the determination result to the software updating device 200, which then uses this information to perform software updates. The configurations and operations of the software providing device 100 and the software updating device 200 will be described in detail below.
[0041] (2) Configuration of the Software Providing Device 100 5, an example of the configuration of the software providing device 100 will be described. The software providing device 100 includes a difference data acquiring unit 101, a difference application position information acquiring unit 102, an associated data acquiring unit 103, an associated data position information acquiring unit 104, a flag information generating unit 105, and a transmitting unit 106.
[0042] The difference data acquisition unit 101 "acquires" difference data which is the difference between the old software, which is the "software" currently being used in the software update device 200, and the new software, which is the "software" to be newly installed in the software update device 200 in place of the old software. For example, the difference data acquisition unit 101 generates difference data by calculating the difference between new software stored in a new software storage unit and old software stored in an old software storage unit of the software providing device 100. If the software providing device 100 does not have the new software and the old software, it may receive difference data obtained by another device. Where: "Software" includes not only programs but also data. The term "obtain" includes both the case of generating and obtaining by oneself, and the case of receiving and obtaining from another device.
[0043] The old software storage unit stores the old software and version information of the old software. The new software storage unit stores the new software and version information of the new software. The old software storage unit, the new software storage unit, and the flash memory information storage unit described below may be realized by separate recording devices or by the same recording device. Furthermore, it is preferable that the new software storage unit and the old software storage unit store the start address of the software, the end address of the software, the start address of the version information, and the end address of the version information. It is preferable that each address corresponds to an address in the flash memory of the software update device 200. If each address does not correspond to an address in the flash memory, the address can be converted.
[0044] The difference application position information acquisition 102 "acquires" difference application position information "indicating" a sector (corresponding to a "first sector") of the flash memory of the software updating device 200 to which the difference data acquired by the difference data acquisition unit 101 is applied. The size of the sector is, for example, 8 KB (kilobytes) or 64 KB. Here, "indicating" a sector includes both direct and indirect indication of the sector, such as a sector number, and a start address of the sector, a start address of the sector and its size, or a start address of the sector and its end address.
[0045] Fig. 6 is a diagram showing a memory map of a flash memory used in the software updating device 200. The flash memory information storage unit of the software providing device 100 stores the memory map of Fig. 6 as flash memory information. The memory map stores boundary addresses, which are the boundaries between sectors, and sector numbers. Instead of the boundary addresses and sector numbers, the highest boundary address, boundary address #0, the lowest boundary address, boundary address #n+1, and the sector size may be stored. From this information, the intermediate boundary address can be found.
[0046] Returning to FIG. 5, the difference application position information acquisition unit 102 compares, for example, the start address and end address of the difference data acquired by the difference data acquisition unit 101 with the boundary addresses of each sector of the flash memory read from the flash memory information stored in the flash memory information storage unit to determine which sector the difference data is applied to. For example, it determines two boundary addresses of the flash memory corresponding to the start address and end address of the difference data, and sets the sector number of the sector sandwiched between the corresponding two boundary addresses as the difference application position information. If there is no corresponding boundary address of the flash memory, it sets the two boundary addresses that constitute the smallest range among the ranges that include the start address and end address of the difference data as the corresponding boundary addresses. In either case, it may span multiple sectors. In addition, instead of the determined sector number, the boundary address of the sector may be used as the difference application position information. When the boundary address of the sector is used as the difference application position information, only the upper or lower boundary address may be used, or a set of the upper and lower boundary addresses may be used.
[0047] The related data acquisition unit 103 "acquires" related data that is data related to the new software, that is, in this embodiment, version information of the new software. Examples of version information include, but are not limited to, the version number of the new software, the date the new software was created, the date the new software is applied, the creator of the new software, and the change history of the software. Associated data other than version information includes various parameter information used in the new software, such as, but not limited to, update date and time, updater identifier, update device identifier, and update reason. From a different perspective, the related information may be either static information that is uniquely determined for the software, or dynamic information that is not uniquely determined for the software. Furthermore, the related information may be information that is separate from the software.
[0048] The associated data location information acquisition unit 104 "acquires" associated data location information that "indicates" the sector (corresponding to the "second sector") of the flash memory of the software updating device 200 in which the associated data acquired by the associated data acquisition unit 103 is stored. For example, the related data position information acquisition unit 104 acquires the start address and end address of the version information of the new software from the new software stored in the new software storage unit. Then, by comparing with the boundary addresses of each sector of the flash memory read from the flash memory information, it determines in which sector the version information of the new software is stored. For example, it determines between which two boundary addresses of the flash memory the start address and end address of the version information of the new software are located, and the sector number of the sector sandwiched between the corresponding two boundary addresses is taken as the related data position information. If the version information of the new software spans multiple sectors, the related data position information will be information indicating multiple sectors. Since the size of the associated data is smaller than the size of a normal sector, the associated data position information acquired by the associated data position information acquisition unit 104 corresponds to the above-mentioned coexisting sector.
[0049] Based on the difference application position information acquired by the difference application position information acquisition unit 102 and the related data position information acquired by the related data position information acquisition unit 104, the flag information generation unit 105 determines whether the sector indicated by the related data position information (corresponding to the "second sector") matches the sector to which the difference data is applied (corresponding to the "first sector"), and generates "flag information" indicating whether the difference data is applied to the second sector if they match, and whether the difference data is not applied to the second sector if they do not match. That is, as explained in FIG. 4, the flag information generation unit 105 determines whether or not differential data is applied to a coexisting sector (corresponding to a "second sector"), which is a sector in which both version information and software exist, and generates flag information. Here, the "flag information" is sufficient as long as it is information indicating whether or not the differential data is applied to the second sector, and the format of the information does not matter.
[0050] The transmission unit 106 transmits the difference data acquired by the difference data acquisition unit 101, the difference application position information acquired by the difference application position information acquisition unit 102, the associated data acquired by the associated data acquisition unit 103, and the flag information generated by the flag information generation unit 105 as difference update information to the software update device 200. The transmission unit 106 may transmit directly to the software update device 200, but typically the information is eventually transmitted to the software update device 200 via various relay devices and each ECU 20 constituting the electronic control system S. In this embodiment, the transmitting unit 106 does not transmit the related data position information acquired by the related data position information acquiring unit 104, because the software providing device 100 and the software updating device 200 share the information that the version information is stored in the last sector or the first sector. If the location where the version information is stored is not shared, it is desirable to include the related data position information in the difference update information and transmit it.
[0051] (3) Configuration of the Software Update Device 200 An example of the configuration of the software updating device 200 will be described with reference to Fig. 7. The software updating device 200 includes a receiving section 201, a software updating section 202, and a related information recording section 203.
[0052] The software update device 200 is a device "mounted" on a vehicle, which is a "mobile body," and in this embodiment, it is assumed to be, for example, the ECU 20e in FIG. The software update device 200 also has a flash memory that stores the old program, the new program, and the like. The flash memory is a non-volatile memory that can be erased in units of "sectors." The flash memory is preferably a NOR type flash memory that can read and write in units of bytes or words, can be erased in units of sectors, and can directly execute stored software. However, the flash memory may also be a NAND type flash memory that can read and write in units of pages and can be erased in units of blocks. Where: A "sector" may be any unit of data erasure in a flash memory, and may be called any name such as a block or a page.
[0053] The receiving unit 201 receives the difference update information from the software providing device 100. The receiving unit 201 may receive the difference update information directly from the software providing device 100. However, for example, in this embodiment, when the software updating device 200 is the individual ECU 20e as shown in Fig. 2, the receiving unit 201 receives the difference update information via the external communication ECU 20b, the integrated ECU 20a, and the zone ECU 20c.
[0054] The software update unit 202 uses the difference data and difference application position information included in the difference update information to update the old software in the sector of the flash memory indicated by the difference application position information (corresponding to the "first sector"). The update operation using the difference data and difference application position information is as described with reference to FIG.
[0055] The related information recording unit 203 uses the flag information included in the difference update information to write the version information of the new software (corresponding to "related data") to the second sector. If the difference update information includes related data position information, the version information of the new software is written to the sector (corresponding to "second sector") indicated by the related data position information. If the second sector is already known in the software update device 200, the related data position information is not necessary.
[0056] More specifically, the related information recording unit 203 refers to the flag information and writes the version information of the new software as follows. First, if the flag information indicates that the differential data is applied to the second sector, the version information of the new software is written to the second sector. In this case, the second sector is erased once, and then the version information of the new software is further written to the second sector, since the new software generated using the differential data has already been written to the second sector. On the other hand, when the flag information indicates that the differential data is not applied to the second sector, the old software written in the second sector is saved, the second sector is erased, and the version information of the saved old software and new software is written to the second sector. The operation of writing the version information of the new program is as explained with reference to FIG.
[0057] (4) Operation of the Software Providing Device 100 and the Software Updating Device 200 The operations of the software providing device 100 and the software updating device 200 will be described with reference to Figs. 8 to 11. The operations shown in Figs. 8 to 10 not only show a software providing method executed by the software providing device 100, but also show a processing procedure of a software providing program executable by the software updating device 100. The operations shown in Fig. 11 not only show a software updating method executed by the software updating device 200, but also show a processing procedure of a software updating program executable by the software updating device 200. The processes shown here are not limited to the order shown in Figs. 8 to 11. That is, the order may be changed as long as there is no constraint, such as a relationship in which a certain step utilizes the result of the previous step.
[0058] FIG. 8 shows the main routine of the software providing device 100. The difference data acquisition unit 101 of the software providing device 100 acquires difference data, which is the difference between new software and old software (S101). The difference application position information acquisition unit 102 acquires difference application position information indicating the first sector to which the difference data is applied (S102). The related data acquisition unit 103 acquires related data that is data related to the new software (S103). The associated data position information acquisition unit 104 acquires associated data position information indicating the second sector in which the associated data is stored (S104). A specific example of a method for acquiring the associated data position information will be described with reference to FIG. The flag information generating unit 105 generates flag information indicating whether or not the differential data is applied to the second sector based on the differential application position information acquired in S102 and the related data position information acquired in S104 (S105). A specific example of a method for generating flag information will be described with reference to FIG. The transmitting unit 106 transmits the difference data acquired in S101, the difference application position information acquired in S102, the related data acquired in S103, and the flag information generated in S105 as difference update information to the software updating device 200 (S106).
[0059] FIG. 9 shows a subroutine corresponding to S104 in FIG. As the conditions for counter N, a loop of an initial value (0), an end value (N), and an increment (1) is set (S111). It is determined whether the start address of the version information of the new software is within the range of boundary address #N or more and boundary address #N+1 or less (S112). If it is within the range (S112: Yes), sector N (corresponding to the "second sector") is set in the related data location information (S113), and the loop is repeated (S114). If it is outside the range (S112: No), the loop is repeated (S114). In FIG. 9, the determination is made based only on the start address of the version information of the new software, but it may also be determined whether the start address and end address are within a range equal to or greater than boundary address #N and equal to or less than boundary address #N+1. 9, only the range from boundary address #N to boundary address #N+1 is judged, but considering the possibility that the version information of the new software may span multiple sectors, the range from boundary address #N to boundary address #N+a may also be judged. a is an integer constant that is set appropriately according to the size of the version information of the new software. Furthermore, a may be set as a counter to set a loop.
[0060] FIG. 10 shows a subroutine corresponding to S105 in FIG. The flag information is set to an initial value of 0 (S121). As the conditions for counter i, a loop with an initial value of 0, an end value (the number of difference data), and an increment of 1 is set (S122). That is, a loop is set the number of times corresponding to the number of difference data. The difference application position information #i is compared with the related data position information (S122). That is, it is determined whether each of the difference application position information, which exists for the number of difference data, matches the related data position information. If they match (S122: Yes), the difference data is applied to the coexisting sector (corresponding to the "second sector") indicated by the related data position information, so the flag information indicating this is set to 1 (S123) and the loop is repeated (S125). If they do not match (S122: N), the loop is repeated (S125). By the above operation, flag 1 is set when differential data is applied to the coexisting sector, and flag 0 is set when differential data is not applied to the coexisting sector.
[0061] FIG. 11 shows the main routine of the software updating device 200. The receiving section 201 of the software updating device 200 receives the difference update information from the software providing device 100 (S201). As the conditions for the counter N, a loop of an initial value (0), an end value (N), and an increment (1) is set (S202). The software update unit 202 determines whether or not there is differential data in sector N (S203). If there is differential data in sector N (S203: Yes), new software is generated from the old software in sector N and the differential data (S204), sector N is erased (S205), the new software generated in S204 is written to sector N (S206), and the loop is repeated (S207). If there is no differential data in sector N (S203: No), no update is performed on sector N, and the loop is repeated (S207).
[0062] The related information recording unit 203 judges whether the flag information is 0 or 1 (S208). If the flag information is 0, i.e., if the differential data is not applied to the coexisting sector, the old software in the coexisting sector indicated by the related data position information is saved (S209), the coexisting sector is erased (S210), the saved old software is written to the coexisting sector (S211), and the version information of the new software is written to the coexisting sector (S212). If the flag information is 1, i.e., if the differential data is applied to the coexisting sector, the version information of the new software is written to the coexisting sector (S212).
[0063] (5) Summary As described above, according to the software providing device 100 of this embodiment, flag information is generated and transmitted to the software updating device 200, eliminating the need for the software updating device 200 to determine whether or not differential data is applied to coexisting sectors, thereby reducing the processing load on the software updating device 200. For example, since it is not necessary to store a program required for the determination in ROM, the ROM capacity can be reduced as much as possible, and the CPU resources required for the determination can be saved. Furthermore, according to the software providing device 100 of this embodiment, related data location information is further transmitted to the software updating device 200, so that even if the software updating device 200 does not know the location of the coexisting sector, it is possible to properly update the software in the coexisting sector and write version information.
[0064] 3. Summary The features of the software providing device and the software updating device in each embodiment of the present invention have been described above.
[0065] The terms used in each embodiment are merely examples and may be replaced with synonymous terms or terms having the same functions.
[0066] The block diagrams used to explain the embodiments classify and organize the configuration of the device by function. The blocks showing the respective functions are realized by any combination of hardware or software. In addition, since the block diagrams show the functions, they can also be understood as disclosures of a method invention and a program invention that realizes the method.
[0067] The order of the functional blocks that can be understood as the processes, flows, and methods described in each embodiment may be changed as long as there are no constraints such as a relationship in which one step utilizes the results of another step prior to it.
[0068] The terms first, second, through Nth (N is an integer) used in each embodiment and in the claims are used to distinguish two or more configurations or methods of the same type, and do not limit the order or superiority or inferiority.
[0069] Examples of the form of the device of the present invention are as follows. Examples of the component form include a semiconductor element, an electronic circuit, a module, and a microcomputer. Examples of semi-finished products include electronic control units (ECUs (Electric Control Units)) and system boards. Finished product forms include mobile phones, smartphones, tablets, personal computers (PCs), workstations, and servers. Other examples include devices with communication functions, such as video cameras, still cameras, and car navigation systems.
[0070] Additionally, necessary functions such as an antenna and a communication interface may be added to the device.
[0071] In addition, the present invention can be realized not only by dedicated hardware having the configuration and functions described in each embodiment, but also as a combination of a program for realizing the present invention recorded on a recording medium such as a memory or a hard disk, and general-purpose hardware having a dedicated or general-purpose CPU and memory capable of executing the program.
[0072] A program stored in a non-transient physical recording medium (for example, an external storage device (hard disk, USB memory, CD / BD, etc.) or an internal storage device (RAM, ROM, etc.)) of dedicated or general-purpose hardware can be provided to the dedicated or general-purpose hardware via a recording medium, or via a communication line from a server without using a recording medium. This makes it possible to always provide the latest functions through program upgrades. [Industrial Applicability]
[0073] Although the present disclosure has been described mainly as an on-board software update device mounted on an automobile, it can be applied to any moving object such as a motorcycle, a ship, a train, an airplane, etc. Furthermore, it is not limited to moving objects, but can be applied to any product that includes a microcomputer. [Explanation of symbols]
[0074] 100 Software providing device, 101 Difference data acquisition unit, 102 Difference application position information acquisition unit, 103 Related data acquisition unit, 104 Related data position information acquisition unit, 105 Flag information generation unit, 106 Transmission unit, 20 ECU, 200 Software update device, 201 Reception unit, 202 Software update unit, 203 Related information recording unit
Claims
1. A software providing device (100) that provides difference update information for old software stored in a flash memory that can be erased in sector units of a software updating device (200) mounted on a mobile object, comprising: A difference data acquisition unit (101) for acquiring difference data which is a difference between new software and the old software; a differential application position information acquisition unit (102) that acquires differential application position information indicating a first sector to which the differential data is applied; a related data acquisition unit (103) for acquiring related data that is data related to the new software; an associated data position information acquisition unit (104) for acquiring associated data position information indicating a second sector in which the associated data is stored; a flag information generating unit (105) that generates flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information; a transmission unit (106) that transmits the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information, A software providing device (100).
2. The transmission unit further includes the related data position information in the difference update information and transmits the information.
2. The software providing device according to claim 1.
3. the difference application position information is a start address and an end address of the first sector; 2. The software providing device according to claim 1.
4. The related data is version information of the new software.
2. The software providing device according to claim 1.
5. The flash memory is a NOR type.
2. The software providing device according to claim 1.
6. The software provision device is provided outside the mobile object.
2. The software providing device according to claim 1.
7. The software provision device is mounted on a mobile object.
2. The software providing device according to claim 1.
8. A software update device (200) mounted on a mobile object receives difference update information from a software providing device (100) and updates old software stored in a flash memory that can be erased on a sector-by-sector basis using the difference update information, The software providing device includes: A difference data acquisition unit (101) for acquiring difference data which is a difference between new software and the old software; a differential application position information acquisition unit (102) that acquires differential application position information indicating a first sector to which the differential data is applied; a related data acquisition unit (103) for acquiring related data that is data related to the new software; an associated data position information acquisition unit (104) for acquiring associated data position information indicating a second sector in which the associated data is stored; a flag information generating unit (105) that generates flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information; a transmission unit (106) that transmits the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information; The software update device includes: A receiving unit (201) for receiving the difference update information; a software update unit (202) that updates the old software of the first sector using the difference data and the difference application position information included in the difference update information; a related information recording unit (203) for writing the related data to the second sector by using the flag information included in the difference update information, The related information recording unit includes: if the flag information indicates that the differential data is applied to the second sector, writing the associated data to the second sector; if the flag information indicates that the differential data is not applied to the second sector, saving the old software written in the second sector, erasing the second sector, and writing the saved old software and the associated data to the second sector; A software update device (200).
9. The transmission unit of the software providing device further transmits the related data location information together with the difference update information; the related information recording unit of the software updating device further writes the related data to the second sector by using the related data position information; 9. The software updating device according to claim 8.
10. A software providing method executed by a software providing device (100) that provides difference update information for old software stored in a flash memory that can be erased in sector units of a software update device (200) mounted on a mobile object, comprising: Obtaining differential data which is the difference between the new software and the old software (S101); Obtaining differential application position information indicating a first sector to which the differential data is applied (S102); Acquire related data that is data related to the new software (S103); Acquire related data location information indicating a second sector in which the related data is stored (S104); generating flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information (S105); Transmitting the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information (S106); How the software is delivered.
11. A software provision program executable by a software provision device (100) that provides difference update information for old software stored in a flash memory that can be erased in sector units of a software update device (200) mounted on a mobile object, comprising: Obtaining differential data which is the difference between the new software and the old software (S101); Obtaining differential application position information indicating a first sector to which the differential data is applied (S102); Acquire related data that is data related to the new software (S103); Acquire related data location information indicating a second sector in which the related data is stored (S104); generating flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information (S105); Transmitting the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information (S106); Software provision program.
12. A software update method executed by a software update device (200) mounted on a mobile object, which receives difference update information from a software providing device (100) and updates old software stored in a flash memory that can be erased in sector units using the difference update information, comprising: The software providing device includes: A difference data acquisition unit (101) for acquiring difference data which is a difference between new software and the old software; a differential application position information acquisition unit (102) that acquires differential application position information indicating a first sector to which the differential data is applied; a related data acquisition unit (103) for acquiring related data that is data related to the new software; an associated data position information acquisition unit (104) for acquiring associated data position information indicating a second sector in which the associated data is stored; a flag information generating unit (105) that generates flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information; a transmission unit (106) that transmits the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information; The software update method includes: The difference update information is received (S201); updating the old software in the first sector using the difference data and the difference application position information included in the difference update information (S203 to S207); If the flag information indicates that the differential data is applied to the second sector, writing the associated data to the second sector (S208, S212); if the flag information indicates that the difference data is not applied to the second sector, the old software written in the second sector is saved, the second sector is erased, and the saved old software and the related data are written to the second sector (S208 to S212); How to update software.
13. A software update program executable by a software update device (200) mounted on a mobile object, which receives difference update information from a software providing device (100) and updates old software stored in a flash memory that can be erased in sector units using the difference update information, The software providing device includes: A difference data acquisition unit (101) for acquiring difference data which is a difference between new software and the old software; a differential application position information acquisition unit (102) that acquires differential application position information indicating a first sector to which the differential data is applied; a related data acquisition unit (103) for acquiring related data that is data related to the new software; an associated data position information acquisition unit (104) for acquiring associated data position information indicating a second sector in which the associated data is stored; a flag information generating unit (105) that generates flag information indicating whether the differential data is applied to the second sector based on the differential application position information and the related data position information; a transmission unit (106) that transmits the difference data, the difference application position information, the related data, and the flag information to the software update device as the difference update information; The software update program is The difference update information is received (S201); updating the old software in the first sector using the difference data and the difference application position information included in the difference update information (S203 to S207); If the flag information indicates that the differential data is applied to the second sector, writing the associated data to the second sector (S208, S212); if the flag information indicates that the difference data is not applied to the second sector, the old software written in the second sector is saved, the second sector is erased, and the saved old software and the related data are written to the second sector (S208 to S212); Software updates.
Citation Information
Patent Citations
JP191574A
Ski binding with key device for front and / or rear binding
JP1991000083A
