Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7302250B2 - electronic controller - Google Patents
[go: Go Back, main page]

JP7302250B2 - electronic controller - Google Patents

electronic controller Download PDF

Info

Publication number
JP7302250B2
JP7302250B2 JP2019074857A JP2019074857A JP7302250B2 JP 7302250 B2 JP7302250 B2 JP 7302250B2 JP 2019074857 A JP2019074857 A JP 2019074857A JP 2019074857 A JP2019074857 A JP 2019074857A JP 7302250 B2 JP7302250 B2 JP 7302250B2
Authority
JP
Japan
Prior art keywords
software
unit
storage unit
update
memory
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.)
Active
Application number
JP2019074857A
Other languages
Japanese (ja)
Other versions
JP2020173597A (en
Inventor
剛憲 藤田
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)

Description

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

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

特許4809418号公報Japanese Patent No. 4809418

上記特許文献1に記載の技術においては、イグニッションスイッチがオフとされた場合にソフトウェアの更新が実行される。そのため、少なくともソフトウェアの更新が完了するまでは、例えばリレー制御によってメインリレーから電子制御装置への電力供給を継続する。しかし、ソフトウェアの規模が大きくなると、ソフトウェアの更新に要する時間が増大する。そのため、リレー制御時間が長くなり、バッテリーにかかる負荷が増大する。 In the technique described in Patent Document 1, software is updated when the ignition switch is turned off. Therefore, at least until the update of the software is completed, power supply from the main relay to the electronic control unit is continued by relay control, for example. However, as the scale of software increases, the time required to update the software increases. Therefore, the relay control time becomes longer 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 update 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記憶部へと転送する処理と並行して、起動対象となるソフトウェアが適正なソフトウェアか否かを検査するように構成されている。 An electronic control unit (2, 22, 52) in one aspect of the present disclosure includes a first storage unit (11), an inspection unit (13, S301, S407, S421), a processing unit (10, S505, S513), , a determination unit (13, S403) and an update unit (13, 15, S405). The first storage stores software. The inspection unit inspects whether the software to be activated is proper software when the electronic control unit is activated. The processing unit executes processing based on the software stored in the first storage unit when the inspection unit obtains an inspection result that the software to be activated is proper software. The determination unit determines whether or not the software stored in the first storage unit needs to be updated when the electronic control unit is started. The update unit transfers the update software stored in the second storage unit (12, 32, 62) to the first storage unit when the determination unit determines that the update is necessary. 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 updating software stored in the second storage unit to the first storage unit in parallel with the processing of: It is configured to check whether the software to be activated is proper software.

このように構成された電子制御装置によれば、電子制御装置の起動時に、第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断する。更新が必要と判断された場合には、第2記憶部に格納された更新用ソフトウェアを第1記憶部へと転送して、第1記憶部に格納されたソフトウェアを更新する。そのため、イグニッションスイッチがオフにされた後のリレー制御中に同等な転送が行われる場合に比べ、リレー制御期間を短縮でき、バッテリーにかかる負荷を低減することができる。 According to the electronic control device configured in this manner, when the electronic control device is activated, it is determined whether or not the software stored in the first storage unit needs to be updated. When it is determined that update is necessary, the update software stored in the second storage is transferred to the first storage to update the software stored in the first storage. Therefore, the relay control period can be shortened and the load on the battery can be reduced compared to the case where 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, in parallel with the transfer processing by the update unit, determines whether the software to be activated is appropriate. software. 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 changed to the correct software. Transfer and check can be completed more quickly than in the case of checking whether or not the transfer and check are executed in parallel. Therefore, it is possible to suppress deterioration in the start-up performance of the electronic control unit due to the execution of the software update.

図1は第1実施形態の車両制御装置を含む車載ネットワークシステムの構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of an in-vehicle network system including a vehicle control device according to 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 updating 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 updating 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 bootloader 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 application N is completed. 図7はCPUにおいて実行されるリレー制御中インストール処理のフローチャートである。FIG. 7 is a flow chart of installation processing during relay control executed by the CPU. 図8はCPUにおいて実行されるブートローダー更新処理のフローチャートである。FIG. 8 is a flowchart of boot loader update processing executed by the CPU. 図9はHSMにおいて実行されるセキュアブート処理のフローチャートである。FIG. 9 is a flowchart of secure boot processing executed in the HSM. 図10はHSMにおいて実行されるアプリn検証処理のフローチャートである。FIG. 10 is a flowchart of application n verification processing executed in the HSM. 図11はCPUにおいて実行されるソフト起動処理のフローチャートである。FIG. 11 is a flow chart of soft activation 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 in the case of executing transfer after IG-ON and then executing secure boot. 図14はIG-ON後に転送を実行し、転送と並行してセキュアブートを実行する場合のタイミングチャートである。FIG. 14 is a timing chart when transfer is executed after IG-ON and secure boot is executed in parallel with the transfer. 図15は第2実施形態の車両制御装置を含む車載ネットワークシステムの構成を示すブロック図である。FIG. 15 is a block diagram showing the 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 the 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においては図示を省略する。
The electronic control unit described above will now be described with reference to exemplary embodiments.
(1) First embodiment [Configuration of electronic control unit 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 communicate with the Repromaster ECU 3 via the global bus 7 . The ECU 2 is configured to receive power via the main relay 6 . The in-vehicle network system 1 includes a plurality of ECUs in addition to the ECU 2, but they are omitted from FIG.

リプロマスターECU3は、車載ネットワークシステム1に含まれるECU(例えばECU2。)のリプログラミング(すなわち、プログラムの更新。)を管理するECUである。リプロマスターECU3は、車外にある機器から更新用ソフトウェアが提供された場合に、その更新用ソフトウェアを車載ネットワークシステム1に含まれるECU(例えばECU2。)に対して提供する。本実施形態の場合、リプロマスターECU3は、ゲートウェイとしての機能を有するECUである。リプロマスターECU3は、車載ネットワークシステム1を構成する機器間及び車載ネットワークシステム1を構成する機器と車外にある機器との間で送受信されるデータを中継する。DCM5は、車外にある機器との間で通信を行うための無線通信装置である。 The repro master ECU 3 is an ECU that manages reprogramming (that is, program update) of the ECUs (for example, the ECU 2) included in the in-vehicle network system 1. FIG. When update software is provided from a device outside the vehicle, the repro master ECU 3 provides the update software to the ECU (for example, the ECU 2) included in the in-vehicle network system 1. FIG. In the case of this embodiment, the Repromaster ECU 3 is an ECU that functions as a gateway. The repro master ECU 3 relays data transmitted and received between the devices forming the in-vehicle network system 1 and between the devices forming the in-vehicle network system 1 and devices outside the vehicle. The DCM 5 is a wireless communication device for communicating with devices 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 onboard equipment 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), control (hereinafter referred to as relay control) continues to supply electric power from the power supply side to the vehicle-mounted equipment such as the ECU 2 for a predetermined period of time. ) is configured to run

ECU2は、CPU10、第1メモリ11、第2メモリ12、HSM13及びDMAC15を備える。CPUは、Central Processing Unitの略称である。HSMは、Hardware Security Moduleの略称である。DMACは、DMA Controllerの略称である。DMAは、Direct Memory Accessの略称である。 ECU2 is provided with CPU10, the 1st memory 11, the 2nd memory 12, HSM13, and DMAC15. 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 software stored in the first memory 11 . For example, when the ECU 2 controls the controlled object, the CPU 10 executes processing for controlling the controlled object based on the control program stored in the first memory 11 . In addition, the CPU 10 also executes processing for updating software stored in the first memory 11, and the like, which will be described later in detail.

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

HSM13は、ECU2の起動時に、起動対象となるソフトウェア(すなわち、CPU10での実行対象となるソフトウェア。)が適正なソフトウェアか否かを検査する処理(以下、セキュアブートとも称する。)を実行する装置である。検査の結果、ソフトウェアが適正なソフトウェアであれば、HSM13はCPU10に対して起動可能を通知する。検査の結果、ソフトウェアが適正なソフトウェアでなければ、HSM13はCPU10に対して起動不可を通知する。例えば、ソフトウェアが改ざんされていることをHSM13が検出した場合、HSM13はCPU10に対して起動不可を通知する。CPU10は、HSM13からの通知に基づき、起動可能が通知された場合のみ、ソフトウェアを起動する。これにより、CPU10によって不正なソフトウェアが起動されるのを抑制することができる。 The HSM 13 is a device that executes processing (hereinafter also referred to as secure boot) for checking whether or not software to be activated (that is, software to be executed by the CPU 10) is proper software when the ECU 2 is activated. is. As a result of the inspection, if the software is proper software, the HSM 13 notifies the CPU 10 that the software can be activated. As a result of the inspection, if the software is not proper software, the HSM 13 notifies the CPU 10 that activation is impossible. For example, when the HSM 13 detects that software has been tampered with, the HSM 13 notifies the CPU 10 that activation is not possible. Based on the notification from the HSM 13, the CPU 10 activates the software only when it is notified that the software can be activated. This can prevent the CPU 10 from starting unauthorized 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 DMA transfers performed between devices within the ECU 2 . Although details will be described later, in the case of this embodiment, DMA transfer is executed under the control of the DMAC 15 when transferring the update software stored in the second memory 12 to the first memory 11 . As a result, data can be transferred from the first memory 11 to the second memory 12 without going through the CPU 10, and data can be transferred more quickly than when data is transferred through the CPU 10. FIG. Also, if the DMAC 15 executes DMA transfer, the load on the CPU 10 and the HSM 13 can be reduced compared to the case of transferring data 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 First Memory 11 and Second Memory 12]
Next, state transitions of the first memory 11 and the second memory 12 will be described with reference to FIGS. 2 to 6. FIG. In this embodiment, the first memory 11 and the second memory 12 store a boot loader and N applications from application 1 to application N. FIG. Also, the first memory 11 and the second memory 12 are configured to store state information indicating the state of the software stored in the first memory 11 and the second memory 12 in association with the software. State information is information for maintaining memory consistency between the first memory 11 and the second memory 12 . In this embodiment, the MSI protocol is adopted as a protocol for updating state information. In the MSI protocol, one of update state M, shared state S, and invalid state I is set as the state of each piece of software.

ソフトウェアの更新が不要な場合には、図2に示すように、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されている状態にある。なお、図2においては、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されていることを明示するため、各ソフトウェアのバージョン情報を併記してある。本実施形態においては、第1メモリ11と第2メモリ12の双方でバージョン情報が一致する場合には、第1メモリ11と第2メモリ12の双方に同一のソフトウェアが格納されていることになる。 When software update is unnecessary, the same software is stored in both the first memory 11 and the second memory 12, as shown in FIG. In FIG. 2, in order to clearly show that the same software is stored in both the first memory 11 and the second memory 12, version information of each software is also shown. In the present embodiment, if the version information matches in both the first memory 11 and the second memory 12, it means that 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 this embodiment for simply explaining 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 such 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. Information other than the version information may be, for example, a hash value generated from each piece of software or update date/time information of each piece of 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 the first memory 11 and the second memory 12 is , are in the shared state S. On the other hand, the ECU 2 may receive update software from outside the vehicle via the in-vehicle 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, the consistency between the first memory 11 and the second memory 12 is lost. changed to M. The example shown in FIG. 3 is an example in which all the software has been rewritten in the second memory 12 and the state information corresponding to each of all the software is in the update state M. In the example shown in FIG. At this time, 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 IG is turned off while the update software is stored in the second memory 12, the CPU 10 and the HSM 13 execute processing described later, and the update software stored in the second memory 12 is updated. A bootloader is transferred to the first memory 11 . When this transfer is completed, as shown in FIG. 4, the bootloaders stored in the first memory 11 and the second memory 12 are the same, and the states corresponding to the bootloaders in the first memory 11 and the second memory 12 are the same. The information is changed to the shared state S. Also, at this stage, the state information corresponding to each application from application 1 to application N in the second memory 12 is changed to 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 the IG-ON is turned on in a state where the transfer of the boot loader is completed, the CPU 10 and the HSM 13 execute processing described later, and update application 1 to application N stored in the second memory 12 are updated. 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 in the first memory 11 and the second memory 12. state information is changed to shared state S. After that, the application 2 and subsequent ones are also transferred in order, and the state information corresponding to the application 2 and later in the first memory 11 and the second memory 12 is changed to the sharing state S as shown in FIG.

このように、ECU2においては、上述のような状態情報に基づいて、第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断することができる。したがって、状態情報に基づいて古いソフトウェアと新しいソフトウェアの管理が可能になり、第1記憶部及び第2記憶部の一貫性を適切に保証することができる。 In this manner, 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 consistency between the first storage unit and the second storage unit can be appropriately guaranteed.

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

[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 in CPU 10 when IG-OFF]
The installation process during relay control shown in FIG. 7 is executed by the CPU 10 when the IG is turned off in the vehicle. When this process is started, the CPU 10 refers to the state of the boot loader in the second memory 12 in S101. Subsequently, in S103, the CPU 10 determines whether the state of the boot loader in the second memory 12 is the update state M or not. If the state of the boot loader in the second memory 12 is the update state M, the determination result in S103 is TRUE, and in S105 the CPU 10 executes boot loader update processing.

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. After starting the boot loader update process, in S201, the CPU 10 starts DMA transfer of the boot loader. Specifically, the CPU 10 instructs the DMAC 15 to start DMA transfer, and the DMAC 15 that receives the instruction transfers the boot loader from the second memory 12 to the first memory 11 . The CPU 10 waits for 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へ進む。 After completing the DMA transfer of the bootloader, the CPU 10 changes the state information corresponding to the bootloader in the first memory 11 to the shared state S in S205. At S<b>207 , the CPU 10 changes the state information corresponding to the bootloader in the second memory 12 to the shared state S. After completing S207, the process shown in FIG. 8 is terminated. After completing the process shown in FIG. 8, the process proceeds to S107 in FIG. On the other hand, if the state of the boot loader in the second memory 12 is not the update state M in S103, 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へ進む。 When proceeding from S103 or S105 to S107, the CPU 10 substitutes the initial value 1 for the variable n. In S<b>109 , the CPU 10 refers to the state of the application n in the second memory 12 . Subsequently, in S<b>111 , the CPU 10 determines whether the state of the application n in the second memory 12 is the update state M or not. If the state of the application n in 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 in the first memory 11 to the disabled state I. . After completing S113, the process proceeds to S115. On the other hand, if the state of the application n in the second memory 12 is not the update state M in S111, 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に示す処理を終了する。 When proceeding from S111 or S113 to S115, the CPU 10 adds an increment value of 1 to the variable n. In S117, the CPU 10 determines whether or not the variable n exceeds the number N of apps. If the variable n is equal to or less than the number N of applications, the judgment 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 repeated process, the application 2 and subsequent applications are processed in order. When the application N+1 is to be processed, the determination result in S117 becomes TRUE, and the processing shown in FIG. 7 is terminated.

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

続いて、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 verification processing for the application n. The verification process of application n executed in S309 is a process as shown in FIG. 10 in detail. When the verification process for application n is started, the HSM 13 refers to the state of application n in the first memory 11 in S401. Subsequently, in S<b>403 , the HSM 13 determines whether the state of the application n in the first memory 11 is the invalid state I or not.

第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へ進む。 If the state of the application n in the first memory 11 is the disabled state I, the determination result in S403 is TRUE, and the HSM 13 starts DMA transfer of the application n in S405. Specifically, the HSM 13 commands the DMAC 15 to start 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 DMA transfer, the HSM 13 snoops the memory bus to obtain the app n being transferred and verifies the app n in S407. The HSM 13 waits for completion of the DMA transfer in S409. When the DMA transfer of the application n is completed, the HSM 13 changes the state information corresponding to the application n in the first memory 11 to the shared state S in S411. In S<b>413 , the HSM 13 changes the state information corresponding to the application n in the second memory 12 to the shared state S. After completing S413, the process proceeds 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, if the state of the application n in the first memory 11 is not the invalid state I in S403, the judgment result in S403 becomes 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 in the first memory 11 is the disabled state I, the application n is DMA-transferred. is not in the invalid state I, the application n is not DMA-transferred, so the application n is read from the first memory 11 in S421. After completing S421, the process proceeds to S415.

S413又はS421からS415へ進むと、HSM13は、改ざん無しか否かを判断する。改ざん無しの場合は、S415での判断結果がTRUEとなり、S417において、HSM13は、アプリn起動可能をCPU10に通知する。一方、改ざんありの場合は、S415での判断結果がFALSEとなり、S419において、HSM13は、アプリn起動不可をCPU10に通知する。S417又はS419を終えたら図10に示す処理を終了する。図10に示す処理を終了したら、図9のS311へ進む。 When proceeding from S413 or S421 to S415, the HSM 13 determines whether or not there has been tampering. If there is no tampering, the judgment result in S415 becomes TRUE, and in S417, the HSM 13 notifies the CPU 10 that 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 application n cannot be started. After completing S417 or S419, the process shown in FIG. 10 is terminated. 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 of 1 to the variable n. In S313, the CPU 10 determines whether or not the variable n exceeds the number N of apps. If the variable n is equal to or less than the number N of 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 applications. In this repeated process, the application 2 and subsequent applications are processed in order. When the application N+1 is processed, the determination result in S313 becomes TRUE, and the processing shown in FIG. 9 ends. On the other hand, if there is tampering in S303, the determination result in S303 becomes FALSE, and in S315, the HSM 13 notifies the CPU 10 that the boot loader cannot be activated. After completing S315, the process shown in FIG. 9 ends.

[IG-ON時にCPU10において実行される処理]
次に、図11に示すソフト起動処理について説明する。ソフト起動処理は、車両においてIG-ONとされたことを契機としてCPU10によって実行される。CPU10によってソフト起動処理が実行される際には、HSM13において図9及び図10に示すセキュアブート処理が実行される。これにより、HSM13及びCPU10が連携し、HSM13においてブートローダー及びアプリ1からアプリNまでの各アプリが適正なソフトウェアと判断された場合には、これらのソフトウェアがCPU10において順に起動されることになる。一方、HSM13においてブートローダー及びアプリ1からアプリNまでの各アプリのうち、いずれかが不正なソフトウェアと判断された場合、CPU10では、不正と判断されたソフトウェアの起動を中止し、ECU2が不正に作動するのを防止する。
[Processing executed in CPU 10 when IG-ON]
Next, the software activation process shown in FIG. 11 will be described. The soft activation process is executed by the CPU 10 when the ignition is turned on in the vehicle. When the soft boot process is executed by the CPU 10, the secure boot process shown in FIGS. 9 and 10 is executed in the HSM 13. FIG. As a result, the HSM 13 and the CPU 10 cooperate with each other, and when the boot loader and each application from application 1 to application N are determined to be proper software in the HSM 13 , these software are started in the CPU 10 in order. On the other hand, if the HSM 13 determines that any one of the boot loader and the applications 1 to N is illegal software, the CPU 10 stops starting the software that is determined to be illegal, and the ECU 2 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 notification of boot loader startability. In S<b>503 , the CPU 10 determines whether or not the boot loader can be activated based on the notification from the HSM 13 . When the above S305 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that the boot loader can be activated. In this case, it is determined to be TRUE in S503 and the process proceeds to S505. On the other hand, when the above S315 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that the boot loader cannot be activated. In this case, it is determined to be FALSE in S503, and the processing shown in FIG. 11 ends with an error. In the case of an error termination, the ECU 2 is in a state where it does not function normally. Therefore, it is only necessary to execute a process corresponding to the occurrence of an error, 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 bootloader. Subsequently, in S507, the CPU 10 substitutes the initial value 1 for the variable n. In S<b>509 , the CPU 10 waits for notification of whether or not application n can be started. In S<b>511 , the CPU 10 determines whether or not the application n can be activated based on the notification from the HSM 13 . When the above S417 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that application n can be started. In this case, it is determined to be TRUE in S511 and the process proceeds to S513. On the other hand, when the above-described S419 is executed in the HSM 13, the HSM 13 notifies the CPU 10 that application n cannot be started. In this case, it is judged as FALSE in S511, and the processing shown in FIG. 11 is ended 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 of 1 to the variable n. In S517, the CPU 10 determines whether or not the variable n exceeds the number N of apps. If the variable n is equal to or less than the number N of applications, the determination result in S517 becomes FALSE, and the process returns to S509. As a result, S509 to S517 are repeated while the variable n is equal to or less than the number N of applications. In this repeated process, the application 2 and subsequent applications are sequentially processed, and if the determination result in S511 is TRUE, the application 2 and subsequent applications are activated in order. Also, if the determination result in S511 is FALSE, the processing shown in FIG. 10 ends with an error at that point. In the repeated process, when the application N+1 is to be processed, the determination result in S517 becomes TRUE, and the process shown in FIG. 11 is normally terminated.

[リレー制御時間及び起動性能の対比]
次に、ECU2において上述の処理を実行する場合と、他の処理を実行する場合とでリレー制御時間及び起動性能にどのような差異が生じるのかを、図12から図14に示すタイミングチャートに基づいて説明する。
[Comparison of relay control time and starting performance]
Next, based on timing charts shown in FIGS. to 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 bootloader to application N is executed in the relay control section after IG-OFF, and application N from the bootloader is activated after IG-ON. In this example, even after the IG-OFF, the power supply to the ECU 2 is continued by the main relay 6, and in the meantime, the software from the boot loader to the application N is DMA transferred from the second memory 12 to the first memory 11. be done. When the transfer of application N ends, the relay control ends. After that, when the IG-ON is turned on, the software stored in the first memory 11 is read in order from the boot loader to the application N. Software determined to be bootable in the secure boot process by the HSM 13 is sequentially booted by 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, the example shown in FIG. This is an example in which starting up to N is executed in order. In this example as well, the power supply to the ECU 2 is continued by the main relay 6 after the IG-OFF. However, unlike the example shown in FIG. 12, only the bootloader is DMA-transferred from the second memory 12 to the first memory 11 during relay control. Therefore, the relay control can be finished more quickly than the example shown in FIG. Therefore, from the viewpoint of suppressing the load on the battery, the example shown in FIG. 13 is more suitable 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, DMA transfer from application 1 to application N is executed after IG-ON. In comparison, the activation start timing of application 1 is delayed. This is not a problem if the number of applications to be updated is small or the amount of data for each application is small, but if the number of applications to be updated is large or the amount of data for each application is large In this case, the time required for starting the ECU 2 increases.

これに対し、図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 of executing the above process. In this example, only the bootloader 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 activated and the DMA transfer from application 1 to application N is executed in order. Execute secure boot processing, and start each application that has undergone secure boot processing in order. As a result, the HSM 13 can acquire each application being transferred without reading each application after transfer from the first memory 11, and can check for falsification of the application, garbled data, and the like. Therefore, compared to the example shown in FIG. 13, the secure boot process by the HSM 13 can be executed more quickly, so that the activation of each application by the CPU 10 can be started more quickly. can be shorter than That is, by executing the above-described processing, it is possible to avoid an increase in relay control time to the same degree as in the example shown in FIG. 13, and to complete the software update 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 should be noted that there is no need to selectively select whether to update the software at the timing of IG-ON or to update the software at the timing of IG-OFF. 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 standards or the like. In this respect, according to the above-described process, the processing time after IG-ON can be reduced, so software that was difficult to update after IG-ON with the method shown in FIG. Such a technique may enable update after IG-ON. Therefore, the degree of freedom regarding software update timing is increased. In addition, if the number of updates after IG-ON increases, the update time after IG-OFF can be reduced by that amount, so the load on the battery can be reduced.

(2)第2実施形態
次に、第2実施形態について説明する。なお、第2実施形態以降の各実施形態は、第1実施形態で例示した構成の一部を変更した実施形態である。よって、第1実施形態との相違点を中心に詳述し、第1実施形態と同様な部分に関しては、その詳細な説明を省略する。
(2) Second Embodiment Next, a second embodiment will be described. In addition, each embodiment after 2nd Embodiment is embodiment which changed a part of structure illustrated in 1st Embodiment. Therefore, the differences from the first embodiment will be mainly described in detail, and the detailed description of the same parts as 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 repro master ECU 23, a DCM 5, a main relay 6, and the like. Although the second memory 12 was provided in the ECU 2 in the first embodiment, the second memory 32 is provided in the Repromaster ECU 23 in the second embodiment. In this respect, the second embodiment differs from the first embodiment. Further, in the second embodiment, when the IG-OFF is performed, 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 manner, the ECU 22 and the Repromaster ECU 23 can perform data communication with each other via the global bus 7 . Therefore, the update software stored in the second memory 32 can be transmitted from the repro master ECU 23 to the ECU 22 via the global bus 7, and the update software received by the ECU 22 can be stored in the first memory 11. Therefore, although 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, the ECU 22 is otherwise the same as that of the first embodiment. By executing similar processing, it is possible to quickly complete the software update while avoiding an increase in 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 therein 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. can.

また、ソフトウェアの更新が必要な場合、HSM13は、第1メモリ11へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、ソフトウェアの更新が不要な場合、HSM13は、第1メモリ11に格納されたソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査すればよい。これにより、ソフトウェアの更新が必要な場合には、第1メモリ11への転送が完了する前にHSM13による検査を実施できるので、ECU22の起動性能が低下するのを抑制できる。 Further, when software update is necessary, the HSM 13 examines whether or not the software for updating transferred to the first memory 11 is proper software. , HSM 13 may check whether or not the software stored in the first memory 11 is proper software. As a result, when the software needs to be updated, the HSM 13 can perform the inspection before the transfer to the first memory 11 is completed, so that the starting performance of the ECU 22 can be prevented from deteriorating.

(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, a 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 DCM 5, 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 second memory. 2 memory 62 is provided. In this respect, the third embodiment differs from the first embodiment. Further, in the third embodiment, when the IG-OFF is performed, the power source side is configured to be able to continue supplying power to both the first ECU 52 and the second ECU 53 via the main relay 6. there is Furthermore, the first ECU 52 and the second ECU 53 are configured to perform 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 as described above, 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, although 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, the other points are the same as those of the first embodiment in the first ECU 52 . By executing processing similar to the form, it is possible to quickly complete the software update while avoiding an increase in 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 therein 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. can.

また、ソフトウェアの更新が必要な場合、HSM13は、第1メモリ11へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、ソフトウェアの更新が不要な場合、HSM13は、第1メモリ11に格納されたソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査すればよい。これにより、ソフトウェアの更新が必要な場合には、第1メモリ11への転送が完了する前にHSM13による検査を実施できるので、第1のECU52の起動性能が低下するのを抑制できる。 Further, when software update is necessary, the HSM 13 examines whether or not the software for updating transferred to the first memory 11 is proper software. , HSM 13 may check whether or not the software stored in the first memory 11 is proper software. As a result, when the software needs to be updated, the HSM 13 can perform the inspection before the transfer to the first memory 11 is completed, so that the starting performance of the first ECU 52 can be prevented from deteriorating.

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

例えば、上記実施形態では、第2メモリ12,32,62が配置される場所について、3通りの例を示したが、上述の例に限らず、車載ネットワークシステム内において、第2メモリから第1メモリ11へソフトウェアの転送が可能な場所であれば、第2メモリはどこに配置されていてもよい。 For example, in the above-described embodiment, three examples are shown for the locations where the second memories 12, 32, and 62 are arranged. The second memory may be located 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転送を行うか否かも任意である。 Also, in the first embodiment, an example of performing DMA transfer from the first memory 11 to the second memory 12 has been described, but whether or not to perform DMA transfer is optional. Also, although not mentioned in the second and third embodiments, whether or not the ECUs 22 and 52 perform DMA transfer inside the ECUs 22 and 52 in the second and third embodiments is optional.

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

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

また、上述した電子制御装置の他、当該電子制御装置を構成要素とする車載ネットワークシステム、当該電子制御装置としてコンピュータを機能させるためのプログラム、このプログラムを記録した非遷移有形記録媒体など、種々の形態で本開示を実現することもできる。 In addition to the above-described electronic control device, various other devices such as an in-vehicle network system having the electronic control device as a component, a program for making a computer function as the electronic control device, a non-transition tangible recording medium recording this program, etc. The present disclosure can also be implemented in a 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 addition, in each of the embodiments described above, the ECUs 2, 22, and 52 correspond to the electronic control unit referred to in the present disclosure. The first memory 11 corresponds to the first storage section referred to in the present disclosure. The second memories 12, 32, 62 correspond to the second storage section 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 section may be provided inside the electronic control unit. In this case, all the necessary components are located inside the electronic control unit. Therefore, in cases where relay control is required, for example, the number of devices that require relay control can be reduced and the load on the battery can be reduced compared to the case where some components are located 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 therein in association with the software. The determination unit may be configured to determine whether 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 consistency between the first storage unit and the second storage unit can be appropriately guaranteed.

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

(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 using a DMA transfer method. In this case, for example, when the processing section is configured by a CPU and the inspection section is configured by an HSM, the load on the CPU and HSM can be reduced. In addition, since the DMA transfer increases the efficiency of using the data transmission path, it is possible to speed up the processing compared to the case of transferring data 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 a data transmission path used for transfer in the DMA transfer method to acquire update software transferred to the first storage unit. In this case, if the object to be transferred by DMA transfer is read out from the second storage unit, the inspection can be performed by the inspection unit, so there is no need to read out the object to be inspected 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 section may be provided in another electronic device that is configured to communicate with the electronic control device via a communication path. The updating unit may be configured to acquire update software stored in the second storage unit from another electronic device and transfer the software to the first storage unit. In this case, the configuration of the electronic control units can be simplified by sharing one second storage unit among the plurality of electronic control units without providing the second storage unit for each electronic control unit. 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。 DESCRIPTION OF SYMBOLS 1, 21, 51... In-vehicle network system 2, 22, 52, 53... ECU, 3, 23... Repro master ECU, 5... DCM, 6... Main relay, 7... Global bus, 58... Local bus, 10... CPU , 11...first memory, 12, 32, 62...second memory, 15...DMAC.

Claims (6)

電子制御装置(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記憶部へと転送する処理と並行して、前記起動対象となるソフトウェアが適正なソフトウェアか否かを検査するように構成されており、
前記第2記憶部(12)は、前記電子制御装置の内部に設けられており、
前記第1記憶部及び前記第2記憶部は、それぞれに格納されたソフトウェアの状態を示す状態情報を、前記ソフトウェアに対応付けて記憶するように構成され、
前記判断部は、前記状態情報に基づいて、前記第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断するように構成されている
電子制御装置。
An electronic control device (2, 22, 52),
a first storage unit (11) for storing software;
an inspection unit (13, S301, S407, S421) that inspects whether software to be activated is proper software when the electronic control unit is activated;
The processing unit (10, S505, S513) and
a judgment unit (13, S403) for judging whether the software stored in the first storage unit needs to be updated when the electronic control unit is started;
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 update software is transferred to the first storage unit. an updating unit (13, 15, S405) for updating software stored in
with
When the software stored in the first storage unit is updated by the update unit, the inspection unit transfers update software stored in the second storage unit to the first storage unit. In parallel with, it is configured to inspect whether the software to be activated is proper software,
The second storage unit (12) is provided inside the electronic control unit,
The first storage unit and the second storage unit are configured to store state information indicating the state of the software stored therein in association with the software,
The determination unit is configured to determine whether or not software stored in the first storage unit needs to be updated based on the state information.
electronic controller.
請求項に記載の電子制御装置であって、
前記検査部は、前記判断部によって前記更新が必要と判断された場合には、前記更新部によって前記第1記憶部へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、前記判断部によって前記更新が不要と判断された場合には、前記第1記憶部に格納された前記ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査するように構成されている
電子制御装置。
The electronic control device according to claim 1 ,
When the determination unit determines that the update is necessary, the inspection unit examines the update software transferred to the first storage unit by the update unit to determine whether the software is proper software. If the determination unit determines that the update is unnecessary, the software stored in the first storage unit is inspected to determine whether the software is proper software. An electronic control unit configured to:
請求項に記載の電子制御装置であって、
前記更新部は、前記第2記憶部に格納された更新用ソフトウェアを、DMA転送方式で前記第1記憶部へと転送するように構成されている
電子制御装置。
The electronic control device according to claim 2 ,
The electronic control device, wherein the update unit is configured to transfer the update software stored in the second storage unit to the first storage unit by a DMA transfer method.
請求項に記載の電子制御装置であって、
前記検査部は、前記DMA転送方式での転送に用いられるデータ伝送路をスヌープして、前記第1記憶部へと転送される更新用ソフトウェアを取得するように構成されている
電子制御装置。
The electronic control device according to claim 3 ,
The inspection unit is configured to snoop a data transmission path used for transfer in the DMA transfer method and acquire update software transferred to the first storage unit.
電子制御装置(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記憶部へと転送する処理と並行して、前記起動対象となるソフトウェアが適正なソフトウェアか否かを検査するように構成されており、
前記第2記憶部(32,62)は、通信路を介して前記電子制御装置と通信可能に構成される他の電子装置(23,53)に設けられ、
前記更新部は、前記第2記憶部に格納された更新用ソフトウェアを前記他の電子装置から取得して、当該ソフトウェアを前記第1記憶部へと転送するように構成されており、
前記第1記憶部及び前記第2記憶部は、それぞれに格納されたソフトウェアの状態を示す状態情報を、前記ソフトウェアに対応付けて記憶するように構成され、
前記判断部は、前記状態情報に基づいて、前記第1記憶部に格納されたソフトウェアについて、更新が必要か否かを判断するように構成されている
電子制御装置。
An electronic control device (2, 22, 52),
a first storage unit (11) for storing software;
an inspection unit (13, S301, S407, S421) that inspects whether software to be activated is proper software when the electronic control unit is activated;
The processing unit (10, S505, S513) and
a judgment unit (13, S403) for judging whether the software stored in the first storage unit needs to be updated when the electronic control unit is started;
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 update software is transferred to the first storage unit. an updating unit (13, 15, S405) for updating software stored in
with
When the software stored in the first storage unit is updated by the update unit, the inspection unit transfers update software stored in the second storage unit to the first storage unit. In parallel with, it is configured to inspect whether the software to be activated is proper software,
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 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,
The first storage unit and the second storage unit are configured to store state information indicating the state of the software stored therein in association with the software,
The determination unit is configured to determine whether or not software stored in the first storage unit needs to be updated based on the state information.
electronic controller.
請求項に記載の電子制御装置であって、
前記検査部は、前記判断部によって前記更新が必要と判断された場合には、前記更新部によって前記第1記憶部へと転送される更新用ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査し、前記判断部によって前記更新が不要と判断された場合には、前記第1記憶部に格納された前記ソフトウェアを検査対象として、当該ソフトウェアが適正なソフトウェアか否かを検査するように構成されている
電子制御装置。
The electronic control device according to claim 5 ,
When the determination unit determines that the update is necessary, the inspection unit examines the update software transferred to the first storage unit by the update unit to determine whether the software is proper software. If the determination unit determines that the update is unnecessary, the software stored in the first storage unit is inspected to determine whether the software is proper software. An electronic control unit 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 JP2020173597A (en) 2020-10-22
JP7302250B2 true 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)

Families Citing this family (2)

* 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
CN117651947A (en) 2021-07-21 2024-03-05 三菱电机株式会社 Information processing device, information processing method, and information processing program

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 株式会社オートネットワーク技術研究所 In-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 株式会社オートネットワーク技術研究所 In-vehicle relay device, control program, and memory sharing method

Also Published As

Publication number Publication date
JP2020173597A (en) 2020-10-22

Similar Documents

Publication Publication Date Title
CN109478155B (en) Vehicle-mounted update device, vehicle-mounted update system, and update method of communication device
US20180341476A1 (en) Software updating device, software updating system, and software updating method
EP3816795B1 (en) Vehicle control device, program update method, and program update system
US12461732B2 (en) Ota master, system, method, non-transitory storage medium, and vehicle
JP7302250B2 (en) electronic controller
EP3920020A1 (en) Electronic control device and program update method
CN110574015A (en) Vehicle-mounted relay device, control program and memory sharing method
JP2013069005A (en) Electronic control device for automobile
US20100313041A1 (en) Power management circuit, power management method and power management program
KR102705918B1 (en) Ota master, center, system, update method, non-transitory storage medium, and vehicle
US12524218B2 (en) Center, OTA master, system, distribution method, non-transitory storage medium, and vehicle
CN119882967A (en) Multi-core heterogeneous SOC reset method, electronic equipment and chip
US20220342653A1 (en) Ota master, center, system, update method, non-transitory storage medium, and vehicle
US11945453B2 (en) Onboard device, information generating method, non-transitory storage medium, and vehicle
JP7031411B2 (en) Electronic control device
US11954480B2 (en) Center, OTA master, system, method, non-transitory storage medium, and vehicle
CN109375953B (en) Operating system starting method and device
JP2018160207A (en) In-vehicle control device and program update software
JP6302004B2 (en) Writing program
JP2020052960A (en) Vehicle control device and vehicle control method
GB2576729A (en) Installing application program code on a vehicle control system
US12613689B2 (en) Electronic control device, reprogram execution method, and non-transitory computer readable storage medium
JP6998434B2 (en) Electronic control device for automobiles
JP6762411B2 (en) Electronic control unit for automobiles
CN115658183B (en) Method and device for controlling MCU, electronic equipment and storage medium

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