JP2020173597A - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP2020173597A
JP2020173597A JP2019074857A JP2019074857A JP2020173597A JP 2020173597 A JP2020173597 A JP 2020173597A JP 2019074857 A JP2019074857 A JP 2019074857A JP 2019074857 A JP2019074857 A JP 2019074857A JP 2020173597 A JP2020173597 A JP 2020173597A
Authority
JP
Japan
Prior art keywords
software
storage unit
update
control device
electronic control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2019074857A
Other languages
Japanese (ja)
Other versions
JP7302250B2 (en
Inventor
剛憲 藤田
Takenori Fujita
剛憲 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2019074857A priority Critical patent/JP7302250B2/en
Publication of JP2020173597A publication Critical patent/JP2020173597A/en
Application granted granted Critical
Publication of JP7302250B2 publication Critical patent/JP7302250B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

To provide an electronic control device capable of promptly completing a software update while avoiding an increase in relay control time.SOLUTION: An electronic control device 2 transfers update software stored in a second storing unit 12 to a first storing unit 11 to update the software stored in the first storing unit 11. When the software stored in the first storing unit 11 is to be updated, an inspecting unit 13 is configured to inspect whether or not the software to be launched is proper software simultaneously with the transferring process of the update software stored in the second storing unit 12 to the first storing unit 11.SELECTED DRAWING: Figure 1

Description

本開示は、電子制御装置に関する。 The present disclosure relates to an electronic control device.

制御装置による制御対象への電力供給が停止されることにより、制御対象が動作できない状態となった場合に、制御装置のソフトウェアを更新する技術が知られている(例えば、特許文献1参照。)。 There is known a technique for updating the software of the control device when the control target becomes inoperable due to the power supply to the control target by the control device being stopped (see, for example, Patent Document 1). ..

特許4809418号公報Japanese Patent No. 4809418

上記特許文献1に記載の技術においては、イグニッションスイッチがオフとされた場合にソフトウェアの更新が実行される。そのため、少なくともソフトウェアの更新が完了するまでは、例えばリレー制御によってメインリレーから電子制御装置への電力供給を継続する。しかし、ソフトウェアの規模が大きくなると、ソフトウェアの更新に要する時間が増大する。そのため、リレー制御時間が長くなり、バッテリーにかかる負荷が増大する。 In the technique described in Patent Document 1, software update is executed when the ignition switch is turned off. Therefore, at least until the software update is completed, the power supply from the main relay to the electronic control device is continued by, for example, relay control. However, as the scale of software increases, the time required to update the software increases. Therefore, the relay control time becomes long, and the load on the battery increases.

本開示の一局面は、リレー制御時間の増大を回避しつつソフトウェア更新を迅速に完了可能な電子制御装置を提供することにある。 One aspect of the present disclosure is to provide an electronic control device capable of quickly completing software updates while avoiding an increase in relay control time.

本開示の一局面における電子制御装置(2,22,52)は、第1記憶部(11)と、検査部(13,S301,S407,S421)と、処理部(10,S505,S513)と、判断部(13,S403)と、更新部(13,15,S405)と、を備える。第1記憶部は、ソフトウェアを格納する。検査部は、電子制御装置の起動時に、起動対象となるソフトウェアが適正なソフトウェアか否かを検査する。処理部は、検査部によって起動対象となるソフトウェアが適正なソフトウェアであるとの検査結果が得られた場合に、第1記憶部に格納されたソフトウェアに基づく処理を実行する。判断部は、電子制御装置の起動時に、第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断する。更新部は、判断部によって更新が必要と判断された場合に、第2記憶部(12,32,62)に格納された更新用ソフトウェアを第1記憶部へと転送して、第1記憶部に格納されたソフトウェアを更新する。検査部は、更新部によって第1記憶部に格納されたソフトウェアが更新される場合には、第2記憶部に格納された更新用ソフトウェアを第1記憶部へと転送する処理と並行して、起動対象となるソフトウェアが適正なソフトウェアか否かを検査するように構成されている。 The electronic control device (2, 22, 52) in one aspect of the present disclosure includes a first storage unit (11), an inspection unit (13, S301, S407, S421), and a processing unit (10, S505, S513). , A determination unit (13, S403) and an update unit (13, 15, S405) are provided. The first storage unit stores software. When the electronic control device is started, the inspection unit inspects whether the software to be started is appropriate software. When the inspection unit obtains an inspection result that the software to be activated is appropriate software, the processing unit executes processing based on the software stored in the first storage unit. When the electronic control device is activated, the determination unit determines whether or not the software stored in the first storage unit needs to be updated. When the determination unit determines that the update is necessary, the update unit transfers the update software stored in the second storage unit (12, 32, 62) to the first storage unit, and transfers the update software to the first storage unit. Update the software stored in. When the software stored in the first storage unit is updated by the update unit, the inspection unit transfers the update software stored in the second storage unit to the first storage unit in parallel with the process. It is configured to check whether the software to be started is proper software.

このように構成された電子制御装置によれば、電子制御装置の起動時に、第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断する。更新が必要と判断された場合には、第2記憶部に格納された更新用ソフトウェアを第1記憶部へと転送して、第1記憶部に格納されたソフトウェアを更新する。そのため、イグニッションスイッチがオフにされた後のリレー制御中に同等な転送が行われる場合に比べ、リレー制御期間を短縮でき、バッテリーにかかる負荷を低減することができる。 According to the electronic control device configured in this way, when the electronic control device is started, it is determined whether or not the software stored in the first storage unit needs to be updated. When it is determined that the update is necessary, the update software stored in the second storage unit is transferred to the first storage unit, and the software stored in the first storage unit is updated. Therefore, the relay control period can be shortened and the load on the battery can be reduced as compared with the case where the equivalent transfer is performed during the relay control after the ignition switch is turned off.

しかも、第2記憶部に格納された更新用ソフトウェアを第1記憶部へと転送する処理が実行される際、検査部は、更新部による転送処理と並行して、起動対象となるソフトウェアが適正なソフトウェアか否かを検査する。そのため、第2記憶部に格納された更新用ソフトウェアを第1記憶部へと転送する処理が実行された後に、改めて第1記憶部に格納されたソフトウェアを読み出してから、そのソフトウェアが適正なソフトウェアか否かを検査する場合に比べ、転送及び検査が並行して実行される分だけ転送及び検査を迅速に完了することができる。したがって、ソフトウェア更新の実行に起因して、電子制御装置の起動性能が低下するのを抑制することができる。 Moreover, when the process of transferring the update software stored in the second storage unit to the first storage unit is executed, the inspection unit appropriately selects the software to be started in parallel with the transfer process by the update unit. Check if the software is good. Therefore, after the process of transferring the update software stored in the second storage unit to the first storage unit is executed, the software stored in the first storage unit is read again, and then the software is appropriate software. Compared to the case of checking whether or not, the transfer and inspection can be completed more quickly as much as the transfer and inspection are performed in parallel. Therefore, it is possible to suppress the deterioration of the startup performance of the electronic control device due to the execution of the software update.

図1は第1実施形態の車両制御装置を含む車載ネットワークシステムの構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of an in-vehicle network system including the vehicle control device of the first embodiment. 図2は第2メモリに更新用ソフトウェアが格納される前の第1メモリ及び第2メモリの状態を説明するための説明図である。FIG. 2 is an explanatory diagram for explaining the states of the first memory and the second memory before the update software is stored in the second memory. 図3は第2メモリに更新用ソフトウェアが格納された直後の第1メモリ及び第2メモリの状態を説明するための説明図である。FIG. 3 is an explanatory diagram for explaining the states of the first memory and the second memory immediately after the update software is stored in the second memory. 図4は第2メモリから第1メモリへブートローダーが転送された直後の第1メモリ及び第2メモリの状態を説明するための説明図である。FIG. 4 is an explanatory diagram for explaining the states of the first memory and the second memory immediately after the boot loader is transferred from the second memory to the first memory. 図5は第2メモリから第1メモリへアプリ1が転送された直後の第1メモリ及び第2メモリの状態を説明するための説明図である。FIG. 5 is an explanatory diagram for explaining the states of the first memory and the second memory immediately after the application 1 is transferred from the second memory to the first memory. 図6は第2メモリから第1メモリへアプリNまでの転送が完了した後の第1メモリ及び第2メモリの状態を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining the states of the first memory and the second memory after the transfer from the second memory to the first memory to the application N is completed. 図7はCPUにおいて実行されるリレー制御中インストール処理のフローチャートである。FIG. 7 is a flowchart of the installation process during relay control executed by the CPU. 図8はCPUにおいて実行されるブートローダー更新処理のフローチャートである。FIG. 8 is a flowchart of the boot loader update process executed by the CPU. 図9はHSMにおいて実行されるセキュアブート処理のフローチャートである。FIG. 9 is a flowchart of the secure boot process executed in the HSM. 図10はHSMにおいて実行されるアプリn検証処理のフローチャートである。FIG. 10 is a flowchart of the application n verification process executed in the HSM. 図11はCPUにおいて実行されるソフト起動処理のフローチャートである。FIG. 11 is a flowchart of software startup processing executed by the CPU. 図12はリレー制御区間で転送を実行する場合のタイミングチャートである。FIG. 12 is a timing chart when transfer is executed in the relay control section. 図13はIG−ON後に転送を実行して、その後にセキュアブートを実行する場合のタイミングチャートである。FIG. 13 is a timing chart when transfer is executed after IG-ON and then secure boot is executed. 図14はIG−ON後に転送を実行し、転送と並行してセキュアブートを実行する場合のタイミングチャートである。FIG. 14 is a timing chart when the transfer is executed after the IG-ON and the secure boot is executed in parallel with the transfer. 図15は第2実施形態の車両制御装置を含む車載ネットワークシステムの構成を示すブロック図である。FIG. 15 is a block diagram showing a configuration of an in-vehicle network system including the vehicle control device of the second embodiment. 図16は第3実施形態の車両制御装置を含む車載ネットワークシステムの構成を示すブロック図である。FIG. 16 is a block diagram showing a configuration of an in-vehicle network system including the vehicle control device of the third embodiment.

次に、上述の電子制御装置について、例示的な実施形態を挙げて説明する。
(1)第1実施形態
[電子制御装置及び車載ネットワークシステムの構成]
図1に示すように、車載ネットワークシステム1は、ECU2、リプロマスターECU3、DCM5及びメインリレー6等を備える。ECUは、Electronic Control Unitの略称である。DCMは、Data Communication Moduleの略称である。ECU2は、グローバルバス7を介してリプロマスターECU3と通信可能に構成されている。ECU2は、メインリレー6経由で電力が供給されるように構成されている。なお、車載ネットワークシステム1には、ECU2以外にも複数のECUが含まれているが、図1においては図示を省略する。
Next, the above-mentioned electronic control device will be described with reference to exemplary embodiments.
(1) First Embodiment [Configuration of electronic control device and in-vehicle network system]
As shown in FIG. 1, the in-vehicle network system 1 includes an ECU 2, a repromaster ECU 3, a DCM 5, a main relay 6, and the like. ECU is an abbreviation for Electronic Control Unit. DCM is an abbreviation for Data Communication Module. The ECU 2 is configured to be able to communicate with the repromaster ECU 3 via the global bus 7. The ECU 2 is configured to supply electric power via the main relay 6. The in-vehicle network system 1 includes a plurality of ECUs in addition to the ECU 2, but the illustration is omitted in FIG.

リプロマスターECU3は、車載ネットワークシステム1に含まれるECU(例えばECU2。)のリプログラミング(すなわち、プログラムの更新。)を管理するECUである。リプロマスターECU3は、車外にある機器から更新用ソフトウェアが提供された場合に、その更新用ソフトウェアを車載ネットワークシステム1に含まれるECU(例えばECU2。)に対して提供する。本実施形態の場合、リプロマスターECU3は、ゲートウェイとしての機能を有するECUである。リプロマスターECU3は、車載ネットワークシステム1を構成する機器間及び車載ネットワークシステム1を構成する機器と車外にある機器との間で送受信されるデータを中継する。DCM5は、車外にある機器との間で通信を行うための無線通信装置である。 The repromaster ECU 3 is an ECU that manages reprogramming (that is, program update) of an ECU (for example, ECU 2) included in the in-vehicle network system 1. When the update software is provided from a device outside the vehicle, the repromaster ECU 3 provides the update software to an ECU (for example, ECU 2) included in the in-vehicle network system 1. In the case of this embodiment, the repromaster ECU 3 is an ECU having a function as a gateway. The repromaster ECU 3 relays data transmitted and received between the devices constituting the in-vehicle network system 1 and between the devices constituting the in-vehicle network system 1 and the devices outside the vehicle. The DCM5 is a wireless communication device for communicating with a device outside the vehicle.

メインリレー6は、イグニッションがオン(以下、IG−ONと称する。)とされた場合に、電源側からECU2等の車載機器へ電力を供給するように構成されている。イグニッションがオフ(以下、IG−OFFと称する。)とされた場合には、電源側からECU2等の車載機器へ電力を供給する状態を、所定時間だけ継続する制御(以下、リレー制御と称する。)を実行するように構成されている。 The main relay 6 is configured to supply electric power from the power supply side to an in-vehicle device such as the ECU 2 when the ignition is turned on (hereinafter referred to as IG-ON). When the ignition is turned off (hereinafter referred to as IG-OFF), the state of supplying electric power from the power supply side to the in-vehicle device such as the ECU 2 is continuously controlled for a predetermined time (hereinafter referred to as relay control). ) Is configured to execute.

ECU2は、CPU10、第1メモリ11、第2メモリ12、HSM13及びDMAC15を備える。CPUは、Central Processing Unitの略称である。HSMは、Hardware Security Moduleの略称である。DMACは、DMA Controllerの略称である。DMAは、Direct Memory Accessの略称である。 The ECU 2 includes a CPU 10, a first memory 11, a second memory 12, an HSM 13 and a DMAC 15. CPU is an abbreviation for Central Processing Unit. HSM is an abbreviation for Hardware Security Module. DMAC is an abbreviation for DMA Controller. DMA is an abbreviation for Direct Memory Access.

CPU10は、第1メモリ11に格納されたソフトウェアに基づいて様々な処理を実行するように構成されている。例えば、ECU2が制御対象を制御する際には、CPU10が第1メモリ11に格納された制御プログラムに基づいて、制御対象を制御するための処理を実行する。また、詳しくは後述するが、CPU10は、第1メモリ11に格納されたソフトウェアを更新する処理等も実行する。 The CPU 10 is configured to execute various processes based on the software stored in the first memory 11. For example, when the ECU 2 controls the control target, the CPU 10 executes a process for controlling the control target based on the control program stored in the first memory 11. Further, as will be described in detail later, the CPU 10 also executes a process of updating the software stored in the first memory 11.

第1メモリ11及び第2メモリ12は、不揮発性メモリ(例えば、フラッシュメモリ。)によって構成されている。第1メモリ11には、ECU2が作動する際にCPU10によって実行されるソフトウェアが格納される。第2メモリ12には、第1メモリ11に格納されたソフトウェアが更新される場合に、更新用ソフトウェアが格納される。 The first memory 11 and the second memory 12 are composed of a non-volatile memory (for example, a flash memory). The first memory 11 stores software executed by the CPU 10 when the ECU 2 operates. When the software stored in the first memory 11 is updated, the update software is stored in the second memory 12.

HSM13は、ECU2の起動時に、起動対象となるソフトウェア(すなわち、CPU10での実行対象となるソフトウェア。)が適正なソフトウェアか否かを検査する処理(以下、セキュアブートとも称する。)を実行する装置である。検査の結果、ソフトウェアが適正なソフトウェアであれば、HSM13はCPU10に対して起動可能を通知する。検査の結果、ソフトウェアが適正なソフトウェアでなければ、HSM13はCPU10に対して起動不可を通知する。例えば、ソフトウェアが改ざんされていることをHSM13が検出した場合、HSM13はCPU10に対して起動不可を通知する。CPU10は、HSM13からの通知に基づき、起動可能が通知された場合のみ、ソフトウェアを起動する。これにより、CPU10によって不正なソフトウェアが起動されるのを抑制することができる。 The HSM 13 is a device that executes a process (hereinafter, also referred to as secure boot) for inspecting whether the software to be started (that is, the software to be executed by the CPU 10) is appropriate software when the ECU 2 is started. Is. As a result of the inspection, if the software is appropriate software, the HSM 13 notifies the CPU 10 that it can be started. As a result of the inspection, if the software is not proper software, the HSM 13 notifies the CPU 10 that it cannot be started. For example, when the HSM 13 detects that the software has been tampered with, the HSM 13 notifies the CPU 10 that it cannot be started. The CPU 10 starts the software only when the startability is notified based on the notification from the HSM 13. As a result, it is possible to prevent the CPU 10 from starting malicious software.

DMAC15は、ECU2内のデバイス間で実行されるDMA転送を制御するように構成された装置である。詳しくは後述するが、本実施形態の場合は、第2メモリ12に格納された更新用ソフトウェアを第1メモリ11へと転送する際に、DMAC15の制御下でDMA転送が実行される。これにより、CPU10を介することなく第1メモリ11から第2メモリ12へデータを転送することができ、CPU10を介してデータを転送する場合に比べ、迅速にデータを転送することができる。また、DMAC15によってDMA転送を実行すれば、CPU10を介してデータを転送する場合に比べ、CPU10及びHSM13にかかる負荷を低減することができる。 The DMAC 15 is a device configured to control the DMA transfer performed between the devices in the ECU 2. Although details will be described later, in the case of the present embodiment, when the update software stored in the second memory 12 is transferred to the first memory 11, the DMA transfer is executed under the control of the DMAC 15. As a result, the data can be transferred from the first memory 11 to the second memory 12 without going through the CPU 10, and the data can be transferred more quickly than when the data is transferred via the CPU 10. Further, if the DMA transfer is executed by the DMAC 15, the load on the CPU 10 and the HSM 13 can be reduced as compared with the case where the data is transferred via the CPU 10.

[第1メモリ11及び第2メモリ12の状態遷移]
次に、第1メモリ11及び第2メモリ12の状態遷移について、図2から図6までの各図に基づいて説明する。本実施形態の場合、第1メモリ11及び第2メモリ12には、ブートローダー及びアプリ1からアプリNまでのN個のアプリが格納される。また、第1メモリ11及び第2メモリ12は、第1メモリ11及び第2メモリ12それぞれに格納されたソフトウェアの状態を示す状態情報を、ソフトウェアに対応付けて記憶するように構成されている。状態情報は、第1メモリ11と第2メモリ12のメモリ一貫性を維持するための情報である。本実施形態では、状態情報を更新するためのプロトコルとして、MSIプロトコルを採用している。MSIプロトコルでは、各ソフトウェアの状態として、更新状態M、共有状態S及び無効状態Iのいずれかが設定される。
[State transition of the first memory 11 and the second memory 12]
Next, the state transitions of the first memory 11 and the second memory 12 will be described with reference to the respective diagrams of FIGS. 2 to 6. In the case of the present embodiment, the boot loader and N applications from the application 1 to the application N are stored in the first memory 11 and the second memory 12. Further, the first memory 11 and the second memory 12 are configured to store state information indicating the state of the software stored in each of the first memory 11 and the second memory 12 in association with the software. The state information is information for maintaining the memory coherence of the first memory 11 and the second memory 12. In this embodiment, the MSI protocol is adopted as a protocol for updating the state information. In the MSI protocol, one of the update state M, the shared state S, and the invalid state I is set as the state of each software.

ソフトウェアの更新が不要な場合には、図2に示すように、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されている状態にある。なお、図2においては、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されていることを明示するため、各ソフトウェアのバージョン情報を併記してある。本実施形態においては、第1メモリ11と第2メモリ12の双方でバージョン情報が一致する場合には、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されていることになる。 When the software update is unnecessary, as shown in FIG. 2, the same software is stored in both the first memory 11 and the second memory 12. In addition, in FIG. 2, in order to clarify that the same software is stored in both the first memory 11 and the second memory 12, the version information of each software is also shown. In the present embodiment, when the version information matches in both the first memory 11 and the second memory 12, the same software is stored in both the first memory 11 and the second memory 12. ..

ただし、このようなバージョン情報は、本実施形態において、第1メモリ11と第2メモリ12に同一のソフトウェアが格納されているか否かを簡便に説明するために導入した概念にすぎない。すなわち、実装上は、第1メモリ11と第2メモリ12に同一のソフトウェアが格納されているか否かを、バージョン情報以外の情報で判断可能となるように構成してもよい。バージョン情報以外の情報としては、例えば、各ソフトウェアから生成されるハッシュ値又は各ソフトウェアの更新日時情報等であってもよい。 However, such version information is merely a concept introduced in the present embodiment in order to briefly explain whether or not the same software is stored in the first memory 11 and the second memory 12. That is, in terms of implementation, it may be configured so that whether or not the same software is stored in the first memory 11 and the second memory 12 can be determined by information other than the version information. The information other than the version information may be, for example, a hash value generated from each software or update date / time information of each software.

図2に示すように、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されている場合、第1メモリ11及び第2メモリ12それぞれに格納されたソフトウェアに対応する状態情報は、双方とも共有状態Sとなる。一方、ECU2は、車両の外部から車載ネットワークを経由して更新用ソフトウェアを受信することがある。ECU2が更新用ソフトウェアを受信した場合、図3に示すように、更新用ソフトウェアは第2メモリ12に格納される。 As shown in FIG. 2, when the same software is stored in both the first memory 11 and the second memory 12, the state information corresponding to the software stored in each of the first memory 11 and the second memory 12 is available. , Both are in the shared state S. On the other hand, the ECU 2 may receive the update software from the outside of the vehicle via the vehicle-mounted network. When the ECU 2 receives the update software, the update software is stored in the second memory 12 as shown in FIG.

この段階で、第1メモリ11と第2メモリ12との一貫性が失われるため、第2メモリ12において更新されたブロック(すなわち、更新用ソフトウェアが格納されたブロック。)の状態情報は更新状態Mに変更される。図3に示す例は、第2メモリ12において全てのソフトウェアが書き換えられて、全てのソフトウェアそれぞれに対応する状態情報が更新状態Mとなっている例である。なお、この時点では、第1メモリ11の書き換えは行われないため、第1メモリ11に格納されたソフトウェアに対応する状態情報は、全て共有状態Sのままとなっている。 At this stage, since the consistency between the first memory 11 and the second memory 12 is lost, the state information of the block updated in the second memory 12 (that is, the block in which the update software is stored) is in the updated state. It is changed to M. The example shown in FIG. 3 is an example in which all the software is rewritten in the second memory 12 and the state information corresponding to each of the software is in the update state M. At this point, since the first memory 11 is not rewritten, all the state information corresponding to the software stored in the first memory 11 remains in the shared state S.

次に、第2メモリ12に更新用ソフトウェアが格納されている状態において、IG−OFFとされると、CPU10及びHSM13において後述する処理が実行されて、第2メモリ12に格納された更新用のブートローダーが第1メモリ11へと転送される。この転送が完了すると、図4に示すように、第1メモリ11及び第2メモリ12それぞれに格納されたブートローダーが同一になり、第1メモリ11及び第2メモリ12のブートローダーに対応する状態情報は、共有状態Sに変更される。また、この段階で第2メモリ12のアプリ1からアプリNまでの各アプリに対応する状態情報は、無効状態Iに変更される。 Next, when the update software is stored in the second memory 12 and the IG-OFF is set, the CPU 10 and the HSM 13 execute the process described later, and the update software stored in the second memory 12 is used. The boot loader is transferred to the first memory 11. When this transfer is completed, as shown in FIG. 4, the boot loaders stored in the first memory 11 and the second memory 12 are the same, and the boot loaders corresponding to the first memory 11 and the second memory 12 are in the same state. The information is changed to the shared state S. Further, at this stage, the state information corresponding to each application from the application 1 to the application N of the second memory 12 is changed to the invalid state I.

次に、上記ブートローダーの転送が完了した状態において、IG−ONとされると、CPU10及びHSM13において後述する処理が実行されて、第2メモリ12に格納された更新用のアプリ1からアプリNが第1メモリ11へと転送される。アプリ1の転送が完了すると、図5に示すように、第1メモリ11及び第2メモリ12それぞれに格納されたアプリ1が同一になり、第1メモリ11及び第2メモリ12のアプリ1に対応する状態情報は、共有状態Sに変更される。その後、アプリ2以降も順に転送されて、図6に示すように、第1メモリ11及び第2メモリ12のアプリ2以降に対応する状態情報は、共有状態Sに変更される。 Next, when IG-ON is set in the state where the transfer of the boot loader is completed, the processing described later is executed in the CPU 10 and the HSM 13, and the update application 1 to the application N stored in the second memory 12 is executed. Is transferred to the first memory 11. When the transfer of the application 1 is completed, as shown in FIG. 5, the application 1 stored in each of the first memory 11 and the second memory 12 becomes the same, and corresponds to the application 1 of the first memory 11 and the second memory 12. The state information to be used is changed to the shared state S. After that, the application 2 and subsequent applications are also transferred in order, and as shown in FIG. 6, the state information corresponding to the application 2 and subsequent applications in the first memory 11 and the second memory 12 is changed to the shared state S.

このように、ECU2においては、上述のような状態情報に基づいて、第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断することができる。したがって、状態情報に基づいて古いソフトウェアと新しいソフトウェアの管理が可能になり、第1記憶部及び第2記憶部の一貫性を適切に保証することができる。 In this way, the ECU 2 can determine whether or not the software stored in the first storage unit needs to be updated based on the state information as described above. Therefore, old software and new software can be managed based on the state information, and the consistency of the first storage unit and the second storage unit can be appropriately guaranteed.

[CPU10及びHSM13において実行される処理]
次に、CPU10及びHSM13において実行される処理について、図7から図11までのフローチャートに基づいて説明する。
[Processes executed in CPU 10 and HSM 13]
Next, the processes executed by the CPU 10 and the HSM 13 will be described with reference to the flowcharts of FIGS. 7 to 11.

[IG−OFF時にCPU10において実行される処理]
図7に示すリレー制御中インストール処理は、車両においてIG−OFFとされたことを契機としてCPU10によって実行される。この処理を開始すると、S101において、CPU10は、第2メモリ12のブートローダーの状態を参照する。続いて、S103において、CPU10は、第2メモリ12のブートローダーの状態が更新状態Mか否かを判断する。第2メモリ12のブートローダーの状態が更新状態Mであった場合は、S103での判断結果がTRUEとなり、S105において、CPU10は、ブートローダー更新処理を実行する。
[Processing executed by CPU 10 when IG-OFF]
The installation process during relay control shown in FIG. 7 is executed by the CPU 10 when the IG-OFF is set in the vehicle. When this process is started, in S101, the CPU 10 refers to the state of the boot loader of the second memory 12. Subsequently, in S103, the CPU 10 determines whether or not the state of the boot loader of the second memory 12 is the update state M. When the state of the boot loader of the second memory 12 is the update state M, the determination result in S103 becomes TRUE, and in S105, the CPU 10 executes the boot loader update process.

S105で実行されるブートローダー更新処理は、詳しくは図8に示すような処理である。ブートローダー更新処理を開始すると、S201において、CPU10は、ブートローダーのDMA転送を開始する。具体的には、CPU10は、DMAC15に対してDMA転送の開始を指令し、その指令を受けたDMAC15がブートローダーを第2メモリ12から第1メモリ11へ転送する。CPU10は、S203において、DMA転送の完了を待つ。 The boot loader update process executed in S105 is a process as shown in FIG. 8 in detail. When the boot loader update process is started, in S201, the CPU 10 starts the DMA transfer of the boot loader. Specifically, the CPU 10 commands the DMAC 15 to start the DMA transfer, and the DMAC 15 that receives the command transfers the boot loader from the second memory 12 to the first memory 11. The CPU 10 waits for the completion of the DMA transfer in S203.

ブートローダーのDMA転送が完了したら、S205において、CPU10は、第1メモリ11のブートローダーに対応する状態情報を共有状態Sに変更する。S207において、CPU10は、第2メモリ12のブートローダーに対応する状態情報を共有状態Sに変更する。S207を終えたら図8に示す処理を終了する。図8に示す処理を終了したら、図7のS107へ進む。一方、S103において、第2メモリ12のブートローダーの状態が更新状態Mではなかった場合は、S103での判断結果がFALSEとなり、S107へ進む。 When the DMA transfer of the boot loader is completed, in S205, the CPU 10 changes the state information corresponding to the boot loader of the first memory 11 to the shared state S. In S207, the CPU 10 changes the state information corresponding to the boot loader of the second memory 12 to the shared state S. When S207 is finished, the process shown in FIG. 8 is finished. After completing the process shown in FIG. 8, the process proceeds to S107 in FIG. On the other hand, in S103, when the state of the boot loader of the second memory 12 is not the update state M, the determination result in S103 becomes FALSE, and the process proceeds to S107.

S103又はS105からS107へ進むと、CPU10は、変数nに初期値1を代入する。S109において、CPU10は、第2メモリ12のアプリnの状態を参照する。続いて、S111において、CPU10は、第2メモリ12のアプリnの状態が更新状態Mか否かを判断する。第2メモリ12のアプリnの状態が更新状態Mであった場合は、S111での判断結果がTRUEとなり、S113において、CPU10は、第1メモリ11のアプリnの状態を無効状態Iに変更する。S113を終えたらS115へ進む。一方、S111において、第2メモリ12のアプリnの状態が更新状態Mではなかった場合は、S111での判断結果がFALSEとなり、S115へ進む。 Proceeding from S103 or S105 to S107, the CPU 10 substitutes the initial value 1 for the variable n. In S109, the CPU 10 refers to the state of the application n of the second memory 12. Subsequently, in S111, the CPU 10 determines whether or not the state of the application n of the second memory 12 is the update state M. When the state of the application n of the second memory 12 is the update state M, the determination result in S111 becomes TRUE, and in S113, the CPU 10 changes the state of the application n of the first memory 11 to the invalid state I. .. After finishing S113, proceed to S115. On the other hand, in S111, when the state of the application n of the second memory 12 is not the update state M, the determination result in S111 becomes FALSE, and the process proceeds to S115.

S111又はS113からS115へ進むと、CPU10は、変数nに増分値1を加算する。S117において、CPU10は、変数nがアプリの数Nを超えるか否かを判断する。変数nがアプリの数N以下の場合は、S117での判断結果がFALSEとなり、S109へ戻る。これにより、変数nがアプリの数N以下である間は、S109からS117までが繰り返される。この繰り返し処理の中では、アプリ2以降が順に処理対象となる。アプリN+1が処理対象とされた際、S117での判断結果がTRUEとなり、図7に示す処理を終了する。 Proceeding from S111 or S113 to S115, the CPU 10 adds an increment value 1 to the variable n. In S117, the CPU 10 determines whether or not the variable n exceeds the number N of applications. When the variable n is the number N or less of the applications, the determination result in S117 becomes FALSE, and the process returns to S109. As a result, S109 to S117 are repeated while the variable n is equal to or less than the number N of applications. In this iterative process, application 2 and subsequent applications are sequentially processed. When the application N + 1 is targeted for processing, the determination result in S117 becomes TRUE, and the processing shown in FIG. 7 ends.

[IG−ON時にHSM13において実行される処理]
次に、図9に示すセキュアブート処理について説明する。セキュアブート処理は、車両においてIG−ONとされたことを契機としてHSM13によって実行される。この処理を開始すると、S301において、HSM13は、第1メモリ11のブートローダーを検証する。続いて、S303において、HSM13は、第1メモリ11のブートローダーについて、改ざん無しか否かを判断する。改ざん無しの場合は、S303での判断結果がTRUEとなり、S305において、HSM13は、ブートローダー起動可能をCPU10に通知する。
[Processing executed in HSM13 when IG-ON]
Next, the secure boot process shown in FIG. 9 will be described. The secure boot process is executed by the HSM 13 when the IG-ON is turned on in the vehicle. When this process is started, in S301, the HSM 13 verifies the boot loader of the first memory 11. Subsequently, in S303, the HSM 13 determines whether or not the boot loader of the first memory 11 has been tampered with. If there is no tampering, the determination result in S303 becomes TRUE, and in S305, the HSM 13 notifies the CPU 10 that the boot loader can be started.

続いて、S307において、HSM13は、変数nに初期値1を代入する。S309において、HSM13は、アプリnの検証処理を実行する。S309で実行されるアプリnの検証処理は、詳しくは図10に示すような処理である。アプリnの検証処理を開始すると、S401において、HSM13は、第1メモリ11のアプリnの状態を参照する。続いて、S403において、HSM13は、第1メモリ11のアプリnの状態が無効状態Iか否かを判断する。 Subsequently, in S307, the HSM 13 substitutes the initial value 1 for the variable n. In S309, the HSM 13 executes the verification process of the application n. The verification process of the application n executed in S309 is a process as shown in FIG. 10 in detail. When the verification process of the application n is started, in S401, the HSM 13 refers to the state of the application n of the first memory 11. Subsequently, in S403, the HSM 13 determines whether or not the state of the application n of the first memory 11 is the invalid state I.

第1メモリ11のアプリnの状態が無効状態Iであった場合は、S403での判断結果がTRUEとなり、S405において、HSM13は、アプリnのDMA転送を開始する。具体的には、HSM13は、DMAC15に対してDMA転送の開始を指令し、その指令を受けたDMAC15がアプリnを第2メモリ12から第1メモリ11へ転送する。DMA転送の実行中に、HSM13は、S407において、メモリバスをスヌープして転送中のアプリnを取得し、アプリnを検証する。HSM13は、S409において、DMA転送の完了を待つ。アプリnのDMA転送が完了したら、S411において、HSM13は、第1メモリ11のアプリnに対応する状態情報を共有状態Sに変更する。S413において、HSM13は、第2メモリ12のアプリnに対応する状態情報を共有状態Sに変更する。S413を終えたらS415へ進む。 When the state of the application n of the first memory 11 is the invalid state I, the determination result in S403 becomes TRUE, and in S405, the HSM 13 starts the DMA transfer of the application n. Specifically, the HSM 13 commands the DMAC 15 to start the DMA transfer, and the DMAC 15 that receives the command transfers the application n from the second memory 12 to the first memory 11. During the execution of the DMA transfer, the HSM 13 snoops the memory bus in S407 to acquire the application n being transferred, and verifies the application n. The HSM 13 waits for the completion of the DMA transfer in S409. When the DMA transfer of the application n is completed, in S411, the HSM 13 changes the state information corresponding to the application n of the first memory 11 to the shared state S. In S413, the HSM 13 changes the state information corresponding to the application n of the second memory 12 to the shared state S. After finishing S413, proceed to S415.

一方、S403において、第1メモリ11のアプリnの状態が無効状態Iではなかった場合は、S403での判断結果がFALSEとなり、HSM13は、S421において、第1メモリ11からアプリnを取得し、アプリnを検証する。すなわち、第1メモリ11のアプリnの状態が無効状態IであればアプリnがDMA転送されるので、S407では転送中のアプリnを取得するのに対し、第1メモリ11のアプリnの状態が無効状態IでなければアプリnがDMA転送されることはないので、S421では第1メモリ11からアプリnを読み出す。S421を終えたらS415へ進む。 On the other hand, in S403, when the state of the application n of the first memory 11 is not the invalid state I, the determination result in S403 is FALSE, and the HSM 13 acquires the application n from the first memory 11 in S421. Verify app n. That is, if the state of the application n of the first memory 11 is the invalid state I, the application n is transferred by DMA. Therefore, in S407, the application n being transferred is acquired, whereas the state of the application n of the first memory 11 is acquired. If is not in the invalid state I, the application n is not transferred by DMA, so that the application n is read from the first memory 11 in S421. After finishing S421, proceed to S415.

S413又はS421からS415へ進むと、HSM13は、改ざん無しか否かを判断する。改ざん無しの場合は、S415での判断結果がTRUEとなり、S417において、HSM13は、アプリn起動可能をCPU10に通知する。一方、改ざんありの場合は、S415での判断結果がFALSEとなり、S419において、HSM13は、アプリn起動不可をCPU10に通知する。S417又はS419を終えたら図10に示す処理を終了する。図10に示す処理を終了したら、図9のS311へ進む。 Proceeding from S413 or S421 to S415, the HSM 13 determines whether or not it has been tampered with. If there is no tampering, the determination result in S415 becomes TRUE, and in S417, the HSM 13 notifies the CPU 10 that the application n can be started. On the other hand, if there is tampering, the determination result in S415 becomes FALSE, and in S419, the HSM 13 notifies the CPU 10 that the application n cannot be started. When S417 or S419 is completed, the process shown in FIG. 10 is completed. After completing the process shown in FIG. 10, the process proceeds to S311 in FIG.

S311において、CPU10は、変数nに増分値1を加算する。S313において、CPU10は、変数nがアプリの数Nを超えるか否かを判断する。変数nがアプリの数N以下の場合は、S313での判断結果がFALSEとなり、S309へ戻る。これにより、変数nがアプリの数N以下である間は、S309からS313までが繰り返される。この繰り返し処理の中では、アプリ2以降が順に処理対象となる。アプリN+1が処理対象された際、S313での判断結果がTRUEとなり、図9に示す処理を終了する。一方、S303において、改ざんありの場合は、S303での判断結果がFALSEとなり、S315において、HSM13は、ブートローダー起動不可をCPU10に通知する。S315を終えたら、図9に示す処理を終了する。 In S311 the CPU 10 adds an increment value 1 to the variable n. In S313, the CPU 10 determines whether or not the variable n exceeds the number N of applications. When the variable n is the number N or less of the applications, the determination result in S313 becomes FALSE, and the process returns to S309. As a result, S309 to S313 are repeated while the variable n is equal to or less than the number N of the applications. In this iterative process, application 2 and subsequent applications are sequentially processed. When the application N + 1 is targeted for processing, the determination result in S313 becomes TRUE, and the processing shown in FIG. 9 ends. On the other hand, in S303, if there is tampering, the determination result in S303 becomes FALSE, and in S315, the HSM 13 notifies the CPU 10 that the boot loader cannot be started. When S315 is finished, the process shown in FIG. 9 is finished.

[IG−ON時にCPU10において実行される処理]
次に、図11に示すソフト起動処理について説明する。ソフト起動処理は、車両においてIG−ONとされたことを契機としてCPU10によって実行される。CPU10によってソフト起動処理が実行される際には、HSM13において図9及び図10に示すセキュアブート処理が実行される。これにより、HSM13及びCPU10が連携し、HSM13においてブートローダー及びアプリ1からアプリNまでの各アプリが適正なソフトウェアと判断された場合には、これらのソフトウェアがCPU10において順に起動されることになる。一方、HSM13においてブートローダー及びアプリ1からアプリNまでの各アプリのうち、いずれかが不正なソフトウェアと判断された場合、CPU10では、不正と判断されたソフトウェアの起動を中止し、ECU2が不正に作動するのを防止する。
[Processing executed by CPU 10 when IG-ON]
Next, the software startup process shown in FIG. 11 will be described. The software activation process is executed by the CPU 10 when the IG-ON is turned on in the vehicle. When the software startup process is executed by the CPU 10, the secure boot process shown in FIGS. 9 and 10 is executed in the HSM 13. As a result, when the HSM 13 and the CPU 10 cooperate with each other and the boot loader and each application from the application 1 to the application N are determined to be appropriate software in the HSM 13, these softwares are started in the CPU 10 in order. On the other hand, when any one of the boot loader and each application from application 1 to application N is determined to be malicious software in HSM 13, the CPU 10 stops starting the software determined to be invalid, and the ECU 2 illegally Prevent it from working.

図11に示す処理を開始すると、S501において、CPU10は、ブートローダー起動可否の通知を待つ。S503において、CPU10は、HSM13からの通知に基づき、ブートローダーの起動が可能か否かを判断する。HSM13において上述のS305が実行された場合、HSM13からCPU10へはブートローダー起動可能が通知される。この場合、S503ではTRUEと判断されてS505へ進む。一方、HSM13において上述のS315が実行された場合、HSM13からCPU10へはブートローダー起動不可が通知される。この場合、S503ではFALSEと判断されて図11に示す処理をエラー終了する。なお、エラー終了の場合は、ECU2が正常に機能しない状態となるので、その情報をダイアグ情報等として記録する等、エラー発生時に対応する処理が実行されればよい。 When the process shown in FIG. 11 is started, in S501, the CPU 10 waits for the notification of whether or not the boot loader can be started. In S503, the CPU 10 determines whether or not the boot loader can be started based on the notification from the HSM 13. When the above-mentioned S305 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that the boot loader can be started. In this case, S503 determines that it is TRUE and proceeds to S505. On the other hand, when the above-mentioned S315 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that the boot loader cannot be started. In this case, S503 determines that it is FALSE and ends the process shown in FIG. 11 with an error. If the error ends, the ECU 2 will not function normally. Therefore, it is sufficient to execute the corresponding process when an error occurs, such as recording the information as diagnostic information or the like.

S505へ進んだ場合、CPU10は、ブートローダーを実行する。続いて、S507において、CPU10は、変数nに初期値1を代入する。S509において、CPU10は、アプリn起動可否の通知を待つ。S511において、CPU10は、HSM13からの通知に基づき、アプリnの起動が可能か否かを判断する。HSM13において上述のS417が実行された場合、HSM13からCPU10へはアプリn起動可能が通知される。この場合、S511ではTRUEと判断されてS513へ進む。一方、HSM13において上述のS419が実行された場合、HSM13からCPU10へはアプリn起動不可が通知される。この場合、S511ではFALSEと判断されて図11に示す処理をエラー終了する。なお、エラー終了の場合は、S503でエラー終了へ進む場合と同様な処理が実行されればよい。 When proceeding to S505, the CPU 10 executes the boot loader. Subsequently, in S507, the CPU 10 substitutes the initial value 1 for the variable n. In S509, the CPU 10 waits for the notification of whether or not the application n can be started. In S511, the CPU 10 determines whether or not the application n can be started based on the notification from the HSM 13. When the above-mentioned S417 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that the application n can be started. In this case, S511 determines that it is TRUE and proceeds to S513. On the other hand, when the above-mentioned S419 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that the application n cannot be started. In this case, S511 determines that it is FALSE and ends the process shown in FIG. 11 with an error. In the case of error termination, the same processing as in the case of proceeding to error termination in S503 may be executed.

S513へ進んだ場合、CPU10は、アプリnを実行する。続いて、S515において、CPU10は、変数nに増分値1を加算する。S517において、CPU10は、変数nがアプリの数Nを超えるか否かを判断する。変数nがアプリの数N以下の場合は、S517での判断結果がFALSEとなり、S509へ戻る。これにより、変数nがアプリの数N以下である間は、S509からS517までが繰り返される。この繰り返し処理の中では、アプリ2以降が順に処理対象となり、S511での判断結果がTRUEとなれば、アプリ2以降が順に起動される。また、S511での判断結果がFALSEとなれば、その時点で図10に示す処理がエラー終了となる。繰り返し処理において、アプリN+1が処理対象とされた際には、S517での判断結果がTRUEとなり、図11に示す処理を正常終了する。 When proceeding to S513, the CPU 10 executes the application n. Subsequently, in S515, the CPU 10 adds an increment value 1 to the variable n. In S517, the CPU 10 determines whether or not the variable n exceeds the number N of applications. When the variable n is the number N or less of the applications, the determination result in S517 becomes FALSE, and the process returns to S509. As a result, S509 to S517 are repeated as long as the variable n is equal to or less than the number N of the applications. In this iterative process, application 2 and subsequent applications are sequentially processed, and if the determination result in S511 is TRUE, application 2 and subsequent applications are started in order. If the determination result in S511 is FALSE, the process shown in FIG. 10 ends with an error at that time. In the iterative process, when the application N + 1 is targeted for processing, the determination result in S517 becomes TRUE, and the process shown in FIG. 11 ends normally.

[リレー制御時間及び起動性能の対比]
次に、ECU2において上述の処理を実行する場合と、他の処理を実行する場合とでリレー制御時間及び起動性能にどのような差異が生じるのかを、図12から図14に示すタイミングチャートに基づいて説明する。
[Comparison of relay control time and start-up performance]
Next, based on the timing charts shown in FIGS. 12 to 14, what kind of difference occurs in the relay control time and the start-up performance between the case where the above processing is executed in the ECU 2 and the case where the other processing is executed. I will explain.

図12に示す例は、IG−OFF後のリレー制御区間でブートローダーからアプリNまでのDMA転送を実行し、IG−ON後にブートローダーからアプリNまでを起動する例である。この例の場合、IG−OFFとされた後も、メインリレー6によってECU2への電力供給が継続され、その間にブートローダーからアプリNまでのソフトウェアが第2メモリ12から第1メモリ11へDMA転送される。アプリNの転送が終了したらリレー制御を終了する。その後、IG−ONとされた際には、第1メモリ11に格納されたソフトウェアがブートローダーからアプリNに至る順序で読み出される。HSM13によるセキュアブート処理の中で起動可能と判断されたソフトウェアは、順次CPU10において起動される。 The example shown in FIG. 12 is an example in which DMA transfer from the boot loader to the application N is executed in the relay control section after the IG-OFF, and the boot loader to the application N is started after the IG-ON. In the case of this example, even after the IG-OFF is turned off, the power supply to the ECU 2 is continued by the main relay 6, and the software from the boot loader to the application N is DMA-transferred from the second memory 12 to the first memory 11 during that time. Will be done. When the transfer of the application N is completed, the relay control is terminated. After that, when IG-ON is set, the software stored in the first memory 11 is read out in the order from the boot loader to the application N. The software determined to be bootable in the secure boot process by the HSM 13 is sequentially started in the CPU 10.

一方、図13に示す例は、IG−OFF後のリレー制御区間でブートローダーだけをDMA転送し、IG−ON後にブートローダーの起動、アプリ1からアプリNまでのDMA転送、及びアプリ1からアプリNまでの起動を順に実行する例である。この例の場合も、IG−OFFとされた後、メインリレー6によってECU2への電力供給が継続される。ただし、図12に示す例とは異なり、リレー制御中にはブートローダーだけが第2メモリ12から第1メモリ11へDMA転送される。したがって、図12に示す例よりもリレー制御を迅速に終了することができる。よって、バッテリーにかかる負荷を抑制する観点からは、図12に示す例よりも図13に示す例の方が好適である。 On the other hand, in the example shown in FIG. 13, only the boot loader is DMA-transferred in the relay control section after the IG-OFF, the boot loader is started after the IG-ON, the DMA transfer from the application 1 to the application N, and the application 1 to the application. This is an example of executing startups up to N in order. Also in this example, after the IG-OFF is turned off, the power supply to the ECU 2 is continued by the main relay 6. However, unlike the example shown in FIG. 12, only the boot loader is DMA-transferred from the second memory 12 to the first memory 11 during the relay control. Therefore, the relay control can be terminated more quickly than in the example shown in FIG. Therefore, from the viewpoint of suppressing the load applied to the battery, the example shown in FIG. 13 is more preferable than the example shown in FIG.

しかし、図13に示す例は、IG−ON後にアプリ1からアプリNまでのDMA転送を実行するため、IG−ONからアプリ1の起動開始までの時間に着目した場合、図12に示す例に比べ、アプリ1の起動開始タイミングが遅くなる。この点は、更新対象となるアプリの数が少ない場合や、各アプリのデータ量が小さい場合であれば問題ないが、更新対象となるアプリの数が多い場合や、各アプリのデータ量が大きい場合には、ECU2の起動に要する時間が増大することになる。 However, in the example shown in FIG. 13, since the DMA transfer from the application 1 to the application N is executed after the IG-ON, when focusing on the time from the IG-ON to the start of the activation of the application 1, the example shown in FIG. 12 is used. In comparison, the start timing of application 1 is delayed. This point is not a problem if the number of apps to be updated is small or the amount of data of each app is small, but if the number of apps to be updated is large or the amount of data of each app is large. In that case, the time required to start the ECU 2 will increase.

これに対し、図14に示す例は、上述の処理を実行する場合の例である。この例の場合、IG−OFF後のリレー制御区間でブートローダーだけをDMA転送する。この点は、図13に示す例と同様である。一方、IG−ON後には、ブートローダーの起動、及びアプリ1からアプリNまでのDMA転送を順に実行するが、各アプリのDMA転送中に、DMA転送と並行して各アプリに対してHSM13によるセキュアブート処理を実行し、セキュアブート処理済みの各アプリの起動を順に実行する。これにより、HSM13は、転送後の各アプリを第1メモリ11から読み出さなくても、転送中の各アプリを取得して、アプリの改ざんやデータ化け等を検査することができる。したがって、図13に示す例に比べ、HSM13によるセキュアブート処理を迅速に実行できるので、その分だけCPU10による各アプリの起動も迅速に開始でき、ECU2の起動に要する時間を、図13に示す例よりも短縮することができる。つまり、上述の処理を実行することにより、リレー制御時間の増大を図13に示す例と同程度まで回避し、かつソフトウェア更新を図13に示す例よりも迅速に完了させることができる。 On the other hand, the example shown in FIG. 14 is an example in which the above-mentioned processing is executed. In the case of this example, only the boot loader is DMA-transferred in the relay control section after IG-OFF. This point is the same as the example shown in FIG. On the other hand, after IG-ON, the boot loader is started and the DMA transfer from the application 1 to the application N is executed in order. During the DMA transfer of each application, the HSM 13 is used for each application in parallel with the DMA transfer. Execute secure boot processing, and execute each application that has undergone secure boot processing in order. As a result, the HSM 13 can acquire each application being transferred and inspect the application for falsification, data garbled, etc. without reading each application after transfer from the first memory 11. Therefore, as compared with the example shown in FIG. 13, the secure boot process by the HSM 13 can be executed more quickly, so that the startup of each application by the CPU 10 can be started more quickly, and the time required to start the ECU 2 is shown in the example shown in FIG. Can be shortened. That is, by executing the above-mentioned processing, the increase in the relay control time can be avoided to the same extent as in the example shown in FIG. 13, and the software update can be completed more quickly than in the example shown in FIG.

なお、IG−ONのタイミングでソフトウェアを更新するか、IG−OFFのタイミングでソフトウェアを更新するかは、択一的に選定する必要はなく、ソフトウェアの規模や役割に応じて、より好適なタイミングを選定すればよい。ただし、IG−ONのタイミングでソフトウェアを更新する場合は、規格等で規定された所定の時間以内に更新を済ませる必要がある。この点、上述の処理によれば、IG−ON後の処理時間を削減し得るので、図13に示すような手法ではIG−ON後の更新が困難であったソフトウェアについても、図14に示すような手法によってIG−ON後の更新が可能となる場合がある。よって、ソフトウェアの更新タイミングについて自由度が高くなる。また、IG−ON後の更新が増えれば、その分だけIG−OFF後の更新時間を削減できるので、バッテリーにかかる負荷を軽減できる。 It is not necessary to selectively select whether to update the software at the timing of IG-ON or the timing of IG-OFF, and it is more suitable timing according to the scale and role of the software. Should be selected. However, when updating the software at the timing of IG-ON, it is necessary to complete the update within a predetermined time specified by the standard or the like. In this regard, according to the above processing, the processing time after IG-ON can be reduced. Therefore, the software which was difficult to update after IG-ON by the method shown in FIG. 13 is also shown in FIG. It may be possible to update after IG-ON by such a method. Therefore, the degree of freedom regarding the software update timing is increased. Further, if the number of updates after IG-ON increases, the update time after IG-OFF can be reduced by that amount, so that the load on the battery can be reduced.

(2)第2実施形態
次に、第2実施形態について説明する。なお、第2実施形態以降の各実施形態は、第1実施形態で例示した構成の一部を変更した実施形態である。よって、第1実施形態との相違点を中心に詳述し、第1実施形態と同様な部分に関しては、その詳細な説明を省略する。
(2) Second Embodiment Next, the second embodiment will be described. In addition, each embodiment after the second embodiment is an embodiment in which a part of the configuration illustrated in the first embodiment is changed. Therefore, the differences from the first embodiment will be mainly described in detail, and the detailed description of the same parts as those in the first embodiment will be omitted.

図15に示すように、車載ネットワークシステム21は、ECU22、リプロマスターECU23、DCM5及びメインリレー6等を備える。第1実施形態においてはECU2に第2メモリ12が設けられていたが、第2実施形態においては、リプロマスターECU23に第2メモリ32が設けられている。この点で、第2実施形態は第1実施形態とは相違する。また、第2実施形態においては、IG−OFFとされた場合に、電源側からメインリレー6経由でECU22及びリプロマスターECU23の双方へ電力供給を継続可能となるように構成されている。 As shown in FIG. 15, the in-vehicle network system 21 includes an ECU 22, a repromaster ECU 23, a DCM5, a main relay 6, and the like. In the first embodiment, the ECU 2 is provided with the second memory 12, but in the second embodiment, the repromaster ECU 23 is provided with the second memory 32. In this respect, the second embodiment is different from the first embodiment. Further, in the second embodiment, when IG-OFF is set, power can be continuously supplied from the power supply side to both the ECU 22 and the repromaster ECU 23 via the main relay 6.

このように構成された車載ネットワークシステム21の場合、ECU22とリプロマスターECU23は、グローバルバス7経由で相互にデータ通信を実行することができる。したがって、第2メモリ32に格納された更新用ソフトウェアを、グローバルバス7経由でリプロマスターECU23からECU22へと送信し、ECU22において受信した更新用ソフトウェアを第1メモリ11へ格納することができる。したがって、更新用ソフトウェアを第2メモリ32から第1メモリ11へ転送するための具体的な構成が、第1実施形態とは相違するが、それ以外の点については、ECU22において第1実施形態と同様な処理を実行することにより、リレー制御時間の増大を回避しつつソフトウェア更新を迅速に完了させることができる。 In the case of the in-vehicle network system 21 configured in this way, the ECU 22 and the repromaster ECU 23 can mutually execute data communication via the global bus 7. Therefore, the update software stored in the second memory 32 can be transmitted from the repromaster ECU 23 to the ECU 22 via the global bus 7, and the update software received in the ECU 22 can be stored in the first memory 11. Therefore, the specific configuration for transferring the update software from the second memory 32 to the first memory 11 is different from that of the first embodiment, but other than that, the ECU 22 is different from the first embodiment. By executing the same process, the software update can be completed quickly while avoiding an increase in the relay control time.

なお、第2実施形態においても、第1メモリ11及び第2メモリ32は、それぞれに格納されたソフトウェアの状態を示す状態情報を、ソフトウェアに対応付けて記憶するように構成されていればよい。これにより、第1メモリ11に格納されたソフトウェアについて、状態情報に基づいて古いソフトウェアと新しいソフトウェアの管理が可能になり、第1メモリ11及び第2メモリ32の一貫性を適切に保証することができる。 Also in the second embodiment, the first memory 11 and the second memory 32 may be configured to store the state information indicating the state of the software stored in each of the first memory 11 and the second memory 32 in association with the software. As a result, regarding the software stored in the first memory 11, old software and new software can be managed based on the state information, and the consistency of the first memory 11 and the second memory 32 can be appropriately guaranteed. it can.

また、ソフトウェアの更新が必要な場合、HSM13は、第1メモリ11へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、ソフトウェアの更新が不要な場合、HSM13は、第1メモリ11に格納されたソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査すればよい。これにより、ソフトウェアの更新が必要な場合には、第1メモリ11への転送が完了する前にHSM13による検査を実施できるので、ECU22の起動性能が低下するのを抑制できる。 When the software needs to be updated, the HSM 13 inspects the update software transferred to the first memory 11 to see if the software is appropriate, and when the software update is unnecessary. , HSM 13 may inspect whether or not the software stored in the first memory 11 is appropriate as an inspection target. As a result, when the software needs to be updated, the inspection by the HSM 13 can be performed before the transfer to the first memory 11 is completed, so that it is possible to suppress the deterioration of the starting performance of the ECU 22.

(3)第3実施形態
次に、第3実施形態について説明する。
図16に示すように、車載ネットワークシステム51は、第1のECU52、第2のECU53、リプロマスターECU2、DCM5及びメインリレー6等を備える。第1実施形態においてはECU2に第1メモリ11及び第2メモリ12が設けられていたが、第3実施形態においては、第1のECU52に第1メモリ11が設けられ、第2のECU53に第2メモリ62が設けられている。この点で、第3実施形態は第1実施形態とは相違する。また、第3実施形態においては、IG−OFFとされた場合に、電源側からメインリレー6経由で第1のECU52及び第2のECU53の双方へ電力供給を継続可能となるように構成されている。さらに、第1のECU52と第2のECU53は、ローカルバス58経由で相互にデータ通信を実行できるように構成されている。
(3) Third Embodiment Next, the third embodiment will be described.
As shown in FIG. 16, the in-vehicle network system 51 includes a first ECU 52, a second ECU 53, a repromaster ECU 2, a DCM5, a main relay 6, and the like. In the first embodiment, the ECU 2 is provided with the first memory 11 and the second memory 12, but in the third embodiment, the first ECU 52 is provided with the first memory 11 and the second ECU 53 is provided with the first memory 11. Two memories 62 are provided. In this respect, the third embodiment is different from the first embodiment. Further, in the third embodiment, when IG-OFF is set, power can be continuously supplied from the power supply side to both the first ECU 52 and the second ECU 53 via the main relay 6. There is. Further, the first ECU 52 and the second ECU 53 are configured to be able to execute data communication with each other via the local bus 58.

このように構成された車載ネットワークシステム51の場合、第2メモリ62に格納された更新用ソフトウェアを、ローカルバス58経由で第2のECU53から第1のECU52へと送信し、第1のECU52において受信した更新用ソフトウェアを第1メモリ11へ格納することができる。したがって、更新用ソフトウェアを第2メモリから第1メモリ11へ転送するための具体的な構成が、第1実施形態とは相違するが、それ以外の点については、第1のECU52において第1実施形態と同様な処理を実行することにより、リレー制御時間の増大を回避しつつソフトウェア更新を迅速に完了させることができる。 In the case of the in-vehicle network system 51 configured in this way, the update software stored in the second memory 62 is transmitted from the second ECU 53 to the first ECU 52 via the local bus 58, and the first ECU 52 The received update software can be stored in the first memory 11. Therefore, the specific configuration for transferring the update software from the second memory to the first memory 11 is different from that of the first embodiment, but other than that, the first implementation is performed in the first ECU 52. By executing the same process as the mode, the software update can be completed quickly while avoiding an increase in the relay control time.

なお、第3実施形態においても、第1メモリ11及び第2メモリ62は、それぞれに格納されたソフトウェアの状態を示す状態情報を、ソフトウェアに対応付けて記憶するように構成されていればよい。これにより、第1メモリ11に格納されたソフトウェアについて、状態情報に基づいて古いソフトウェアと新しいソフトウェアの管理が可能になり、第1メモリ11及び第2メモリ62の一貫性を適切に保証することができる。 Also in the third embodiment, the first memory 11 and the second memory 62 may be configured to store the state information indicating the state of the software stored in each of the first memory 11 and the second memory 62 in association with the software. As a result, regarding the software stored in the first memory 11, old software and new software can be managed based on the state information, and the consistency of the first memory 11 and the second memory 62 can be appropriately guaranteed. it can.

また、ソフトウェアの更新が必要な場合、HSM13は、第1メモリ11へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、ソフトウェアの更新が不要な場合、HSM13は、第1メモリ11に格納されたソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査すればよい。これにより、ソフトウェアの更新が必要な場合には、第1メモリ11への転送が完了する前にHSM13による検査を実施できるので、第1のECU52の起動性能が低下するのを抑制できる。 When the software needs to be updated, the HSM 13 inspects the update software transferred to the first memory 11 to see if the software is appropriate, and when the software update is unnecessary. , HSM 13 may inspect whether or not the software stored in the first memory 11 is appropriate as an inspection target. As a result, when the software needs to be updated, the inspection by the HSM 13 can be performed before the transfer to the first memory 11 is completed, so that it is possible to suppress the deterioration of the starting performance of the first ECU 52.

(4)他の実施形態
以上、電子制御装置について、例示的な実施形態を挙げて説明したが、上述の実施形態は本開示の一態様として例示されるものにすぎない。すなわち、本開示は、上述の例示的な実施形態に限定されるものではなく、本開示の技術的思想を逸脱しない範囲内において、様々な形態で実施することができる。
(4) Other Embodiments Although the electronic control device has been described above with reference to exemplary embodiments, the above-described embodiment is merely exemplified as one aspect of the present disclosure. That is, the present disclosure is not limited to the above-described exemplary embodiments, and can be implemented in various forms without departing from the technical ideas of the present disclosure.

例えば、上記実施形態では、第2メモリ12,32,62が配置される場所について、3通りの例を示したが、上述の例に限らず、車載ネットワークシステム内において、第2メモリから第1メモリ11へソフトウェアの転送が可能な場所であれば、第2メモリはどこに配置されていてもよい。 For example, in the above embodiment, three examples are shown for the locations where the second memories 12, 32, and 62 are arranged, but the present invention is not limited to the above examples, and the second memory to the first in the in-vehicle network system. The second memory may be arranged anywhere as long as the software can be transferred to the memory 11.

また、第1実施形態では、第1メモリ11から第2メモリ12へDMA転送を行う例を示したが、DMA転送を行うか否かは任意である。また、第2実施形態及び第3実施形態では言及しなかったが、第2実施形態及び第3実施形態においてECU22,52が、ECU22,52の内部でDMA転送を行うか否かも任意である。 Further, in the first embodiment, an example in which DMA transfer is performed from the first memory 11 to the second memory 12 is shown, but whether or not the DMA transfer is performed is arbitrary. Further, although not mentioned in the second embodiment and the third embodiment, whether or not the ECUs 22 and 52 perform DMA transfer inside the ECUs 22 and 52 in the second embodiment and the third embodiment is also arbitrary.

本開示に記載のECU2,22,52及びその手法は、コンピュータプログラムにより具体化された1つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリを構成することによって提供された専用コンピュータにより、実現されてもよい。あるいは、本開示に記載のECU2,22,52及びその手法は、1つ以上の専用ハードウェア論理回路によってプロセッサを構成することによって提供された専用コンピュータにより、実現されてもよい。若しくは、本開示に記載のECU2,22,52及びその手法は、1つ乃至は複数の機能を実行するようにプログラムされたプロセッサ及びメモリと1つ以上のハードウェア論理回路によって構成されたプロセッサとの組み合わせにより構成された1つ以上の専用コンピュータにより、実現されてもよい。また、コンピュータプログラムは、コンピュータにより実行されるインストラクションとして、コンピュータ読み取り可能な非遷移有形記録媒体に記憶されてもよい。ECU2,22,52に含まれる各部の機能を実現する手法には、必ずしもソフトウェアが含まれている必要はなく、その全部の機能が、1つあるいは複数のハードウェアを用いて実現されてもよい。 The ECUs 2, 22, 52 and methods thereof described in the present disclosure are dedicated computers provided by configuring a processor and memory programmed to perform one or more functions embodied by a computer program. May be realized by. Alternatively, the ECUs 2, 22, 52 and methods thereof described in the present disclosure may be realized by a dedicated computer provided by configuring the processor with one or more dedicated hardware logic circuits. Alternatively, the ECUs 2, 22, 52 and methods thereof described in the present disclosure include a processor and memory programmed to perform one or more functions and a processor composed of one or more hardware logic circuits. It may be realized by one or more dedicated computers configured by the combination of. The computer program may also be stored on a computer-readable non-transitional tangible recording medium as an instruction executed by the computer. The method for realizing the functions of the respective parts included in the ECUs 2, 22 and 52 does not necessarily include software, and all the functions may be realized by using one or a plurality of hardware. ..

以上の他、上記各実施形態における1つの構成要素によって実現していた機能を、複数の構成要素によって実現するように構成してもよい。また、複数の構成要素によって実現していた機能を1つの構成要素によって実現するように構成してもよい。また、上記各実施形態の構成の一部を省略してもよい。また、上記各実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加、置換等してもよい。 In addition to the above, the function realized by one component in each of the above embodiments may be configured to be realized by a plurality of components. Further, the function realized by a plurality of components may be configured to be realized by one component. Further, a part of the configuration of each of the above embodiments may be omitted. In addition, at least a part of the configuration of each of the above embodiments may be added or replaced with respect to the configuration of the other embodiment.

また、上述した電子制御装置の他、当該電子制御装置を構成要素とする車載ネットワークシステム、当該電子制御装置としてコンピュータを機能させるためのプログラム、このプログラムを記録した非遷移有形記録媒体など、種々の形態で本開示を実現することもできる。 In addition to the electronic control device described above, there are various types such as an in-vehicle network system having the electronic control device as a component, a program for operating a computer as the electronic control device, and a non-transitional tangible recording medium on which this program is recorded. The present disclosure can also be realized in the form.

なお、上述した各実施形態において、ECU2,22,52は本開示でいう電子制御装置に相当する。第1メモリ11は本開示でいう第1記憶部に相当する。第2メモリ12,32,62は本開示でいう第2記憶部に相当する。S301,S407及びS421を実行するHSM13は、本開示でいう検査部に相当する。S505及びS513を実行するCPU10は、本開示でいう処理部に相当する。S403を実行するHSM13は、本開示でいう判断部に相当する。S405を実行するHSM13及びDMA転送を実行するDMAC15は、本開示でいう更新部に相当する。 In each of the above-described embodiments, the ECUs 2, 22, and 52 correspond to the electronic control devices referred to in the present disclosure. The first memory 11 corresponds to the first storage unit referred to in the present disclosure. The second memories 12, 32, and 62 correspond to the second storage unit referred to in the present disclosure. The HSM 13 that executes S301, S407, and S421 corresponds to the inspection unit referred to in the present disclosure. The CPU 10 that executes S505 and S513 corresponds to the processing unit referred to in the present disclosure. The HSM 13 that executes S403 corresponds to the determination unit referred to in the present disclosure. The HSM 13 that executes S405 and the DMAC 15 that executes DMA transfer correspond to the update unit referred to in the present disclosure.

(5)補足
なお、以上説明した例示的な実施形態から明らかなように、本開示の電子制御装置は、更に以下に挙げるような構成を備えていてもよい。
(5) Supplement As is clear from the exemplary embodiments described above, the electronic control device of the present disclosure may further include the following configurations.

(A)例えば、第2記憶部は、電子制御装置の内部に設けられていてもよい。この場合、必要な構成全てが電子制御装置の内部に配置される。したがって、例えばリレー制御が必要となる場合においては、一部の構成が電子制御装置の外部に配置される場合に比べ、リレー制御が必要となる装置の数を削減し、バッテリーにかかる負荷を軽減することができる。 (A) For example, the second storage unit may be provided inside the electronic control device. In this case, all necessary configurations are arranged inside the electronic control device. Therefore, for example, when relay control is required, the number of devices that require relay control is reduced and the load on the battery is reduced as compared with the case where a part of the configuration is arranged outside the electronic control device. can do.

(B)例えば、第1記憶部及び第2記憶部は、それぞれに格納されたソフトウェアの状態を示す状態情報を、ソフトウェアに対応付けて記憶するように構成されてもよい。判断部は、状態情報に基づいて、第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断するように構成されていてもよい。この場合、状態情報に基づいて古いソフトウェアと新しいソフトウェアの管理が可能になり、第1記憶部及び第2記憶部の一貫性を適切に保証することができる。 (B) For example, the first storage unit and the second storage unit may be configured to store state information indicating the state of the software stored in each unit in association with the software. The determination unit may be configured to determine whether or not the software stored in the first storage unit needs to be updated based on the state information. In this case, old software and new software can be managed based on the state information, and the consistency of the first storage unit and the second storage unit can be appropriately guaranteed.

(C)例えば、検査部は、判断部によって更新が必要と判断された場合には、更新部によって第1記憶部へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、判断部によって更新が不要と判断された場合には、第1記憶部に格納されたソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査するように構成されていてもよい。この場合、更新部による転送が完了する前に検査部による検査を実施できるので、電子制御装置の起動性能が低下するのを抑制できる。 (C) For example, when the judgment unit determines that the update is necessary, the inspection unit inspects the update software transferred to the first storage unit by the update unit, and is the software appropriate? It is configured to inspect whether or not the software is appropriate, and if the judgment unit determines that the update is unnecessary, the software stored in the first storage unit is targeted for inspection. You may be. In this case, since the inspection unit can perform the inspection before the transfer by the update unit is completed, it is possible to suppress the deterioration of the activation performance of the electronic control device.

(D)例えば、更新部は、第2記憶部に格納された更新用ソフトウェアを、DMA転送方式で第1記憶部へと転送するように構成されていてもよい。この場合、例えば、処理部がCPUによって構成され、検査部がHSMによって構成されている場合には、CPUやHSMにかかる負荷を軽減することができる。また、DMA転送によってデータ伝送路の使用効率が上がるため、DMA転送以外の方式でデータを転送する場合に比べ処理の高速化を図ることができる。 (D) For example, the update unit may be configured to transfer the update software stored in the second storage unit to the first storage unit by a DMA transfer method. In this case, for example, when the processing unit is composed of the CPU and the inspection unit is composed of the HSM, the load on the CPU and the HSM can be reduced. Further, since the utilization efficiency of the data transmission line is improved by the DMA transfer, the processing speed can be increased as compared with the case where the data is transferred by a method other than the DMA transfer.

(E)例えば、検査部は、DMA転送方式での転送に用いられるデータ伝送路をスヌープして、第1記憶部へと転送される更新用ソフトウェアを取得するように構成されていてもよい。この場合、DMA転送による転送対象を第2記憶部から読み出せば、検査部による検査を実施することができるので、検査対象を第1記憶部から読み出す必要がなくなり、その分だけ処理を高速化することができる。 (E) For example, the inspection unit may be configured to snoop the data transmission line used for the transfer in the DMA transfer method to acquire the update software to be transferred to the first storage unit. In this case, if the transfer target by DMA transfer is read from the second storage unit, the inspection unit can perform the inspection. Therefore, it is not necessary to read the inspection target from the first storage unit, and the processing speed is increased accordingly. can do.

(F)例えば、第2記憶部は、通信路を介して電子制御装置と通信可能に構成される他の電子装置に設けられてもよい。更新部は、第2記憶部に格納された更新用ソフトウェアを他の電子装置から取得して、当該ソフトウェアを第1記憶部へと転送するように構成されていてもよい。この場合、個々の電子制御装置に第2記憶部を設けなくても、複数の電子制御装置で1つの第2記憶部を共用することで、電子制御装置の構成を簡素化し、電子制御装置のコストアップを抑制することができる。 (F) For example, the second storage unit may be provided in another electronic device configured to be able to communicate with the electronic control device via a communication path. The update unit may be configured to acquire the update software stored in the second storage unit from another electronic device and transfer the software to the first storage unit. In this case, even if the second storage unit is not provided in each electronic control device, the configuration of the electronic control device can be simplified by sharing one second storage unit among the plurality of electronic control devices, and the electronic control device can be used. Cost increase can be suppressed.

1,21,51…車載ネットワークシステム、2,22,52,53…ECU、3,23…リプロマスターECU、5…DCM、6…メインリレー、7…グローバルバス、58…ローカルバス、10…CPU、11…第1メモリ、12,32,62…第2メモリ、15…DMAC。 1,21,51 ... In-vehicle network system, 2,22,52,53 ... ECU, 3,23 ... Repromaster ECU, 5 ... DCM, 6 ... Main relay, 7 ... Global bus, 58 ... Local bus, 10 ... CPU , 11 ... 1st memory, 12, 32, 62 ... 2nd memory, 15 ... DMAC.

Claims (9)

電子制御装置(2,22,52)であって、
ソフトウェアを格納する第1記憶部(11)と、
前記電子制御装置の起動時に、起動対象となるソフトウェアが適正なソフトウェアか否かを検査する検査部(13,S301,S407,S421)と、
前記検査部によって前記起動対象となるソフトウェアが適正なソフトウェアであるとの検査結果が得られた場合に、前記第1記憶部に格納されたソフトウェアに基づく処理を実行する処理部(10,S505,S513)と、
前記電子制御装置の起動時に、前記第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断する判断部(13,S403)と、
前記判断部によって前記更新が必要と判断された場合に、第2記憶部(12,32,62)に格納された更新用ソフトウェアを前記第1記憶部へと転送して、前記第1記憶部に格納されたソフトウェアを更新する更新部(13,15,S405)と、
を備え、
前記検査部は、前記更新部によって前記第1記憶部に格納されたソフトウェアが更新される場合には、前記第2記憶部に格納された更新用ソフトウェアを前記第1記憶部へと転送する処理と並行して、前記起動対象となるソフトウェアが適正なソフトウェアか否かを検査するように構成されている
電子制御装置。
Electronic control device (2, 22, 52)
The first storage unit (11) for storing software and
When the electronic control device is started, the inspection unit (13, S301, S407, S421) that inspects whether the software to be started is appropriate software, and
When the inspection unit obtains an inspection result that the software to be activated is appropriate software, the processing unit (10, S505,) that executes processing based on the software stored in the first storage unit. S513) and
When the electronic control device is activated, a determination unit (13, S403) for determining whether or not the software stored in the first storage unit needs to be updated, and
When the determination unit determines that the update is necessary, the update software stored in the second storage unit (12, 32, 62) is transferred to the first storage unit, and the first storage unit is used. Update unit (13, 15, S405) that updates the software stored in
With
When the software stored in the first storage unit is updated by the update unit, the inspection unit transfers the update software stored in the second storage unit to the first storage unit. In parallel with this, an electronic control device configured to inspect whether the software to be activated is appropriate software.
請求項1に記載の電子制御装置であって、
前記第2記憶部(12)は、前記電子制御装置の内部に設けられている
電子制御装置。
The electronic control device according to claim 1.
The second storage unit (12) is an electronic control device provided inside the electronic control device.
請求項2に記載の電子制御装置であって、
前記第1記憶部及び前記第2記憶部は、それぞれに格納されたソフトウェアの状態を示す状態情報を、前記ソフトウェアに対応付けて記憶するように構成され、
前記判断部は、前記状態情報に基づいて、前記第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断するように構成されている
電子制御装置。
The electronic control device according to claim 2.
The first storage unit and the second storage unit are configured to store state information indicating the state of the software stored in each of the first storage unit and the second storage unit in association with the software.
The determination unit is an electronic control device configured to determine whether or not the software stored in the first storage unit needs to be updated based on the state information.
請求項3に記載の電子制御装置であって、
前記検査部は、前記判断部によって前記更新が必要と判断された場合には、前記更新部によって前記第1記憶部へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、前記判断部によって前記更新が不要と判断された場合には、前記第1記憶部に格納された前記ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査するように構成されている
電子制御装置。
The electronic control device according to claim 3.
When the determination unit determines that the update is necessary, the inspection unit inspects the update software transferred to the first storage unit by the update unit, and whether the software is appropriate software. It is inspected whether or not the software is necessary, and when the determination unit determines that the update is unnecessary, the software stored in the first storage unit is inspected and whether or not the software is appropriate is inspected. An electronic control device that is configured to.
請求項4に記載の電子制御装置であって、
前記更新部は、前記第2記憶部に格納された更新用ソフトウェアを、DMA転送方式で前記第1記憶部へと転送するように構成されている
電子制御装置。
The electronic control device according to claim 4.
The update unit is an electronic control device configured to transfer the update software stored in the second storage unit to the first storage unit by a DMA transfer method.
請求項5に記載の電子制御装置であって、
前記検査部は、前記DMA転送方式での転送に用いられるデータ伝送路をスヌープして、前記第1記憶部へと転送される更新用ソフトウェアを取得するように構成されている
電子制御装置。
The electronic control device according to claim 5.
The inspection unit is an electronic control device configured to snoop a data transmission line used for transfer in the DMA transfer method and acquire update software to be transferred to the first storage unit.
請求項1に記載の電子制御装置であって、
前記第2記憶部(32,62)は、通信路を介して前記電子制御装置と通信可能に構成される他の電子装置(23,53)に設けられ、
前記更新部は、前記第2記憶部に格納された更新用ソフトウェアを前記他の電子装置から取得して、当該ソフトウェアを前記第1記憶部へと転送するように構成されている
電子制御装置。
The electronic control device according to claim 1.
The second storage unit (32, 62) is provided in another electronic device (23, 53) configured to be communicable with the electronic control device via a communication path.
The update unit is an electronic control device configured to acquire update software stored in the second storage unit from the other electronic device and transfer the software to the first storage unit.
請求項7に記載の電子制御装置であって、
前記第1記憶部及び前記第2記憶部は、それぞれに格納されたソフトウェアの状態を示す状態情報を、前記ソフトウェアに対応付けて記憶するように構成され、
前記判断部は、前記状態情報に基づいて、前記第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断するように構成されている
電子制御装置。
The electronic control device according to claim 7.
The first storage unit and the second storage unit are configured to store state information indicating the state of the software stored in each of the first storage unit and the second storage unit in association with the software.
The determination unit is an electronic control device configured to determine whether or not the software stored in the first storage unit needs to be updated based on the state information.
請求項8に記載の電子制御装置であって、
前記検査部は、前記判断部によって前記更新が必要と判断された場合には、前記更新部によって前記第1記憶部へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、前記判断部によって前記更新が不要と判断された場合には、前記第1記憶部に格納された前記ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査するように構成されている
電子制御装置。
The electronic control device according to claim 8.
When the determination unit determines that the update is necessary, the inspection unit inspects the update software transferred to the first storage unit by the update unit, and whether the software is appropriate software. It is inspected whether or not the software is necessary, and when the determination unit determines that the update is unnecessary, the software stored in the first storage unit is inspected and whether or not the software is appropriate is inspected. An electronic control device that is configured to.
JP2019074857A 2019-04-10 2019-04-10 electronic controller Active JP7302250B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019074857A JP7302250B2 (en) 2019-04-10 2019-04-10 electronic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019074857A JP7302250B2 (en) 2019-04-10 2019-04-10 electronic controller

Publications (2)

Publication Number Publication Date
JP2020173597A true JP2020173597A (en) 2020-10-22
JP7302250B2 JP7302250B2 (en) 2023-07-04

Family

ID=72831356

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019074857A Active JP7302250B2 (en) 2019-04-10 2019-04-10 electronic controller

Country Status (1)

Country Link
JP (1) JP7302250B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7472844B2 (en) 2021-04-14 2024-04-23 株式会社デンソー Electronic Control Unit

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249320A1 (en) * 2008-04-01 2009-10-01 Mstar Semiconductor, Inc. Display Control Device Capable of Automatically Updating Firmware and Method Thereof
JP2014232437A (en) * 2013-05-29 2014-12-11 株式会社デンソー Electronic controller and memory rewrite method
WO2017046981A1 (en) * 2015-09-14 2017-03-23 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Gateway device, firmware update method, and control program
JP2018190223A (en) * 2017-05-09 2018-11-29 株式会社オートネットワーク技術研究所 On-vehicle relay device, control program, and memory sharing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249320A1 (en) * 2008-04-01 2009-10-01 Mstar Semiconductor, Inc. Display Control Device Capable of Automatically Updating Firmware and Method Thereof
JP2014232437A (en) * 2013-05-29 2014-12-11 株式会社デンソー Electronic controller and memory rewrite method
WO2017046981A1 (en) * 2015-09-14 2017-03-23 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Gateway device, firmware update method, and control program
JP2018190223A (en) * 2017-05-09 2018-11-29 株式会社オートネットワーク技術研究所 On-vehicle relay device, control program, and memory sharing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7472844B2 (en) 2021-04-14 2024-04-23 株式会社デンソー Electronic Control Unit

Also Published As

Publication number Publication date
JP7302250B2 (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN109478155B (en) Vehicle-mounted updating device, vehicle-mounted updating system and updating method of communication device
US11354114B2 (en) Updating system, electronic control unit, updating management device, and updating management method
US20180341476A1 (en) Software updating device, software updating system, and software updating method
EP2770432B1 (en) Electronic control device for automobile and data communication method
EP3920020A1 (en) Electronic control device and program update method
JP2019128946A (en) Method for updating firmware and electronic device using the same
US8407507B2 (en) Power management circuit, power management method and power management program for controlling power supplied to functional blocks in integrated circuits
CN105468390B (en) BOOT online upgrading device and method
JP7302250B2 (en) electronic controller
CN113626059B (en) System upgrade method, camera and computer readable storage medium
JP2018160207A (en) On-vehicle controller and program update software
WO2012132692A1 (en) Parallel processing system and parallel processing system operation method
CN111026417A (en) Embedded equipment upgrading method and embedded equipment
JP7216559B2 (en) How to use electronic controllers and non-volatile memory
JP5945044B2 (en) Electronic control device for automobile, writing system for electronic control device for automobile, and writing method of control program for vehicle control
JP6302004B2 (en) Writing program
JP2018160208A (en) On-vehicle controller and program update software
US11768669B2 (en) Installing application program code on a vehicle control system
JP2022187646A (en) Ota master, system, method, program, and vehicle
JP6445646B2 (en) Electronic control unit for automobile
JP2020021506A (en) Electronic controller and session establishing program
CN106484494B (en) Method and apparatus for updating virtual machine running under hypervisor
US20220405083A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle
JP6762411B2 (en) Electronic control unit for automobiles
JP6998434B2 (en) Electronic control device for automobiles

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230209

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230523

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230605

R151 Written notification of patent or utility model registration

Ref document number: 7302250

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151