JP2020201986A - Software update device and software update method - Google Patents

Software update device and software update method Download PDF

Info

Publication number
JP2020201986A
JP2020201986A JP2020148013A JP2020148013A JP2020201986A JP 2020201986 A JP2020201986 A JP 2020201986A JP 2020148013 A JP2020148013 A JP 2020148013A JP 2020148013 A JP2020148013 A JP 2020148013A JP 2020201986 A JP2020201986 A JP 2020201986A
Authority
JP
Japan
Prior art keywords
update
recovery
ecu
software
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
JP2020148013A
Other languages
Japanese (ja)
Other versions
JP7184855B2 (en
Inventor
秀敏 寺岡
Hidetoshi Teraoka
秀敏 寺岡
櫻井 康平
Kohei Sakurai
康平 櫻井
長田 健一
Kenichi Osada
健一 長田
黒澤 憲一
Kenichi Kurosawa
憲一 黒澤
中原 章晴
Akiharu Nakahara
章晴 中原
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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2020148013A priority Critical patent/JP7184855B2/en
Publication of JP2020201986A publication Critical patent/JP2020201986A/en
Application granted granted Critical
Publication of JP7184855B2 publication Critical patent/JP7184855B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

To provide a software update device capable of carrying out recovery processing suitable to various devices.SOLUTION: A software update device is connected to a control device. The software update device includes: an update control part which carries out processing to cause software of the control device to transit from a state before update to an update completion state; a recovery control information management part that acquires recovery control information; and a recovery control part that, when the software does not transit to the update completion state due to abnormality in update processing, carries out recovery processing to transit the software to the update completion state on the basis of the recovery control information. The recovery control information includes information indicating a recovery processing method, and the information indicating the recovery processing method is determined on the basis of a configuration of the control device.SELECTED DRAWING: Figure 2

Description

本発明は、ソフトウェア更新装置、ソフトウェア更新方法、およびソフトウェア更新システムに関する。 The present invention relates to a software update device, a software update method, and a software update system.

近年、運転支援機能や自動運転技術の進展により、自動車用の電子制御装置(ECU:Electric Control Unit)に搭載されるソフトウェアの規模が増大している。また、それに伴ってソフトウェア不具合に起因するリコールの回数だけでなく、1回あたりに対応が必要な台数も増加している。そのため、ECUに搭載されるソフトウェアを遠隔で更新する技術へのニーズが高まっている。遠隔でソフトウェアを更新するにあたっては、従来ディーラ等で整備士が更新作業を行っていた場合とは異なり、できるだけ処理を自動化する必要がある。そのため、たとえば電源断等の異常が発生して更新処理が中断した場合でも、整備士等の操作を前提とせずに正常な状態に復帰させることができることが重要となる。
たとえば、特許文献1には、実行ソフトウェアを格納するエリアを2面用意し、ソフトウェアの更新異常が発生した場合に、正常なソフトウェアを選択して実行することで更新異常時もシステムに影響を与えない技術が開示されている。
In recent years, with the development of driving support functions and automatic driving technology, the scale of software installed in electronic control devices (ECUs: Electronic Control Units) for automobiles has been increasing. Along with this, not only the number of recalls due to software defects but also the number of units that need to be dealt with each time is increasing. Therefore, there is an increasing need for a technique for remotely updating software mounted on an ECU. When updating software remotely, it is necessary to automate the process as much as possible, unlike the case where a mechanic has conventionally performed the update work with a dealer or the like. Therefore, even if an abnormality such as a power failure occurs and the update process is interrupted, it is important to be able to return to the normal state without assuming the operation of a mechanic or the like.
For example, in Patent Document 1, two areas for storing execution software are prepared, and when a software update abnormality occurs, normal software is selected and executed to affect the system even when the update abnormality occurs. No technology is disclosed.

特許第4548601号Patent No. 4548601

特許文献1に記載の発明は、メモリリソースが乏しい装置に適用することができず、ソフトウェアを更新する装置の多様性に対応することが困難である。 The invention described in Patent Document 1 cannot be applied to a device having scarce memory resources, and it is difficult to cope with a variety of devices for updating software.

本発明の第1の態様によるソフトウェア更新装置は、制御装置と接続されるソフトウェア更新装置であって、前記制御装置のソフトウェアを更新前状態から更新完了状態へと遷移させる更新処理を行う更新制御部と、リカバリ制御情報を取得するリカバリ制御情報管理部と、前記更新処理の異常により前記ソフトウェアが前記更新完了状態へと遷移されていない場合に、前記リカバリ制御情報に基づき前記ソフトウェアを前記更新完了状態に遷移させるリカバリ処理を実行するリカバリ制御部とを備え、前記リカバリ制御情報は前記リカバリ処理の方式を示す情報を含み、前記リカバリ処理の方式を示す情報は、前記制御装置の構成に基づき決定される。
本発明の第2の態様によるソフトウェア更新方法は、制御装置と接続されるソフトウェア更新装置が実行するソフトウェア更新方法であって、前記制御装置のソフトウェアを更新前状態から更新完了状態へと遷移させる更新処理を行うことと、リカバリ制御情報を取得することと、前記更新処理の異常により前記ソフトウェアが前記更新完了状態へと遷移されていない場合に、前記リカバリ制御情報に基づき前記ソフトウェアを前記更新完了状態に遷移させるリカバリ処理を実行することとを含み、前記リカバリ制御情報は前記リカバリ処理の方式を示す情報を含み、前記リカバリ処理の方式を示す情報は、前記制御装置の構成に基づき決定される。
The software update device according to the first aspect of the present invention is a software update device connected to a control device, and is an update control unit that performs update processing for transitioning the software of the control device from the pre-update state to the update complete state. And the recovery control information management unit that acquires the recovery control information, and the update completed state of the software based on the recovery control information when the software has not transitioned to the update completed state due to an abnormality in the update process. The recovery control unit includes a recovery control unit that executes the recovery process of transitioning to, the recovery control information includes information indicating the recovery processing method, and the information indicating the recovery processing method is determined based on the configuration of the control device. To.
The software update method according to the second aspect of the present invention is a software update method executed by the software update device connected to the control device, and updates the software of the control device from the pre-update state to the update complete state. When the software has not transitioned to the update complete state due to processing, acquisition of recovery control information, and an abnormality in the update process, the software is updated to the update complete state based on the recovery control information. The recovery control information includes information indicating the recovery processing method, and the information indicating the recovery processing method is determined based on the configuration of the control device, including executing the recovery processing to transition to.

本発明によれば、多様な装置に対応したリカバリ処理を実行できる。 According to the present invention, recovery processing corresponding to various devices can be executed.

ソフトウェア更新システムの構成を示す図Diagram showing the configuration of the software update system 図2(a)はゲートウェイのハードウェア構成を示すブロック図、図2(b)はゲートウェイ上で動作するゲートウェイプログラムの構成を示すブロック図FIG. 2A is a block diagram showing the hardware configuration of the gateway, and FIG. 2B is a block diagram showing the configuration of the gateway program running on the gateway. 更新状態D1の一例を示す図The figure which shows an example of the update state D1 図4(a)はエンジン制御ECUのハードウェア構成を示すブロック図、図4(b)はエンジン制御ECU上で動作する制御プログラムの構成を示すブロック図FIG. 4A is a block diagram showing the hardware configuration of the engine control ECU, and FIG. 4B is a block diagram showing the configuration of the control program operating on the engine control ECU. 図5(a)は容量が少ないFROMの構成例を示す図、図5(b)は容量が多いFROMの構成例を示す図FIG. 5A is a diagram showing a configuration example of a FROM having a small capacity, and FIG. 5B is a diagram showing a configuration example of a FROM having a large capacity. 図6(a)は第1の実施の形態における更新パッケージの構成を示す図、図6(b)は、第1の実施の形態におけるECUリカバリ制御情報の構成を示す図FIG. 6A is a diagram showing the configuration of the update package in the first embodiment, and FIG. 6B is a diagram showing the configuration of the ECU recovery control information in the first embodiment. エンジン制御ECUのソフトウェアを更新する更新処理全体を示すシーケンス図Sequence diagram showing the entire update process for updating the software of the engine control ECU 図7のステップS4においてゲートウェイとエンジン制御ECUの間で実行されるソフトウェア更新処理の流れを示すシーケンス図A sequence diagram showing a flow of software update processing executed between the gateway and the engine control ECU in step S4 of FIG. 図9(a)はメモリの少ないECUにおける復元処理S407の処理を示す概念図、図9(b)は、メモリが多いECUにおける復元処理S407の処理を示す概念図FIG. 9A is a conceptual diagram showing the processing of the restoration process S407 in the ECU having a small memory, and FIG. 9B is a conceptual diagram showing the processing of the restoration process S407 in the ECU having a large memory. 図10(a)はメモリの少ないECUの起動シーケンス図、図10(b)はメモリの多いECUの起動シーケンス図FIG. 10A is a start-up sequence diagram of an ECU having a small memory, and FIG. 10B is a start-up sequence diagram of an ECU having a large memory. ゲートウェイ10が起動時に行うリカバリ制御処理を示すフローチャートFlow chart showing recovery control processing performed by gateway 10 at startup リカバリ処理S707の一例を示すフローチャートFlow chart showing an example of recovery process S707 図13(a)および図13(b)は自動運転ECUに対応する更新パッケージの一例を示す図、図13(c)は画面表示例を示す図13 (a) and 13 (b) are diagrams showing an example of an update package corresponding to an automatic operation ECU, and FIG. 13 (c) is a diagram showing an example of screen display. 自動運転ECUのリカバリ処理の一例を示すシーケンス図Sequence diagram showing an example of recovery processing of the automatic operation ECU 図15(a)および図15(b)はADAS ECUに対応する更新パッケージの一例を示す図、図15(c)は画面表示例を示す図15 (a) and 15 (b) are diagrams showing an example of an update package corresponding to the ADAS ECU, and FIG. 15 (c) is a diagram showing a screen display example. ADAS ECUのリカバリ処理の一例を示すシーケンス図Sequence diagram showing an example of recovery processing of ADAS ECU 図17(a)および図17(b)はエンジン制御ECUに対応する更新パッケージの一例を示す図、図17(c)は画面表示例を示す図17 (a) and 17 (b) are diagrams showing an example of an update package corresponding to the engine control ECU, and FIG. 17 (c) is a diagram showing a screen display example. エンジン制御ECUのリカバリ処理の一例を示すシーケンス図Sequence diagram showing an example of recovery processing of engine control ECU 図19(a)および図19(b)はブレーキ制御ECUに対応する更新パッケージの一例を示す図、図19(c)は画面表示例を示す図19 (a) and 19 (b) are diagrams showing an example of an update package corresponding to the brake control ECU, and FIG. 19 (c) is a diagram showing a screen display example. ブレーキ制御ECUのリカバリ処理の一例を示すシーケンス図Sequence diagram showing an example of recovery processing of the brake control ECU 図21(a)および図21(b)はHVAC ECUに対応する更新パッケージの一例を示す図、図21(c)は画面表示例を示す図21 (a) and 21 (b) are diagrams showing an example of an update package corresponding to the HVAC ECU, and FIG. 21 (c) is a diagram showing an example of screen display. HVAC ECUのリカバリ処理の一例を示すシーケンス図Sequence diagram showing an example of recovery processing of HVAC ECU 図23(a)および図23(b)はエアバッグECUに対応する更新パッケージの一例を示す図、図23(c)は画面表示例を示す図23 (a) and 23 (b) are diagrams showing an example of an update package corresponding to the airbag ECU, and FIG. 23 (c) is a diagram showing an example of screen display. エアバッグECUのリカバリ処理の一例を示すシーケンス図Sequence diagram showing an example of recovery processing of airbag ECU 変形例6における更新パッケージの一例を示す図The figure which shows an example of the update package in the modification 6. 第2の実施の形態におけるエンジン制御ECU上で動作する制御プログラムの構成を示すブロック図A block diagram showing a configuration of a control program operating on an engine control ECU according to a second embodiment. ゲートウェイがエンジン制御ECUからリカバリ制御情報を取得する処理を示すシーケンス図Sequence diagram showing the process of the gateway acquiring recovery control information from the engine control ECU 図28(a)は第3の実施の形態における更新パッケージの構成を示す図、図28(b)は、第3の実施の形態におけるECUリカバリ制御情報の構成を示す図FIG. 28 (a) is a diagram showing the configuration of the update package in the third embodiment, and FIG. 28 (b) is a diagram showing the configuration of the ECU recovery control information in the third embodiment. 図29(a)は自動運転ECUに対応するリカバリ制御情報の一例を示す図、図29(b)は画面表示例を示す図、図29(c)は、更新状態D1の一例を示す図29 (a) is a diagram showing an example of recovery control information corresponding to the automatic operation ECU, FIG. 29 (b) is a diagram showing an example of screen display, and FIG. 29 (c) is a diagram showing an example of the update state D1. 図30(a)は中断要因によって異なるリカバリ制御処理の一例を示すシーケンス図、図30(b)は、FROM故障時のリカバリ制御処理の一例を示すシーケンス図FIG. 30A is a sequence diagram showing an example of recovery control processing that differs depending on the interruption factor, and FIG. 30B is a sequence diagram showing an example of recovery control processing at the time of FROM failure.

―第1の実施の形態―
以下、図1〜図24を参照して、第1の実施の形態に係るソフトウェア更新システムを説明する。なお本実施の形態ではソフトウェアの更新について説明するが、ソフトウェアに限定されずパラメータやデータなどに適用可能である。
-First Embodiment-
Hereinafter, the software update system according to the first embodiment will be described with reference to FIGS. 1 to 24. Although software update is described in this embodiment, it is not limited to software and can be applied to parameters, data, and the like.

<更新とリカバリの定義>
本実施の形態におけるソフトウェアの「更新」と「リカバリ」を以下のように定義する。すなわち本実施の形態におけるソフトウェアの「更新」とは、ソフトウェアを更新前状態から更新完了状態へと遷移させることである。また本実施の形態におけるソフトウェアの「リカバリ」とは、更新処理の異常によりソフトウェアが更新完了状態へと遷移されていない場合に、更新完了状態に遷移させることである。
ただしソフトウェアは、単一のプログラムから構成されてもよいし、複数のプログラムから構成されてもよい。さらにソフトウェアはプログラムだけでなくプログラムの実行に必要な各種パラメータ、テキスト情報、音声情報、画像情報などを含んでいてもよい。
<Definition of update and recovery>
The software "update" and "recovery" in the present embodiment are defined as follows. That is, the "update" of the software in the present embodiment is to transition the software from the pre-update state to the update complete state. Further, the "recovery" of the software in the present embodiment is to make a transition to the update complete state when the software has not transitioned to the update complete state due to an abnormality in the update process.
However, the software may be composed of a single program or may be composed of a plurality of programs. Further, the software may include not only the program but also various parameters necessary for executing the program, text information, audio information, image information and the like.

<構成>
(システム構成)
図1は、第1の実施の形態にかかるソフトウェア更新システムSの構成を示す図である。ソフトウェア更新システムSは車両1、およびサーバ2を備える。車両1とサーバ2は、アクセスネットワークや拠点を接続するインターネット3、および通信サービスプロバイダが提供するアクセスネットワーク4を介して接続される。
車両1は、ゲートウェイ10、通信モジュール11、Human Machine Interface(HMI)12、エンジン制御ECU13、ブレーキ制御ECU14、自動運転ECU15、先進運転支援システム(ADAS) ECU16、エアバッグECU17、Heating Ventilation Air Conditioning(HVAC) ECU18、および車両管理ECU19等の車両1が走行等の機能を実現するために必要とするECU群と、これらECU群をつなぐ車内ネットワーク10a、10bとを備える。
<Composition>
(System configuration)
FIG. 1 is a diagram showing a configuration of a software update system S according to the first embodiment. The software update system S includes a vehicle 1 and a server 2. The vehicle 1 and the server 2 are connected via the Internet 3 that connects the access network and the base, and the access network 4 provided by the communication service provider.
The vehicle 1 includes a gateway 10, a communication module 11, a Human Machine Interface (HMI) 12, an engine control ECU 13, a brake control ECU 14, an automatic driving ECU 15, an advanced driver assistance system (ADAS) ECU 16, an airbag ECU 17, and a heating ventilation air conditioning (HVAC). ) The ECU 18 and the vehicle 1 such as the vehicle management ECU 19 are provided with an ECU group required to realize a function such as running, and in-vehicle networks 10a and 10b connecting these ECU groups.

本実施の形態では、エンジン制御ECU13の制御プログラムを現行のバージョン2から新バージョンであるバージョン3に更新する例を説明する。なおこの制御プログラムは、現行のバージョン2の直前の旧バージョンは1である。
車内ネットワークはControl Area Network(CAN)(登録商標)、Local Interconnect Network(LIN)、FlexRay、Ethernet(登録商標)などで構成される。本実施の形態では、車内ネットワーク10bはCANで、車内ネットワーク10aはEthernetで構成される。また、図1では図示しないが、各種ECUなどの車両内の各構成要素は電力線で蓄電池に接続され、電力供給を受けている。
In this embodiment, an example of updating the control program of the engine control ECU 13 from the current version 2 to the new version 3 will be described. The previous version of this control program immediately before the current version 2 is 1.
The in-vehicle network is composed of Control Area Network (CAN) (registered trademark), Local Interconnect Network (LIN), FlexRay, Ethernet (registered trademark) and the like. In the present embodiment, the in-vehicle network 10b is composed of CAN, and the in-vehicle network 10a is composed of Ethernet. Further, although not shown in FIG. 1, each component in the vehicle such as various ECUs is connected to a storage battery by a power line to receive electric power.

ゲートウェイ10は、各種ECU間通信データの中継を行うとともに、ソフトウェア更新装置として、自機器および車内ネットワークを介して接続されたECUに搭載されるソフトウェアの更新を行う。
通信モジュール11は、ゲートウェイ10やHMI12、各種ECUとサーバ2との通信を中継する。HMI12は、車両1の乗員であるユーザへの情報提示やユーザからの入力を受け付けるための装置であり、画面表示を行う表示装置および各種スイッチ等の入力装置、またはこれらを組み合わせたタッチパネル等により構成される。エンジン制御ECU13は、エンジンの制御を行う。ブレーキ制御ECU14は、ブレーキの制御を行う。自動運転ECU15は、自動運転時に環境の認識や車両の起動指示等を行う。ADAS ECU16は、自動ブレーキなどの運転支援制御を行う。エアバッグECU17は、エアバッグの制御を行う。HVAC ECU18は、車内の空調制御を行う。車両管理ECU19は、車両状態の管理を行う。
The gateway 10 relays communication data between various ECUs, and as a software update device, updates software mounted on its own device and an ECU connected via an in-vehicle network.
The communication module 11 relays communication between the gateway 10, the HMI 12, various ECUs, and the server 2. The HMI 12 is a device for presenting information to a user who is an occupant of the vehicle 1 and receiving input from the user, and is composed of a display device for displaying a screen, an input device such as various switches, or a touch panel combining these. Will be done. The engine control ECU 13 controls the engine. The brake control ECU 14 controls the brake. The automatic driving ECU 15 recognizes the environment, gives an instruction to start the vehicle, and the like during automatic driving. The ADAS ECU 16 performs driving support control such as automatic braking. The airbag ECU 17 controls the airbag. The HVAC ECU 18 controls the air conditioning inside the vehicle. The vehicle management ECU 19 manages the vehicle state.

サーバ2は不図示のCPU,ROM,およびRAMを備え、ソフトウェア更新に必要な更新パッケージ5をゲートウェイ10に送信する。更新パッケージ5の構成は後述する。ゲートウェイ10は、更新パッケージ5に含まれるデータに基づいて各ECUのソフトウェアを更新する。 The server 2 includes a CPU, ROM, and RAM (not shown), and transmits the update package 5 required for software update to the gateway 10. The configuration of the update package 5 will be described later. The gateway 10 updates the software of each ECU based on the data included in the update package 5.

(ゲートウェイの構成)
図2(a)は、ゲートウェイ10のハードウェア構成を示すブロック図である。ゲートウェイ10は、マイコン101、FROM(FlashROM)102、CAN用の通信I/F104、およびEthernet用の通信I/F105を備える。
マイコン101は、CPU1011、SRAM1012、FROM1013、CAN通信コントローラ1014、およびEthernet通信コントローラ1015を備える。マイコン101のCPU1011は、FROM1013に格納されるプログラムを実行し、ゲートウェイ10内の他の構成要素を制御するとともに、車内ネットワークにより接続された他の機器とデータ送受信指示を行うなどしてゲートウェイ10を機能させる。
(Gateway configuration)
FIG. 2A is a block diagram showing a hardware configuration of the gateway 10. The gateway 10 includes a microcomputer 101, a FROM (FlashROM) 102, a communication I / F 104 for CAN, and a communication I / F 105 for Ethernet.
The microcomputer 101 includes a CPU 1011, an SRAM 1012, a FROM 1013, a CAN communication controller 1014, and an Ethernet communication controller 1015. The CPU 1011 of the microcomputer 101 executes a program stored in the FROM 1013, controls other components in the gateway 10, and gives a data transmission / reception instruction to other devices connected by the in-vehicle network to control the gateway 10. Make it work.

FROM102は、不揮発メモリであり、受信した更新パッケージ5が格納される。
通信I/F104は、CAN通信用のインタフェースであり、マイコン101の指示に基づき車内ネットワーク10bを介して、車内ネットワーク10bに接続されたECUとの間でデータの送受信を行う。
通信I/F105は、Ethernet通信用のインタフェースであり、マイコン101の指示に基づき車内ネットワーク10aを介して、車内ネットワーク10aに接続された機器との間でデータの送受信を行う。
The FROM 102 is a non-volatile memory, and the received update package 5 is stored in the FROM 102.
The communication I / F 104 is an interface for CAN communication, and data is transmitted / received to / from the ECU connected to the in-vehicle network 10b via the in-vehicle network 10b based on the instruction of the microcomputer 101.
The communication I / F 105 is an interface for Ethernet communication, and transmits / receives data to / from a device connected to the in-vehicle network 10a via the in-vehicle network 10a based on an instruction of the microcomputer 101.

図2(b)は、ゲートウェイ10上で動作するゲートウェイプログラム100の構成を示すブロック図である。
ゲートウェイ10の機能を実現するゲートウェイプログラム100は、マイコン101のFROM1013に格納されCPU1011により実行される。図2(b)では、機能的なまとまりをブロックとして表現しており、各ブロックが複数に分割されてもよいし、いくつかのブロックが統合されてもよい。また制御プログラムは、1つのソフトウェアにより実現されてもよいし、2以上のソフトウェアの組合せにより実現されてもよい。
ゲートウェイプログラム100は、更新制御部10001、更新データ管理部10002、更新状態管理部10003、リカバリ制御部10004、リカバリ制御情報管理部10005、車両状態管理部10006、および通信制御部10007を含む。
FIG. 2B is a block diagram showing a configuration of a gateway program 100 operating on the gateway 10.
The gateway program 100 that realizes the function of the gateway 10 is stored in the FROM 1013 of the microcomputer 101 and executed by the CPU 1011. In FIG. 2B, a functional group is represented as a block, and each block may be divided into a plurality of blocks, or some blocks may be integrated. Further, the control program may be realized by one software or may be realized by a combination of two or more softwares.
The gateway program 100 includes an update control unit 10001, an update data management unit 10002, an update status management unit 10003, a recovery control unit 10004, a recovery control information management unit 10005, a vehicle status management unit 10006, and a communication control unit 10007.

更新制御部10001は、通信制御部10007を介して車内ネットワーク10aに接続された機器と通信を行い、更新パッケージ5の取得や車両の状態やソフトウェア更新処理の状況の送信を行う。更新制御部10001が取得した更新パッケージ5は、FROM102に格納される。詳しくは後述するが、更新パッケージ5は、更新制御情報501とリカバリ制御情報502とから構成される。また更新制御部10001は、通信制御部10007を介して車内ネットワーク10bに接続された機器と通信を行い、ECUを制御してECUに搭載されるソフトウェアを更新する。ここで、ソフトウェアの更新は、更新データ管理部10002を介して取得した更新制御情報501と車両状態管理部10006を介して取得した車両システム状態に基づいて実施される。 The update control unit 10001 communicates with the device connected to the in-vehicle network 10a via the communication control unit 10007, acquires the update package 5, and transmits the vehicle status and the software update processing status. The update package 5 acquired by the update control unit 10001 is stored in the FROM 102. As will be described in detail later, the update package 5 is composed of update control information 501 and recovery control information 502. Further, the update control unit 10001 communicates with the device connected to the in-vehicle network 10b via the communication control unit 10007, controls the ECU, and updates the software mounted on the ECU. Here, the software update is performed based on the update control information 501 acquired via the update data management unit 10002 and the vehicle system state acquired via the vehicle state management unit 10006.

更新データ管理部10002は、FROM102から更新制御情報501を取得し、更新制御部10001に提供する。
更新状態管理部10003は、更新制御部10001から更新状態を取得し、FROM1013に更新状態D1として格納する。また、格納した更新状態D1をリカバリ制御部10004に提供する。
リカバリ制御部10004は、通信制御部10007を介して車内ネットワーク10bに接続された機器と通信を行い、ECUを制御してソフトウェアのリカバリ処理を実施する。ここで、ECUのリカバリ処理は、更新状態管理部10003を介して取得した更新状態D1と、リカバリ制御情報管理部10005を介して取得したリカバリ制御情報502と、車両状態管理部10006を介して取得した車両システム状態に基づいて実施される。
The update data management unit 10002 acquires the update control information 501 from the FROM 102 and provides it to the update control unit 10001.
The update state management unit 1003 acquires the update state from the update control unit 10001 and stores it in the FROM 1013 as the update state D1. Further, the stored update state D1 is provided to the recovery control unit 1004.
The recovery control unit 1004 communicates with a device connected to the in-vehicle network 10b via the communication control unit 10007, and controls the ECU to perform software recovery processing. Here, the recovery process of the ECU is acquired via the update state D1 acquired via the update state management unit 1003, the recovery control information 502 acquired via the recovery control information management unit 10055, and the vehicle state management unit 10006. It is carried out based on the vehicle system condition.

リカバリ制御情報管理部10005は、FROM102からリカバリ制御情報502を取得し、リカバリ制御部10004に提供する。
車両状態管理部10006は、通信制御部10007を介して車内ネットワーク10aおよび10bに接続された機器と通信を行い車両システムの状態を取得し、車両状態を更新制御部10001及びリカバリ制御部10004に提供する。車両状態とはたとえば、イグニッションのオンやオフ、走行の開始などである。
The recovery control information management unit 10005 acquires the recovery control information 502 from the FROM 102 and provides it to the recovery control unit 1004.
The vehicle state management unit 10006 communicates with the devices connected to the in-vehicle networks 10a and 10b via the communication control unit 10007 to acquire the state of the vehicle system, and provides the vehicle state to the update control unit 10001 and the recovery control unit 10004. To do. The vehicle state is, for example, the on / off of the ignition, the start of running, and the like.

通信制御部10007は、更新制御部10001等の指示に従って、CAN通信コントローラ1014およびEthernet通信コントローラ1015を制御し、車内ネットワーク10aおよび10bに接続された機器と通信を行う。車内ネットワーク10aに接続された機器と通信する際には、通信制御部10007は、TCP/IPやUDP/IPなどのパケットを解析・生成する。また車内ネットワーク10aに接続された機器と通信する際には、通信制御部10007は、CANフレームを解析・生成する。また通信制御部10007は、Universal Diagnostic Service(UDS)等の診断通信プロトコルに準拠したコマンドの生成・解析を行う。 The communication control unit 10007 controls the CAN communication controller 1014 and the Ethernet communication controller 1015 in accordance with instructions from the update control unit 10001 and the like, and communicates with the devices connected to the in-vehicle networks 10a and 10b. When communicating with a device connected to the in-vehicle network 10a, the communication control unit 10007 analyzes and generates packets such as TCP / IP and UDP / IP. Further, when communicating with a device connected to the in-vehicle network 10a, the communication control unit 10007 analyzes and generates a CAN frame. In addition, the communication control unit 10007 generates and analyzes commands conforming to a diagnostic communication protocol such as Unified Digital Services (UDS).

図3は、ゲートウェイ10の更新状態管理部10003が管理する更新状態D1の一例を示す図である。図3では、更新状態D1をテーブルとして管理し、ECU毎の更新状態を記録する場合の例が示されている。
更新状態D1は、ECU ID D101、更新開始状態D102、処理中ブロックD103、完了コマンドD104、成功ブロックD105のフィールドを備える。
FIG. 3 is a diagram showing an example of the update state D1 managed by the update state management unit 1003 of the gateway 10. FIG. 3 shows an example in which the update state D1 is managed as a table and the update state for each ECU is recorded.
The update state D1 includes fields of the ECU ID D101, the update start state D102, the processing block D103, the completion command D104, and the success block D105.

ECU ID D101は、ECUを識別するための情報が格納されるフィールドである。更新開始状態D102は、当該ECUの更新処理が開始済みかどうかを示す識別情報が格納されるフィールドであり、たとえば「開始未」、「開始済み」または「更新完」が格納される。処理中ブロックD103は、当該ECUの更新処理において、処理中のブロックの識別情報が格納されるフィールドであり、ブロック番号等が格納される。完了コマンドD104は、当該ECUの更新処理において、最後に成功したコマンドの識別情報が格納されるフィールドであり、「データ転送開始要求」等のコマンド識別情報が格納される。成功ブロックD105は、処理が成功したブロックの識別情報が格納されるフィールドであり、ブロック番号等が格納される。 The ECU ID D101 is a field in which information for identifying the ECU is stored. The update start state D102 is a field in which identification information indicating whether or not the update process of the ECU has been started is stored, and for example, "not started", "started", or "update completed" is stored. The processing block D103 is a field in which the identification information of the block being processed is stored in the update processing of the ECU, and the block number and the like are stored. The completion command D104 is a field in which the identification information of the last successful command in the update process of the ECU is stored, and the command identification information such as "data transfer start request" is stored. The success block D105 is a field in which the identification information of the block in which the processing is successful is stored, and the block number and the like are stored.

レコードD11は自動運転ECU15の更新状態を示すレコードであり、ECU ID D101のフィールドには「自動運転ECU」が格納され、更新開始状態D102のフィールドには更新処理中であることを示す「開始済み」が格納され、処理中ブロックD103のフィールドにはブロックn−1が処理中であることを示す「Block n−1」が格納され、完了コマンドD104のフィールドには、データ転送開始要求が受諾済みであることを示す「データ転送開始要求」が格納され、成功ブロックD105のフィールドには最後に処理完了したブロックがブロックnであることを示す「Block n」が格納されている。 The record D11 is a record indicating the update status of the automatic operation ECU 15, and the field of the ECU ID D101 stores the “automatic operation ECU”, and the field of the update start state D102 indicates that the update process is in progress. Is stored, "Block n-1" indicating that block n-1 is being processed is stored in the field of the processing block D103, and the data transfer start request has been accepted in the field of the completion command D104. A "data transfer start request" indicating that the data is transferred is stored, and a "Block n" indicating that the last block completed for processing is the block n is stored in the field of the success block D105.

レコードD12は、エンジン制御ECU13の更新状態を示すレコードであり、ECU ID D101のフィールドには「エンジン制御ECU」が格納され、更新開始状態D102のフィールドには更新処理を開始していないことを示す「開始未」が格納されている。ここでは、エンジン制御ECUの更新は開始されていないため、レコードD12の他のフィールドには値が設定されていない。
ここではレコードD11とレコードD12の2つのレコードを説明したが、これらのレコードは次の場合に作成される。すなわち、ゲートウェイ10が受信した更新パッケージ5において、更新対象のECUとして記載されていた場合に作成される。またこの更新状態D1は後述するように逐次記録される。このように、更新状態D1を逐次記録することにより、更新中断後に正常に復帰して起動した際に更新が完了せずに中断していることや、更新が中断された箇所を認識して適切なリカバリ処理を開始することができる。
The record D12 is a record indicating the update state of the engine control ECU 13, and indicates that the “engine control ECU” is stored in the field of the ECU ID D101 and the update process is not started in the field of the update start state D102. "Not started" is stored. Here, since the update of the engine control ECU has not been started, no value is set in the other fields of the record D12.
Here, two records, record D11 and record D12, have been described, but these records are created in the following cases. That is, it is created when the update package 5 received by the gateway 10 is described as the ECU to be updated. Further, this update state D1 is sequentially recorded as described later. By sequentially recording the update status D1 in this way, it is appropriate to recognize that the update is interrupted without being completed when the update is restored to normal and started after the update is interrupted, and the location where the update is interrupted is recognized. Recovery process can be started.

(ECUの構成)
図4(a)は、エンジン制御ECU13のハードウェア構成例を示すブロック図である。ただし本実施の形態においてソフトウェアが更新される対象となるECUはいずれも、少なくとも図4(a)に示すハードウェア構成を備える。エンジン制御ECU13は、マイコン131、およびCAN用の通信I/F133を備える。
マイコン131は、CPU1311、SRAM1312、FROM1313、通信コントローラ1314、およびI/Oコントローラ1315を備える。マイコン131は、FROM1313に格納される制御プログラムを実行し、エンジン制御ECU13内の他の構成要素やI/Oを介して接続されたセンサ/アクチュエータ132を制御するとともに、車内ネットワークで接続された他の機器とデータ送受信指示を行うなどしてエンジン制御を実施する。センサ/アクチュエータ132は、マイコン131の指示によってエンジン制御に必要となるデータを取得しつつ、エンジンの制御を実行する。
(Ignition configuration)
FIG. 4A is a block diagram showing a hardware configuration example of the engine control ECU 13. However, in each of the ECUs to which the software is updated in the present embodiment has at least the hardware configuration shown in FIG. 4A. The engine control ECU 13 includes a microcomputer 131 and a communication I / F 133 for CAN.
The microcomputer 131 includes a CPU 1311, SRAM 1312, FROM 1313, a communication controller 1314, and an I / O controller 1315. The microcomputer 131 executes a control program stored in the FROM 1313 to control other components in the engine control ECU 13 and a sensor / actuator 132 connected via I / O, and is connected by an in-vehicle network. Engine control is performed by instructing data transmission / reception with the equipment of. The sensor / actuator 132 executes engine control while acquiring data required for engine control according to instructions from the microcomputer 131.

図4(b)は、エンジン制御ECU13上で動作する制御プログラム130の構成を示すブロック図である。ただし本実施の形態においてソフトウェアが更新される対象となるECUはいずれも、少なくとも図4(b)に示す制御プログラム130と同様の構成を備える。
ECU13の機能を実現する制御プログラム130は、マイコン131のFROM1313に格納されCPU1311で実行される。図4(b)では、機能的なまとまりをブロックとして表現しており、各ブロックが複数に分割されてもよいし、いくつかのブロックが統合されてもよい。また制御プログラムは、1つのソフトウェアにより実現されてもよいし、2以上のソフトウェアの組合せにより実現されてもよい。
FIG. 4B is a block diagram showing a configuration of a control program 130 that operates on the engine control ECU 13. However, in each of the ECUs to which the software is updated in the present embodiment has at least the same configuration as the control program 130 shown in FIG. 4B.
The control program 130 that realizes the functions of the ECU 13 is stored in the FROM 1313 of the microcomputer 131 and executed by the CPU 1311. In FIG. 4B, a functional group is represented as a block, and each block may be divided into a plurality of blocks, or some blocks may be integrated. Further, the control program may be realized by one software or may be realized by a combination of two or more softwares.

制御プログラム130は、更新制御部13001、差分/圧縮復元部13002、更新状態管理部13003、FROM制御部13004、通信制御部13005、および制御処理部13006を備える。
更新制御部13001は、通信制御部10005を介してゲートウェイ10からの動作指令やソフトウェアの更新に用いるデータを受信し、差分/圧縮復元部13002およびFROM制御部13004を制御してソフトウェアの更新を制御する。差分/圧縮復元部13002は、更新制御部13001の指示に従い、受信した差分データや圧縮データから最新版のソフトウェア、すなわちバージョン3のソフトウェアを復元する。
The control program 130 includes an update control unit 13001, a difference / compression restoration unit 13002, an update state management unit 13003, an FROM control unit 13004, a communication control unit 13005, and a control processing unit 13006.
The update control unit 13001 receives an operation command from the gateway 10 and data used for software update via the communication control unit 10005, and controls the difference / compression restoration unit 13002 and the FROM control unit 13004 to control the software update. To do. The difference / compression / restoration unit 13002 restores the latest version of the software, that is, the version 3 software, from the received difference data or compressed data according to the instruction of the update control unit 13001.

更新状態管理部13003は、更新制御部13001から更新状態を取得し、FROM1313に更新状態D21として格納する。また、格納した更新状態D21を更新制御部13001に提供する。FROM制御部13004は、更新制御部13001の指示に従い、最新版のソフトウェアをFROM1313に書き込む。通信制御部13005は、更新制御部13001等の指示に従って、通信コントローラ1314を制御し、車内ネットワーク10bに接続された機器と通信を行う。通信の際には、CANフレームを解析・構成する。また通信制御部13005は、UDS等の診断通信プロトコルに準拠したコマンドの生成・解析を行う。制御処理部13006は、I/Oコントローラ1315を制御し、センサ/アクチュエータ132を制御してエンジン制御を実施する。 The update state management unit 13003 acquires the update state from the update control unit 13001 and stores it in the FROM 1313 as the update state D21. Further, the stored update state D21 is provided to the update control unit 13001. The FROM control unit 13004 writes the latest version of the software to the FROM 1313 according to the instruction of the update control unit 13001. The communication control unit 13005 controls the communication controller 1314 according to the instruction of the update control unit 13001 or the like, and communicates with the device connected to the in-vehicle network 10b. At the time of communication, the CAN frame is analyzed and configured. Further, the communication control unit 13005 generates and analyzes a command based on a diagnostic communication protocol such as UDS. The control processing unit 13006 controls the I / O controller 1315 and controls the sensor / actuator 132 to perform engine control.

図5は、ECUのFROMの構成例を示す構成図である。FROM1313の容量の多少に基づき2とおりの構成を説明する。ただし以下では、FROM1313の容量が多いことを「メモリが多い」とも呼び、FROM1313の容量が少ないことを「メモリが少ない」とも呼ぶ。FROM1313の容量の多少、すなわちECUのメモリが多いか少ないかは、FROM1313の実用量、FROM1313に格納されるプログラムのサイズ、FROM1313に格納されるプログラムの性質、FROM1313に格納されるデータ量の傾向などに基づき判断される。一般に複雑な処理を実行するECUは本実施の形態におけるメモリが多いECUに分類され、簡素な処理のみを実行するECUは本実施の形態におけるメモリが少ないECUに分類される。たとえば、エンジン制御ECU13、ブレーキ制御ECU14、HVAC ECU18、エアバッグECU17などはメモリの少ないECUに分類されることが多く、自動運転ECU15、ADAS ECU16などはメモリが多いECUに分類されることが多い。 FIG. 5 is a configuration diagram showing a configuration example of the FROM of the ECU. Two configurations will be described based on the amount of capacity of the FROM 1313. However, in the following, a large capacity of the FROM 1313 is also referred to as "a large amount of memory", and a small capacity of the FROM 1313 is also referred to as a "small amount of memory". Whether the capacity of the FROM 1313 is large or small, that is, whether the memory of the ECU is large or small depends on the practical amount of the FROM 1313, the size of the program stored in the FROM 1313, the nature of the program stored in the FROM 1313, the tendency of the amount of data stored in the FROM 1313, and the like. Judgment is based on. Generally, an ECU that executes complicated processing is classified as an ECU having a large memory in the present embodiment, and an ECU that executes only a simple processing is classified as an ECU having a small memory in the present embodiment. For example, the engine control ECU 13, the brake control ECU 14, the HVAC ECU 18, the airbag ECU 17, and the like are often classified as an ECU having a small memory, and the automatic operation ECU 15, the ADAS ECU 16 and the like are often classified as an ECU having a large memory.

図5(a)は容量が少ない場合のFROM1313の構成例である。
FROM1313は、プログラムエリア1313aP0およびDataエリア1313aD0から構成される。
プログラムエリア1313aP0は、複数のブロックBlock0〜BlockNで構成され、ブートローダP1と制御プログラムP2が格納される。この制御プログラムP2のバージョンは、現行のバージョン2(図中では「Ver.2」と記載)である。Dataエリア1313aD0には、パラメータD2が格納される。パラメータD2は、更新状態D21、および制御パラメータD22を含む。更新状態D21は、ソフトウェア更新の進捗等の状態を示す情報であり、後に詳述する。制御パラメータD22は、ECU本来のエンジン制御やブレーキ制御のために利用するパラメータ群である。
FIG. 5A is a configuration example of FROM 1313 when the capacity is small.
The FROM 1313 is composed of a program area 1313aP0 and a Data area 1313aD0.
The program area 1313aP0 is composed of a plurality of blocks Block0 to BlockN, and stores the boot loader P1 and the control program P2. The version of this control program P2 is the current version 2 (described as "Ver.2" in the figure). The parameter D2 is stored in the Data area 1313aD0. Parameter D2 includes update state D21 and control parameter D22. The update state D21 is information indicating a state such as the progress of software update, and will be described in detail later. The control parameter D22 is a group of parameters used for the original engine control and brake control of the ECU.

図5(b)は、容量が多い場合のFROM1313の構成例である。
FROM1313は、プログラムエリアおよびDataエリア1313bD0から構成される。プログラムエリアは2つの領域、すなわちBANK0とBANK1から構成され、以下ではそれぞれをプログラムエリア1313bP0、プログラムエリア1313bP1と呼ぶ。
FIG. 5B is a configuration example of FROM 1313 when the capacity is large.
The FROM 1313 is composed of a program area and a Data area 1313bD0. The program area is composed of two areas, namely BANK0 and BANK1, which are referred to as program area 1313bP0 and program area 1313bP1, respectively.

プログラムエリア1313bP0、およびプログラムエリア1313bP1は、それぞれ複数のブロックBlock0〜BlockNから構成される。プログラムエリア1313bP0にはブートローダP3と制御プログラムP4が格納される。この制御プログラムP4のバージョンは、現行のバージョン2である。また、プログラムエリア1313bP1には制御プログラムP5が格納される。この制御プログラムP5のバージョンは、旧版のバージョン1である。
Dataエリア1313bD0には、パラメータD3が格納される。パラメータD3は、更新状態D21、制御パラメータD22、および起動情報D33を含む。
起動情報D33には、2つのプログラムエリアのいずれに記録された制御プログラムを実行するかが設定され、たとえば「プログラムエリア1313bP0」や「プログラムエリア1313bP1」が設定される。更新状態D21、および制御パラメータD22は前述のとおりである。
The program area 1313bP0 and the program area 1313bP1 are each composed of a plurality of blocks Block0 to BlockN. The boot loader P3 and the control program P4 are stored in the program area 1313bP0. The version of this control program P4 is the current version 2. Further, the control program P5 is stored in the program area 1313bP1. The version of this control program P5 is version 1 of the old version.
The parameter D3 is stored in the Data area 1313bD0. Parameter D3 includes update state D21, control parameter D22, and activation information D33.
In the start information D33, which of the two program areas to execute the control program recorded is set, and for example, "program area 1313bP0" and "program area 1313bP1" are set. The update state D21 and the control parameter D22 are as described above.

図6(a)は、ゲートウェイ10がサーバ2から取得する更新パッケージ5の構成例である。更新パッケージ5は、更新制御情報501とリカバリ制御情報502から構成される。
更新制御情報501は、1つの共通更新制御情報5011と、1つ以上のECU更新制御情報5012と、1つ以上のECU更新データ5013から構成される。ECU更新制御情報5012、およびECU更新データ5013は、更新対象であるECUごとに存在し、共通更新制御情報5011は更新対象であるECUの台数に関わらず1つのみ存在する。
共通更新制御情報5011には、車両システム全体の状態確認に用いられる手順や閾値等の情報が含まれる。たとえば共通更新制御情報5011には、更新開始に必要な状態確認として、電池残量の確認や開始可能な残量閾値、HVACの有無の確認、車両走行状態の確認、に必要なECU IDやCAN ID、確認コマンドの情報が含まれる。
FIG. 6A is a configuration example of the update package 5 acquired by the gateway 10 from the server 2. The update package 5 is composed of update control information 501 and recovery control information 502.
The update control information 501 is composed of one common update control information 5011, one or more ECU update control information 5012, and one or more ECU update data 5013. The ECU update control information 5012 and the ECU update data 5013 exist for each ECU to be updated, and only one common update control information 5011 exists regardless of the number of ECUs to be updated.
The common update control information 5011 includes information such as a procedure and a threshold value used for checking the state of the entire vehicle system. For example, in the common update control information 5011, the ECU ID and CAN required for confirming the remaining battery level, the remaining threshold value that can be started, the presence / absence of HVAC, and the vehicle running state as the state confirmation required for starting the update. Contains ID and confirmation command information.

ECU更新制御情報5012は、更新対象のECUごとに構成され、ECU更新制御情報5012にはそれぞれのECUのチェック項目や更新制御手順の情報が含まれる。
ECU更新データ5013は、更新対象のECU毎に構成されるECUのソフトウェア更新に用いられるデータであり、たとえばソフトウェアそのもの、圧縮されたソフトウェアまたは新旧ソフトウェアの差分データである。
The ECU update control information 5012 is configured for each ECU to be updated, and the ECU update control information 5012 includes information on check items and update control procedures of each ECU.
The ECU update data 5013 is data used for software update of the ECU configured for each ECU to be updated, and is, for example, software itself, compressed software, or difference data between old and new software.

リカバリ制御情報502は、1つ以上のECUリカバリ制御情報5021から構成され、1つ以上のECUリカバリデータ5022を含む場合がある。ECUリカバリ制御情報5021は更新対象であるECUごとに存在し、ECUリカバリデータ5022はECUリカバリ制御情報5021の内容に基づき存在の有無が決定される。すなわちECUリカバリデータ5022は、最大でECUリカバリ制御情報5021と同数だけ存在し、最小でゼロである。
ECUリカバリデータ5022は、ECUのリカバリに追加データが必要な場合に付与されるデータであり、ソフトウェアそのもの、圧縮されたソフトウェアまたはBlock単位でソフトウェアのXORから生成したバックアップデータ等を備える。
The recovery control information 502 is composed of one or more ECU recovery control information 5021, and may include one or more ECU recovery data 5022. The ECU recovery control information 5021 exists for each ECU to be updated, and the presence or absence of the ECU recovery data 5022 is determined based on the contents of the ECU recovery control information 5021. That is, the maximum number of ECU recovery data 5022 is the same as that of the ECU recovery control information 5021, and the minimum is zero.
The ECU recovery data 5022 is data to be added when additional data is required for the recovery of the ECU, and includes the software itself, compressed software, backup data generated from the XOR of the software in Block units, and the like.

図6(b)は、ECUリカバリ制御情報5021の構成を示す図である。ECUリカバリ制御情報5021は、ECUを識別するECU ID50211、リカバリを開始するタイミングを示す開始タイミング50212、HMI12の表示装置において画面表示する内容を示す表示内容50213、リカバリの方式であるリカバリ方式50214、および追加のリカバリデータを取得するためのリカバリデータURI50215から構成される。
ECU ID50211は、ECUを識別するための情報である。リカバリ開始タイミング50212は、ゲートウェイ10によるリカバリ処理を開始するタイミングを示す。リカバリ開始タイミング50212はたとえば、システムが異常から復旧した直後を示す「即時」、走行を開始して電源供給が安定した後を示す「走行開始」、次にエンジンが動作状態から停止状態に遷移するときを示す「IGN−OFF」などが設定される。
FIG. 6B is a diagram showing the configuration of the ECU recovery control information 5021. The ECU recovery control information 5021 includes the ECU ID 5021 that identifies the ECU, the start timing 50212 that indicates the timing to start recovery, the display content 50213 that indicates the content to be displayed on the screen on the display device of the HMI 12, the recovery method 50214 that is the recovery method, and It consists of recovery data URI50215 for acquiring additional recovery data.
The ECU ID 50221 is information for identifying the ECU. The recovery start timing 50212 indicates the timing at which the recovery process by the gateway 10 is started. The recovery start timing 50212 is, for example, "immediate" indicating immediately after the system has recovered from an abnormality, "starting running" indicating after starting running and stabilizing the power supply, and then the engine transitions from the operating state to the stopped state. “IGN-OFF” or the like indicating the time is set.

表示内容50213は、システムが異常から復旧した際等にユーザに提示するメッセージが格納された表示メッセージ情報、および表示内容の概要が格納される。表示内容の概要とは、たとえば「注意喚起」、「警告」、および「緊急」である。表示内容50213に基づき表示される具体的な例は後述する。
リカバリ方式50214は、当該ECUに対してどのような手順でリカバリを行うかを示し、「差分リジューム」、「圧縮リカバリ」、「サーバ連携」、「ブロックリカバリ」、などが設定される。「差分リジューム」は、異常中断した箇所から差分更新を再開するリカバリ処理の方式である。「圧縮リカバリ」は、圧縮されたソフトウェアをリカバリ制御情報502にECUリカバリデータ5022として同梱し、これを用いてソフトウェア全体を置き換えるいわゆるフル更新を行うリカバリ処理の方式である。「サーバ連携」は、サーバ2から圧縮されたソフトウェアを再ダウンロードしていわゆるフル更新を行うリカバリ処理の方式である。「ブロックリカバリ」は、ソフトウェアを複数のブロックに分割し各ブロックのXORを算出して得られたブロックXORデータをECUリカバリデータ5022として同梱し、ソフトウェアの欠損部分をブロックXORデータと欠損のないブロックから回復するリカバリ処理の方式である。
The display content 50213 stores display message information in which a message to be presented to the user when the system recovers from an abnormality, and an outline of the display content are stored. The outline of the displayed contents is, for example, "warning", "warning", and "urgent". Specific examples displayed based on the display content 50213 will be described later.
The recovery method 50214 indicates the procedure for recovering the ECU, and "differential resume", "compression recovery", "server cooperation", "block recovery", and the like are set. "Difference resume" is a recovery processing method that restarts the difference update from the abnormally interrupted location. "Compressed recovery" is a recovery processing method in which compressed software is bundled with recovery control information 502 as ECU recovery data 5022, and the entire software is replaced by using this, so-called full update. "Server cooperation" is a recovery processing method in which compressed software is re-downloaded from the server 2 and so-called full update is performed. In "block recovery", the software is divided into a plurality of blocks, the block XOR data obtained by calculating the XOR of each block is bundled as ECU recovery data 5022, and the missing part of the software is not lost with the block XOR data. This is a recovery processing method that recovers from a block.

リカバリデータURI50215には、リカバリ方式50214が「サーバ連携」である場合に、ゲートウェイ10がリカバリデータを取得するURIが設定される。リカバリ方式50214が「サーバ連携」以外の場合は、リカバリデータURI50215は情報が設定されていないことを意味する「NULL」が設定される。なおこのURIが示すリソースが格納されている場所は、サーバ2でもよいしサーバ2以外でもよい。 The recovery data URI 50215 is set to the URI in which the gateway 10 acquires the recovery data when the recovery method 50214 is "server cooperation". When the recovery method 50214 is other than "server cooperation", the recovery data URI50215 is set to "Null" which means that no information is set. The location where the resource indicated by this URI is stored may be server 2 or other than server 2.

図7は、エンジン制御ECU13のソフトウェアを更新する更新処理全体の流れを示すシーケンス図である。ここではエンジン制御ECU13のみが更新対象であり、他のECUは更新対象ではないとして説明する。
サーバ2のオペレータは、エンジン制御ECU13の新たなソフトウェアが作成されると、このソフトウェアをエンジン制御ECU13に配信するための準備を行い、更新パッケージ5を作成してサーバ2に登録する(S1)。なお更新パッケージ5の作成はオペレータが行ってもよいし、作成された新たなソフトウェアと設定ファイルに基づきサーバ2が行ってもよい。
FIG. 7 is a sequence diagram showing the flow of the entire update process for updating the software of the engine control ECU 13. Here, it will be described that only the engine control ECU 13 is the update target, and the other ECUs are not the update targets.
When new software for the engine control ECU 13 is created, the operator of the server 2 prepares to distribute this software to the engine control ECU 13, creates an update package 5, and registers it in the server 2 (S1). The update package 5 may be created by the operator, or may be created by the server 2 based on the created new software and the setting file.

配信準備完了後、エンジン起動時などにゲートウェイ10は、通信モジュール11を介してサーバ2から更新パッケージ5をダウンロードしてゲートウェイ10のFROM102に保持する(S2)。その後、エンジン状態が起動中から停止に状態が遷移したときなどに、更新対象であるエンジン制御ECU13のバージョンのチェック、更新対象のECUの状態取得、およびHMI12を用いたユーザへの承諾を得る前処理S3を実施したのち、エンジン制御ECU13のソフトウェア更新処理S4を行う。最後に、更新対象ECU13の書換え状態を確認する後処理S5を実施して、更新処理が完了する。更新処理である前処理S3、ソフトウェア更新処理S4、後処理S5の開始タイミングは、エンジン停止時以外にも、ダウンロード処理S2完了直後や、所定の時刻、などが考えられる。以下では符号S4で示したソフトウェア更新処理を詳細に説明する。 After the preparation for distribution is completed, the gateway 10 downloads the update package 5 from the server 2 via the communication module 11 and holds it in the FROM 102 of the gateway 10 when the engine is started (S2). After that, when the engine state changes from starting to stopping, the version of the engine control ECU 13 to be updated is checked, the state of the ECU to be updated is acquired, and before obtaining the consent of the user using the HMI 12. After performing the process S3, the software update process S4 of the engine control ECU 13 is performed. Finally, the post-processing S5 for confirming the rewriting state of the update target ECU 13 is performed to complete the update process. The start timing of the pre-process S3, software update process S4, and post-process S5, which are update processes, may be immediately after the completion of download process S2, a predetermined time, or the like, in addition to when the engine is stopped. Hereinafter, the software update process represented by reference numeral S4 will be described in detail.

図8は、図7のステップS4においてゲートウェイ10とエンジン制御ECU13の間で実行されるソフトウェア更新処理の流れを示すシーケンス図である。ここでは、エンジン制御ECU13を更新する例を示すが、本動作は基本的に他のECUでも同様である。図8では状況により必要となる処理を破線の矢印で示している。
以下の説明において、ゲートウェイ10におけるデータの送受信は通信制御部10007を介して行われるものとし、エンジン制御ECU13におけるデータの送受信は通信制御部13005を介して行われるものとする。
FIG. 8 is a sequence diagram showing a flow of software update processing executed between the gateway 10 and the engine control ECU 13 in step S4 of FIG. 7. Here, an example of updating the engine control ECU 13 is shown, but this operation is basically the same for other ECUs. In FIG. 8, the processing required depending on the situation is indicated by a broken line arrow.
In the following description, it is assumed that the transmission / reception of data in the gateway 10 is performed via the communication control unit 10007, and the transmission / reception of data in the engine control ECU 13 is performed via the communication control unit 13005.

最初に、ゲートウェイ10の更新制御部10001は、エンジン制御ECU13にセッション変更要求を送信する(S401)。このセッション変更要求は、ソフトウェア書換えを行うための特殊モードの識別情報を含む。エンジン制御ECU13の更新制御部13001は、ステップS402でゲートウェイ10から送信されたセッション変更要求を受信すると、セッション変更要求にて指定されたモードに内部状態を遷移させたのち、ゲートウェイ10に受諾応答を送信する(S402)。 First, the update control unit 10001 of the gateway 10 transmits a session change request to the engine control ECU 13 (S401). This session change request includes special mode identification information for software rewriting. When the update control unit 13001 of the engine control ECU 13 receives the session change request transmitted from the gateway 10 in step S402, the update control unit 13001 shifts the internal state to the mode specified by the session change request, and then sends an acceptance response to the gateway 10. Transmit (S402).

ゲートウェイ10の更新制御部10001は、ステップS402でエンジン制御ECU13から送信された受諾応答を受信すると、更新状態管理部10003を介して更新状態D1に更新適用処理を開始したことを記録する(S402R)。次に、ゲートウェイ10の更新制御部10001は、更新データ管理部10002を介してECU更新制御情報5012を読み出し、ECU更新制御情報5012に記述された処理ブロック毎の処理を開始する。すなわち更新制御部10001は、ECU更新制御情報5012に記述された最初の処理ブロックを特定し、当該ブロックを「処理中ブロック」として更新状態管理部10003を介して更新状態D1に記録する(S403R)。 When the update control unit 10001 of the gateway 10 receives the acceptance response transmitted from the engine control ECU 13 in step S402, it records that the update application process is started in the update state D1 via the update state management unit 1003 (S402R). .. Next, the update control unit 10001 of the gateway 10 reads the ECU update control information 5012 via the update data management unit 10002, and starts processing for each processing block described in the ECU update control information 5012. That is, the update control unit 10001 identifies the first processing block described in the ECU update control information 5012, and records the block as a “processing block” in the update state D1 via the update state management unit 1003 (S403R). ..

そして更新制御部10001は、エンジン制御ECU13に当該ブロックのデータ転送開始要求を送信する(S403)。このデータ転送開始要求は、たとえば、データフォーマット、送信予定のデータサイズ、送信したデータの書込み先を示す書込み先アドレス等の情報を含む。エンジン制御ECU13の通信制御部13005は、ステップS403でゲートウェイ10から送信されたデータ転送開始要求を受信すると、ゲートウェイ10に受諾応答を送信する(S404)。この受諾応答には、エンジン制御ECU13が一度に受信可能なデータサイズ等の情報が含まれる。ゲートウェイ10の更新制御部10001はこの受諾応答を受信すると、更新状態管理部10003を介して更新状態D1に成功したコマンドとして「データ転送開始要求」を記録する(S404R)。 Then, the update control unit 10001 transmits a data transfer start request for the block to the engine control ECU 13 (S403). This data transfer start request includes, for example, information such as a data format, a data size to be transmitted, and a write destination address indicating a write destination of the transmitted data. When the communication control unit 13005 of the engine control ECU 13 receives the data transfer start request transmitted from the gateway 10 in step S403, the communication control unit 13005 transmits an acceptance response to the gateway 10 (S404). This acceptance response includes information such as a data size that can be received by the engine control ECU 13 at one time. When the update control unit 10001 of the gateway 10 receives this acceptance response, it records a "data transfer start request" as a command that succeeds in the update state D1 via the update state management unit 1003 (S404R).

次に、ゲートウェイ10の更新制御部10001は、現在処理中のブロックに該当する更新データを更新データ5013から読み出し、エンジン制御ECU13が一度に受信可能なデータサイズに分割し、エンジン制御ECU13に送信する(S405)。ここで、送信データはさらにCANフレームに分割されて送信される。エンジン制御ECU13の更新制御部13001は、ステップS405でゲートウェイ10から送信されたデータを受信すると、差分/圧縮復元部13002に指示して復元処理S407を開始する。この復元処理S407は後に詳述する。ここで、復元処理に時間がかかる場合は、ゲートウェイ10に待機応答を送信する(S406)。エンジン制御ECU13の更新制御部13001は、復元処理S407が完了すると、ゲートウェイ10に受信応答S408を送信する。ゲートウェイ10とエンジン制御ECU13は、分割した現在処理中のブロックに該当する更新データの転送がすべて完了するまで、ステップS405からS408までの処理(転送処理S430)を繰り返す。 Next, the update control unit 10001 of the gateway 10 reads the update data corresponding to the block currently being processed from the update data 5013, divides the update data into data sizes that can be received by the engine control ECU 13 at one time, and transmits the update data to the engine control ECU 13. (S405). Here, the transmission data is further divided into CAN frames and transmitted. When the update control unit 13001 of the engine control ECU 13 receives the data transmitted from the gateway 10 in step S405, the update control unit 13001 instructs the difference / compression restoration unit 13002 to start the restoration process S407. This restoration process S407 will be described in detail later. Here, if the restoration process takes a long time, a standby response is transmitted to the gateway 10 (S406). When the restoration process S407 is completed, the update control unit 13001 of the engine control ECU 13 transmits a reception response S408 to the gateway 10. The gateway 10 and the engine control ECU 13 repeat the processes (transfer process S430) from steps S405 to S408 until all the transfer of the update data corresponding to the divided block currently being processed is completed.

ゲートウェイ10の更新制御部10001は、転送処理S430が完了すると、更新状態管理部10003を介して更新状態D1に成功したコマンドとして「データ転送」を記録し(S408R)、転送完了通知をエンジン制御ECU13に送信する(S409)。エンジン制御ECU13の更新制御部13001は、ステップS409でゲートウェイ10から送信された転送完了通知を受信すると、ステップS411においてFROM制御部13004にデータ書込み指示を行う。この指示に応じて、FROM制御部13004は、差分/圧縮復元部13002により復元され、SRAM1312またはFROM1313に一時的に格納されている新ソフトウェアまたはその一部をFROM1313に書き込む。ここで、FROM1313へのデータ書き込みに時間がかかる場合には、ゲートウェイ10に待機応答を送信する(S410)。更新制御部13001は、FROM1313への書込みに成功すると、更新状態管理部13003を介して、完了したブロックとして書きこんだブロックを更新状態D21に記録し(S411R)、ゲートウェイ10に受諾応答を送信する(S412)。 When the transfer process S430 is completed, the update control unit 10001 of the gateway 10 records "data transfer" as a command that succeeds in the update state D1 via the update state management unit 1003 (S408R), and sends a transfer completion notification to the engine control ECU 13. (S409). Upon receiving the transfer completion notification transmitted from the gateway 10 in step S409, the update control unit 13001 of the engine control ECU 13 issues a data writing instruction to the FROM control unit 13004 in step S411. In response to this instruction, the FROM control unit 13004 writes the new software or a part thereof, which is restored by the difference / compression restoration unit 13002 and temporarily stored in the SRAM 1312 or the FROM 1313, to the FROM 1313. Here, if it takes time to write the data to the FROM 1313, a standby response is transmitted to the gateway 10 (S410). When the update control unit 13001 succeeds in writing to the FROM 1313, the update control unit 13003 records the block written as a completed block in the update state D21 (S411R) via the update state management unit 13003, and transmits an acceptance response to the gateway 10. (S412).

ゲートウェイ10の更新制御部10001は、ステップS412でエンジン制御ECU13から送信された受諾応答を受信すると、更新状態管理部10003を介して更新状態D1に当該ブロックの書換え処理が完了したことを記録する(S412R)。ゲートウェイ10とエンジン制御ECU13は、処理対象の全ブロックに該当する転送および書き込み処理をすべて完了するまで、ステップS403RからS412Rまでの処理(ブロック復元・書込み処理S420)を繰り返す。処理対象の全ブロックの復元・書込み処理S420が完了すると、ゲートウェイ10の更新制御部10001は、更新状態管理部10003を介して更新状態D1に書き換え処理が完了したことを記録する(S415R)。 When the update control unit 10001 of the gateway 10 receives the acceptance response transmitted from the engine control ECU 13 in step S412, it records in the update state D1 that the rewriting process of the block is completed via the update state management unit 1003. S412R). The gateway 10 and the engine control ECU 13 repeat the processes (block restoration / write process S420) from steps S403R to S412R until all the transfer and write processes corresponding to all the blocks to be processed are completed. When the restoration / writing process S420 of all the blocks to be processed is completed, the update control unit 10001 of the gateway 10 records that the rewrite process is completed in the update state D1 via the update state management unit 1003 (S415R).

次に、ゲートウェイ10の更新制御部10001は、エンジン制御ECU13にセッション変更要求を送信する(S413)。このセッション変更要求は、通常モードに復帰するための通常モードの識別情報を含む。エンジン制御ECU13の更新制御部13001は、ステップS413でゲートウェイ10から送信されたセッション変更要求を受信すると、セッション変更要求にて指定された通常モードに内部状態を遷移させたのち、ゲートウェイ10に受諾応答を送信する(S414)。
このように、更新状態を逐次記録することで、更新中断後、正常に復して起動した時に更新が完了せずに中断していること、および更新がどこまで進んだ状態で中断したか、を認識して適切なリカバリ処理を開始することができる。
Next, the update control unit 10001 of the gateway 10 transmits a session change request to the engine control ECU 13 (S413). This session change request includes the identification information of the normal mode for returning to the normal mode. When the update control unit 13001 of the engine control ECU 13 receives the session change request transmitted from the gateway 10 in step S413, the update control unit 13001 shifts the internal state to the normal mode specified in the session change request, and then makes an acceptance response to the gateway 10. Is transmitted (S414).
In this way, by sequentially recording the update status, after the update is interrupted, when it is restored to normal and started, the update is interrupted without being completed, and how far the update has been interrupted can be determined. It can be recognized and the appropriate recovery process can be started.

図9は、ECUにおける復元処理S407の処理を示す概念図である。
図9(a)は、メモリの少ないECUにおける復元処理S407の処理を示す概念図である。差分/圧縮復元部13002は、更新制御部13001から復元指示を受けると、ゲートウェイ10から受信し、SRAM1312に格納された更新データ5013aの一部を読み出す。圧縮更新の場合は、更新データは圧縮されているため、これを伸長し復元領域D5にバージョン3の制御プログラムP22として出力する。差分更新の場合は、更新データは差分データであるため、差分/圧縮復元部13002はまず復元のために必要な現行のバージョン2の制御プログラムP21の一部または全部を読み出す。そして差分/圧縮復元部13002は、これらを組み合わせてバージョン3の制御プログラムP22を復元し、復元領域D5に出力する。
FIG. 9 is a conceptual diagram showing the processing of the restoration processing S407 in the ECU.
FIG. 9A is a conceptual diagram showing the processing of the restoration processing S407 in the ECU having a small memory. Upon receiving the restoration instruction from the update control unit 13001, the difference / compression restoration unit 13002 receives from the gateway 10 and reads a part of the update data 5013a stored in the SRAM 1312. In the case of compressed update, since the update data is compressed, it is decompressed and output to the restoration area D5 as the version 3 control program P22. In the case of differential update, since the update data is differential data, the differential / compression restoration unit 13002 first reads a part or all of the current version 2 control program P21 necessary for restoration. Then, the difference / compression restoration unit 13002 combines these to restore the version 3 control program P22 and outputs it to the restoration area D5.

なお、本実施の形態では復元領域D5は、FROM1313のDataエリア1313aD0内に確保しているが、たとえば、プログラムエリアの空き領域(1313aP0のBlockN)や、SRAM1312に確保してもよい。復元領域D5としてFROM1313のDataエリア1313aD0やプログラムエリアの空き領域(1313aP0のBlockN)を用いる場合は、Flashの消去・書込み中に更新が中断しても、途中から再開することができる。ただし、マイコン131の仕様によっては、Dataエリア1313aへのアクセスには時間がかかり、更新時間が長くなってしまう場合がある。また、マイコン131の仕様によっては、ソフトウェアの空きエリアは書換え可能な回数が少ない場合がある。また、SRAM1312を復元領域として利用する場合は、Flash書き込み処理S411時に中断した場合は差分リジュームによるリカバリ処理は行えない。復元されたバージョン3の制御プログラムP22は、図8のFlash書き込み処理S411において、更新制御部13001がFROM制御部13004を介し、FROM1313の該当領域に上書きする。図9(a)では、更新制御部13001、およびFROM制御部13004は図示していない。 In the present embodiment, the restoration area D5 is secured in the Data area 1313aD0 of the FROM 1313, but may be secured in, for example, an empty area of the program area (BlockN of 1313aP0) or SRAM 1312. When the data area 1313aD0 of the FROM 1313 or the free area of the program area (BlockN of 1313aP0) is used as the restore area D5, even if the update is interrupted during the erasing / writing of Flash, it can be restarted from the middle. However, depending on the specifications of the microcomputer 131, it may take time to access the Data area 1313a and the update time may become long. Further, depending on the specifications of the microcomputer 131, the empty area of the software may be rewritten less frequently. Further, when SRAM 1312 is used as a restoration area, if it is interrupted at the time of Flash write processing S411, recovery processing by differential resume cannot be performed. In the restored version 3 control program P22, in the Flash writing process S411 of FIG. 8, the update control unit 13001 overwrites the corresponding area of the FROM 1313 via the FROM control unit 13004. In FIG. 9A, the update control unit 13001 and the FROM control unit 13004 are not shown.

以上のように、受信したデータを逐次復元することで、バージョン3の制御プログラムP22を再構成するために必要なすべての差分データを蓄積しなくても、差分更新を行うことができる。
ただし、差分データが十分小さくメモリの余剰領域に格納できる場合は、必ずしも本手順に従い逐次復元する必要はなく、すべてのデータを受信後に復元処理を開始してもよい。しかしながらいずれの場合においても、実行中の制御プログラムを上書きする必要があるため、更新が中断した場合、制御プログラムは正常に動作しなくなる。
As described above, by sequentially restoring the received data, the difference update can be performed without accumulating all the difference data necessary for reconstructing the version 3 control program P22.
However, if the difference data is sufficiently small and can be stored in the surplus area of the memory, it is not always necessary to sequentially restore according to this procedure, and the restoration process may be started after receiving all the data. However, in either case, it is necessary to overwrite the running control program, so if the update is interrupted, the control program will not operate normally.

図9(b)は、メモリが多いECUにおける復元処理S407の処理を示す概念図である。差分/圧縮復元部13002は、更新制御部13001から復元指示を受けると、ゲートウェイ10から受信し、SRAM1312に格納された更新データの一部5013bを読み出す。圧縮更新の場合は、更新データは圧縮されたソフトウェアであるため、これを伸長し復元領域D100にバージョン3の制御プログラムP52として出力する。本実施の形態では、復元領域D100は、SRAM1312に確保している。差分更新の場合は、更新データは差分データであるため、差分/圧縮復元部13002は復元のために必要な現行の制御プログラムP4の一部または全部を読み出しこれらを組み合わせてバージョン3の制御プログラムP52を復元し、復元領域D100に出力する。復元された新ソフトウェアP52は、図8のFlash書き込み処理S411において、更新制御部13001がFROM制御部13004を介し、FROM1313の該当領域に上書きする。ここでは、バージョン3の制御プログラムP52は、BANK1のバージョン1の制御プログラムP51を上書きする。また、ここでは、更新制御部13001、FROM制御部13004は図示していない。
以上のように、2つ分の制御プログラムを格納するメモリを備えたECUの更新を行う場合は、制御プログラムの格納領域を2重化し、現在実行している制御プログラムを格納している領域とは別の領域に制御プログラムを復元・格納することで、更新が中断した場合も、実行中の制御プログラムを破損せず、正常動作を継続することができる。
FIG. 9B is a conceptual diagram showing the processing of the restoration processing S407 in an ECU having a large amount of memory. Upon receiving the restoration instruction from the update control unit 13001, the difference / compression restoration unit 13002 receives the restoration instruction from the gateway 10 and reads out a part of the update data 5013b stored in the SRAM 1312. In the case of compressed update, since the update data is compressed software, it is decompressed and output to the restoration area D100 as the version 3 control program P52. In the present embodiment, the restoration area D100 is secured in the SRAM 1312. In the case of differential update, since the update data is differential data, the differential / compression restoration unit 13002 reads a part or all of the current control program P4 required for restoration, and combines these to control program P52 of version 3. Is restored and output to the restored area D100. In the restored new software P52, in the Flash writing process S411 of FIG. 8, the update control unit 13001 overwrites the corresponding area of the FROM 1313 via the FROM control unit 13004. Here, the version 3 control program P52 overwrites the BANK1 version 1 control program P51. Further, here, the update control unit 13001 and the FROM control unit 13004 are not shown.
As described above, when updating the ECU equipped with the memory for storing two control programs, the storage area of the control program is duplicated, and the area for storing the currently executed control program is used. By restoring and storing the control program in another area, even if the update is interrupted, the running control program is not damaged and normal operation can be continued.

図10は、ECUの起動シーケンス例である。
図10(a)は、メモリの少ないECUの起動シーケンス図である。
メモリの少ないECUでは、最初にブートローダP1が起動される(S601)。ブートローダP1は、プログラムエリアに格納されている制御プログラムP2を検証する(S602)。検証の結果、制御プログラムP2に問題がないと判断されると(S603:YES)制御プログラムP2が起動される(S604)。また、検証の結果、制御プログラムP2に問題があると判断すると、制御プログラムP2を実行せずに緊急モードとしてゲートウェイ10からの制御指示を待つ(S605)。この時、緊急モード特有の設定としてISO15765−2で規定される転送パラメータであるBlock Sizeを0に設定し、CANフレームのバースト転送を実施してもよい。これにより、通信の効率化を図ることができる。なお制御プログラムP2に問題があると判断する場合とは、たとえばソフトウェアが存在しない場合や、検証結果が異常な場合である。
FIG. 10 is an example of an ECU activation sequence.
FIG. 10A is a start-up sequence diagram of an ECU having a small memory.
In the ECU with a small memory, the boot loader P1 is started first (S601). The boot loader P1 verifies the control program P2 stored in the program area (S602). As a result of the verification, if it is determined that there is no problem in the control program P2 (S603: YES), the control program P2 is started (S604). Further, as a result of the verification, if it is determined that there is a problem in the control program P2, the control program P2 is not executed and the gateway 10 waits for a control instruction as an emergency mode (S605). At this time, the Block Size, which is a transfer parameter defined by ISO 15765-2, may be set to 0 as a setting peculiar to the emergency mode, and burst transfer of CAN frames may be performed. As a result, communication efficiency can be improved. The case where it is determined that there is a problem in the control program P2 is, for example, a case where the software does not exist or a case where the verification result is abnormal.

図10(b)は、メモリの多いECUの起動シーケンス図である。
メモリの多いECUでは、最初にブートローダP3が起動される(S651)。ブートローダP3はDataエリア1313bD0のパラメータD3内の起動情報D33を読み出し(S652)、起動情報D33に記録された制御プログラムを実行する(S653)。たとえば起動情報D33が「プログラムエリア1313bP0」である場合は、プログラムエリア1313bP0上のバージョン2の制御プログラムP4を実行する。
FIG. 10B is a start-up sequence diagram of an ECU having a large amount of memory.
In an ECU having a large memory, the boot loader P3 is started first (S651). The boot loader P3 reads the start information D33 in the parameter D3 of the Data area 1313bD0 (S652) and executes the control program recorded in the start information D33 (S653). For example, when the start information D33 is "program area 1313bP0", the version 2 control program P4 on the program area 1313bP0 is executed.

図11は、ゲートウェイ10が起動時に行うリカバリ制御処理を示すフローチャートである。
ゲートウェイ10のリカバリ制御部10004は、ゲートウェイ10が起動すると更新状態管理部10003を介して更新状態D1に記録された更新開始状態D102を取得する(S701)。リカバリ制御部10004は、更新が開始済みのECUが存在しない、すなわち、中断した更新がないと判断する場合(S702:NO)は、通常のゲートウェイ10の起動処理を行う(S713)。
FIG. 11 is a flowchart showing a recovery control process performed by the gateway 10 at startup.
When the gateway 10 is activated, the recovery control unit 1004 of the gateway 10 acquires the update start state D102 recorded in the update state D1 via the update state management unit 1003 (S701). When the recovery control unit 1004 determines that there is no ECU for which the update has been started, that is, there is no interrupted update (S702: NO), the recovery control unit 1004 performs a normal gateway 10 activation process (S713).

更新が開始済みのECUが存在する、すなわち、中断した更新があると判断する場合(S702:YES)は、リカバリ制御部10004は、サーバ2に中断した更新がある旨を通知する(S703)。そしてリカバリ制御部10004は、リカバリ制御情報管理部10005を介して、当該ECU IDに対応するECUリカバリ制御情報5021から、開始タイミング50212を取得する(S704)。
開始タイミング50212が「即時」であると判断する場合(S705:YES)は、リカバリ制御情報5021の表示内容50213に従って、HMI12に「緊急」の画面表示の指令を出力し(S706)、リカバリ処理を開始する(S707)。ただしこの場合はリカバリ処理を一刻も早く開始するために、HMI12への指令はリカバリ処理を開始してからでもよいし、2つの処理を同時に実行してもよい。リカバリ処理S707の詳細は後述する。
When it is determined that there is an ECU for which the update has been started, that is, there is an interrupted update (S702: YES), the recovery control unit 1004 notifies the server 2 that there is an interrupted update (S703). Then, the recovery control unit 1004 acquires the start timing 50212 from the ECU recovery control information 5021 corresponding to the ECU ID via the recovery control information management unit 10055 (S704).
When it is determined that the start timing 50212 is "immediate" (S705: YES), an "emergency" screen display command is output to the HMI 12 according to the display content 50213 of the recovery control information 5021 (S706), and the recovery process is performed. Start (S707). However, in this case, in order to start the recovery process as soon as possible, the command to the HMI 12 may be after the recovery process is started, or the two processes may be executed at the same time. Details of the recovery process S707 will be described later.

開始タイミング50212が「即時」以外の場合は、リカバリ制御情報5021の表示内容50213を取得し(S708)、表示内容が「注意喚起」であると判断する場合は、HMI12に「注意喚起」の画面表示要求を行う(S710)。
一方、表示内容が「警告」であると判断する場合は、HMI12に「警告」の画面表示要求を行う(S711)。画面表示要求送信後は、走行開始やIGN−OFF等の更新開始トリガを待つ(S712)。その後、更新開始のトリガイベント発生を検出したら、リカバリ処理を開始する(S707)。リカバリ処理S707が完了すると、通常起動処理を行う(S713)。
If the start timing 50212 is other than "immediate", the display content 50213 of the recovery control information 5021 is acquired (S708), and if it is determined that the display content is "warning", the "warning" screen is displayed on the HMI 12. Make a display request (S710).
On the other hand, when it is determined that the displayed content is "warning", a screen display request for "warning" is made to HMI 12 (S711). After transmitting the screen display request, it waits for an update start trigger such as running start or IGN-OFF (S712). After that, when the occurrence of the trigger event for starting the update is detected, the recovery process is started (S707). When the recovery process S707 is completed, a normal startup process is performed (S713).

図12は、第1の実施の形態におけるリカバリ処理S707の一例を示すフローチャートである。
ゲートウェイ10のリカバリ制御部10004は、リカバリ制御情報管理部10005を介して、当該ECU IDに対応するリカバリ制御情報5021から、リカバリ方式50214を取得し(S70701)、ステップS70702に進む。
リカバリ方式50214が「差分リジューム」であると判断する場合(S70702:YES)、リカバリ制御部10004は、更新状態管理部10003を介して更新状態D1に記録された処理中ブロックを取得し(S70703)、ECUとの間で当該ブロックから差分更新処理を再開する(S70704)。
FIG. 12 is a flowchart showing an example of the recovery process S707 according to the first embodiment.
The recovery control unit 1004 of the gateway 10 acquires the recovery method 50214 from the recovery control information 5021 corresponding to the ECU ID via the recovery control information management unit 10055 (S70701), and proceeds to step S70702.
When it is determined that the recovery method 50214 is "difference resume" (S70702: YES), the recovery control unit 1004 acquires the processing block recorded in the update state D1 via the update state management unit 1003 (S70703). , The difference update process is restarted from the block with the ECU (S70704).

リカバリ方式50214が「差分リジューム」ではないと判断する場合(S70702:NO)、リカバリ制御部10004はリカバリ方式50214が「サーバ連携」であるか否かを判断する。リカバリ方式50214が「サーバ連携」であると判断する場合(S70705:YES)、リカバリ制御部10004は、リカバリ制御情報管理部10005を介して、当該ECU IDに対応するリカバリ制御情報5021からリカバリデータURI50215を取得し(S70706)、当該URIからリカバリデータとして圧縮データを取得する(S70707)。 When it is determined that the recovery method 50214 is not "difference resume" (S70702: NO), the recovery control unit 1004 determines whether or not the recovery method 50214 is "server cooperation". When it is determined that the recovery method 50214 is "server cooperation" (S70705: YES), the recovery control unit 1004 receives the recovery data URI50215 from the recovery control information 5021 corresponding to the ECU ID via the recovery control information management unit 10055. (S70706), and the compressed data is acquired as recovery data from the URI (S70707).

リカバリ方式50214が「サーバ連携」ではないと判断する場合(S70705:NO)、リカバリ制御部10004は、リカバリ方式50214が「圧縮リカバリ」であるか否かを判断する。リカバリ方式50214が「圧縮リカバリ」であると判断する場合(S70709:YES)、リカバリ制御部10004は、リカバリ制御情報管理部10005を介して、当該ECU IDに対応するECUリカバリデータ5022から圧縮データを取得する(S70710)。
リカバリ制御部10004は、ステップS70707またはS70710で圧縮データを取得後、取得した圧縮データを用いてECUとの間でリカバリ処理を実施する(S70708)。
When it is determined that the recovery method 50214 is not "server cooperation" (S70705: NO), the recovery control unit 1004 determines whether or not the recovery method 50214 is "compressed recovery". When it is determined that the recovery method 50214 is "compressed recovery" (S70709: YES), the recovery control unit 1004 receives the compressed data from the ECU recovery data 5022 corresponding to the ECU ID via the recovery control information management unit 10055. Acquire (S70710).
The recovery control unit 1004 acquires the compressed data in step S70707 or S70710, and then performs a recovery process with the ECU using the acquired compressed data (S70708).

リカバリ方式50214が「圧縮リカバリ」ではないと判断する場合(S70709:NO)、リカバリ制御部10004は、リカバリ制御情報管理部10005を介して、当該ECU IDに対応するECUリカバリデータ5022からブロックXORデータを取得し(S70711)、ECUとの間でブロックリカバリによるリカバリ処理を実施する(S70712)。
このように、サーバ2から更新制御情報501と共に更新パッケージ5として送信されるリカバリ制御情報502に基づいて更新異常発生時のリカバリ制御処理を実行することで、リソースや特性の異なる多数のECUからなるシステムで更新異常が発生した場合も、車両システムへの影響に応じて、適切なタイミングでリカバリを開始し、更新中断によるシステムへの影響をユーザに的確に伝達し、更新対象のECUの特性に応じたリカバリシーケンスでリカバリ処理を実行して、ソフトウェアを正常に更新することができる。
When it is determined that the recovery method 50214 is not "compressed recovery" (S70709: NO), the recovery control unit 1004 passes through the recovery control information management unit 10055 and blocks XOR data from the ECU recovery data 5022 corresponding to the ECU ID. (S70711), and a recovery process by block recovery is performed with the ECU (S70712).
In this way, by executing the recovery control process when an update abnormality occurs based on the recovery control information 502 transmitted from the server 2 together with the update control information 501 as the update package 5, it is composed of a large number of ECUs having different resources and characteristics. Even if an update error occurs in the system, recovery is started at an appropriate timing according to the impact on the vehicle system, the impact on the system due to the interruption of the update is accurately communicated to the user, and the characteristics of the ECU to be updated The software can be updated normally by executing the recovery process according to the recovery sequence.

(動作例)
以下、図13〜図24を用いて、自動運転ECU15、ADAS ECU16、エンジン制御ECU13、ブレーキ制御ECU14、HVAC ECU18、エアバッグECU17のリカバリ処理の動作例を説明する。
(Operation example)
Hereinafter, an operation example of the recovery process of the automatic operation ECU 15, the ADAS ECU 16, the engine control ECU 13, the brake control ECU 14, the HVAC ECU 18, and the airbag ECU 17 will be described with reference to FIGS. 13 to 24.

(動作例―自動運転ECU)
図13および図14を用いて、自動運転ECU15に対応する更新パッケージ5aの構成、HMI12への表示例、および動作シーケンスを説明する。
図13(a)は更新対象が自動運転ECU15のみの場合の更新パッケージ5aの構成を示す図、図13(b)はその更新パッケージ5aに含まれる自動運転ECUリカバリ制御情報5021aの構成を示す図、図13(c)は自動運転ECUリカバリ制御情報5021aに基づくHMI12の表示例を示す図である。
(Operation example-Automatic operation ECU)
The configuration of the update package 5a corresponding to the automatic operation ECU 15, the display example on the HMI 12, and the operation sequence will be described with reference to FIGS. 13 and 14.
FIG. 13A is a diagram showing the configuration of the update package 5a when the update target is only the automatic operation ECU 15, and FIG. 13B is a diagram showing the configuration of the automatic operation ECU recovery control information 5021a included in the update package 5a. 13 (c) is a diagram showing a display example of the HMI 12 based on the automatic operation ECU recovery control information 5021a.

更新対象が自動運転ECU15のみの場合の更新パッケージ5aは、図13(a)に示すように、共通更新制御情報5011、自動運転ECU更新制御情報5012a、自動運転ECU更新データ5013aを含む更新制御情報501aと、自動運転ECUリカバリ制御情報5021aを含むリカバリ制御情報502aと、から構成される。
自動運転ECUリカバリ制御情報5021aは、図13(b)に示すように、ECU ID50211aには「自動運転ECU」が設定され、開始タイミング50212aには「走行開始」が設定され、表示内容50213aには「注意喚起」および不図示の表示メッセージ情報が設定され、リカバリ方式50214aには「差分リジューム」が設定され、リカバリデータURI50215aには情報が設定されていないことを意味する「NULL」が設定される。
As shown in FIG. 13A, the update package 5a in the case where the update target is only the automatic operation ECU 15 includes update control information 5011, automatic operation ECU update control information 5012a, and automatic operation ECU update data 5013a. It is composed of 501a and recovery control information 502a including automatic operation ECU recovery control information 5021a.
As shown in FIG. 13B, the automatic operation ECU recovery control information 5021a is set to "automatic operation ECU" in the ECU ID 50221a, "running start" is set in the start timing 50212a, and the display content 50213a is set. "Caution" and display message information (not shown) are set, "difference resume" is set in the recovery method 50214a, and "NUML" meaning that no information is set is set in the recovery data URI50215a. ..

リカバリ制御部10004は、表示内容50213aに基づきHMI12の表示装置に図13(c)に示す画面表示G10aを出力させる。この画面表示G10aは、ソフトウェアの更新が中断されており、リカバリ処理による車両1の機能制限状態として更新後の機能がまだ使えない旨をユーザに告知するとともに、中断された更新については自動で適用されることを示す注意喚起である。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10a shown in FIG. 13C based on the display content 50213a. This screen display G10a notifies the user that the software update has been interrupted and the updated function cannot be used as the function restricted state of the vehicle 1 due to the recovery process, and the interrupted update is automatically applied. It is a reminder that it will be done.

図14は、自動運転ECU15のリカバリ処理の1例を示すシーケンス図である。たとえば、自動運転ECU15の更新処理がゲートウェイ10への電源供給断などにより中断され、電源供給が再開されると、以下のようにリカバリ処理が実行される。なお自動運転ECU15は、メモリが多いECUに分類され、図5(b)に示すように2つの制御プログラムを格納できる。
ゲートウェイ10は起動すると図11に示した処理を開始する。すなわち、最初に、ステップS901aにおいて中断中の更新の有無を確認する(図11のS701、S702、図14のS901a)。
FIG. 14 is a sequence diagram showing an example of recovery processing of the automatic operation ECU 15. For example, when the update process of the automatic operation ECU 15 is interrupted due to the power supply to the gateway 10 being cut off and the power supply is restarted, the recovery process is executed as follows. The automatic operation ECU 15 is classified into an ECU having a large amount of memory, and can store two control programs as shown in FIG. 5 (b).
When the gateway 10 is activated, the process shown in FIG. 11 is started. That is, first, in step S901a, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901a in FIG. 14).

また、ゲートウェイ10の処理と並行して、自動運転ECU15では、図10(b)に示した起動処理を行う。ここでは、更新が中断し、起動情報D33はまだ書き換わっておらずプログラムエリア1313bP0に記録された制御プログラムの起動が指定されているため、自動運転ECU15は現行のバージョン2の制御プログラムP4を起動する。
ゲートウェイ10は、更新状態D21の更新開始状態D102から自動運転ECU15の更新が中断していると判定すると(S901a)、ステップS903aにおいて以下の処理を行う。すなわちゲートウェイ10は、自動運転ECU15に該当する自動運転ECUリカバリ制御情報5021aから開始タイミング50212aを読み出し、自動運転ECU15のリカバリ処理を開始するタイミングが、走行開始後であると判定する。
Further, in parallel with the processing of the gateway 10, the automatic operation ECU 15 performs the activation processing shown in FIG. 10B. Here, since the update is interrupted, the start information D33 has not been rewritten yet, and the start of the control program recorded in the program area 1313bP0 is specified, the automatic operation ECU 15 starts the current version 2 control program P4. To do.
When the gateway 10 determines that the update of the automatic operation ECU 15 is interrupted from the update start state D102 of the update state D21 (S901a), the gateway 10 performs the following processing in step S903a. That is, the gateway 10 reads the start timing 50212a from the automatic operation ECU recovery control information 5021a corresponding to the automatic operation ECU 15, and determines that the timing to start the recovery process of the automatic operation ECU 15 is after the start of traveling.

次にゲートウェイ10は、ステップS904aにおいて自動運転ECUリカバリ制御情報5021aから表示内容50213aを読み出し、表示内容50213aに基づく注意喚起画面を表示する要求をHMI12に発行する。HMI12は、この要求に基づき図13(c)のG10aに例示する注意喚起画面を表示装置に表示する(S905a)。ゲートウェイ10は、ステップS906aにおいてリカバリ処理を開始するトリガである走行開始を検出すると、自動運転ECUリカバリ制御情報5021aのリカバリ方式50214aを読み出し、リカバリ処理の方式が「差分リジューム」であると判定する(S907a)。前述のとおり「差分リジューム」によるリカバリとは、差分更新が中断した場合、中断したブロックから差分更新を再開することで、短時間で更新を完了できるようにする方式のことである。ゲートウェイ10は、リジュームを開始するポイントを決定するために、更新状態D21の処理中ブロックD103を読み出す(S908a)。ゲートウェイ10は、リジュームを開始するブロックを決定した後、ステップ909aにおいて、当該ブロックから図8のソフトウェア更新処理S4を実施し、自動運転ECU15の更新を完了する。 Next, in step S904a, the gateway 10 reads the display content 50213a from the automatic operation ECU recovery control information 5021a, and issues a request to the HMI 12 to display a warning screen based on the display content 50213a. Based on this request, the HMI 12 displays the attention alert screen illustrated in G10a of FIG. 13C on the display device (S905a). When the gateway 10 detects the start of travel, which is a trigger to start the recovery process in step S906a, it reads the recovery method 50214a of the automatic operation ECU recovery control information 5021a, and determines that the recovery process method is "difference resume" ( S907a). As described above, the recovery by "differential resume" is a method in which when the differential update is interrupted, the update can be completed in a short time by restarting the differential update from the interrupted block. The gateway 10 reads the processing block D103 in the update state D21 in order to determine the point at which the resume starts (S908a). After determining the block to start the resume, the gateway 10 executes the software update process S4 of FIG. 8 from the block in step 909a to complete the update of the automatic operation ECU 15.

自動運転ECU15のように豊富なメモリを備え、制御プログラムが2重化できる場合は、現在実行している制御プログラムを格納している領域とは別の領域に更新後の制御プログラムを復元または格納することができるので以下の利点がある。すなわち、更新が中断した場合も実行中の制御プログラムを破損せず、再起動時に実行中の制御プログラムを起動することで正常な動作を維持することができる。このため、上記のとおりリカバリ制御情報502aを構成し、これを用いることで、ゲートウェイ10は、自動運転ECU15の更新が中断された場合でも即時に更新を完了させなくてもよく、次の走行時に更新を再開すればよい。
ゲートウェイ10は、更新が中断した旨と中断した更新の再開は走行中に自動的に行われる旨を、HMI12に注意喚起画面を表示させることでユーザに伝達する。また更新状態D1に更新状態が記録されているので、中断ポイントからリカバリの実行を開始、すなわち更新を再開し、迅速に更新を完了することができる。
なお前述の例では、自動運転ECU15の更新が中断した際に、注意喚起画面を表示させる例を示した。しかし、例えば自動運転ECU15の更新が走行中などに完全にバックグラウンドで実施されユーザが意識しない間に完了させる場合、注意喚起画面を表示させないように制御してもよい。この場合、図13の表示内容50213aには、「注意喚起」ではなく「画面表示なし」が設定される。
When the control program has abundant memory like the automatic operation ECU 15 and the control program can be duplicated, the updated control program is restored or stored in an area different from the area where the control program currently being executed is stored. It has the following advantages because it can be used. That is, even if the update is interrupted, the running control program is not damaged, and normal operation can be maintained by starting the running control program at the time of restart. Therefore, by configuring the recovery control information 502a as described above and using it, the gateway 10 does not have to complete the update immediately even if the update of the automatic operation ECU 15 is interrupted, and the gateway 10 does not have to complete the update immediately during the next run. You can restart the update.
The gateway 10 notifies the user that the update has been interrupted and that the interrupted update is automatically restarted during traveling by displaying a warning screen on the HMI 12. Further, since the update status is recorded in the update status D1, the recovery execution can be started from the interruption point, that is, the update can be restarted, and the update can be completed quickly.
In the above-mentioned example, an example of displaying a warning screen when the update of the automatic operation ECU 15 is interrupted is shown. However, for example, when the update of the automatic driving ECU 15 is performed completely in the background while the vehicle is running and is completed without the user being aware of it, the warning screen may be controlled so as not to be displayed. In this case, the display content 50213a in FIG. 13 is set to "no screen display" instead of "attention".

(動作例―ADAS ECU)
図15および図16を用いて、ADAS ECU16に対応する更新パッケージ5bの構成、HMI12への表示例、および動作シーケンスを説明する。
図15(a)は更新対象がADAS ECU16のみの場合の更新パッケージ5bの構成を示す図、図15(b)はその更新パッケージ5bに含まれるADAS ECUリカバリ制御情報5021bの構成を示す図、図15(c)はADAS ECUリカバリ制御情報5021bに基づくHMI12の表示例を示す図である。
(Operation example-ADAS ECU)
15 and 16 will be used to describe the configuration of the update package 5b corresponding to the ADAS ECU 16, a display example on the HMI 12, and an operation sequence.
FIG. 15A is a diagram showing the configuration of the update package 5b when the update target is only the ADAS ECU 16, and FIG. 15B is a diagram and a diagram showing the configuration of the ADAS ECU recovery control information 5021b included in the update package 5b. FIG. 15 (c) is a diagram showing a display example of the HMI 12 based on the ADAS ECU recovery control information 5021b.

更新対象がADAS ECU16のみの場合の更新パッケージ5bは、図15(a)に示すように、共通更新制御情報5011、ADAS ECU更新制御情報5012b、ADAS ECU更新データ5013bを含む更新制御情報501bと、ADAS ECUリカバリ制御情報5021bを含むリカバリ制御情報502bと、から構成される。
ADAS ECUリカバリ制御情報5021bは、図15(b)に示すように、ECU ID50211bには「ADAS ECU」が設定され、開始タイミング50212bには「IGN−OFF」が設定され、表示内容50213bには「注意喚起」および不図示の表示メッセージ情報が設定され、リカバリ方式50214bには「差分リジューム」が設定され、リカバリデータURI50215bには情報が設定されていないことを意味する「NULL」が設定される。
As shown in FIG. 15A, the update package 5b when the update target is only the ADAS ECU 16 includes the common update control information 5011, the ADAS ECU update control information 5012b, and the update control information 501b including the ADAS ECU update data 5013b. It is composed of recovery control information 502b including ADAS ECU recovery control information 5021b.
As for the ADAS ECU recovery control information 5021b, as shown in FIG. 15B, "ADAS ECU" is set in the ECU ID 50221b, "IGN-OFF" is set in the start timing 50212b, and "IGN-OFF" is set in the display content 50213b. "Caution" and display message information (not shown) are set, "difference resume" is set in the recovery method 50214b, and "NUML" meaning that no information is set in the recovery data URI50215b is set.

リカバリ制御部10004は、表示内容50213bに基づきHMI12の表示装置に図15(c)に示す画面表示G10bを出力させる。この画面表示G10bは、ソフトウェアの更新が中断されており、リカバリ処理による車両1の機能制限状態として更新後の機能がまだ使えない旨をユーザに告知するとともに、中断された更新については次にIGN−OFF、すなわちイグニッションがオフにされたタイミングで適用されることを示す注意喚起である。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10b shown in FIG. 15C based on the display content 50213b. This screen display G10b notifies the user that the software update has been interrupted and the updated function cannot be used as the function restricted state of the vehicle 1 due to the recovery process, and the interrupted update is next to IGN. -OFF, that is, a reminder that the ignition is applied when the ignition is turned off.

図16は、ADAS ECU16のリカバリ処理の1例を示すシーケンス図である。たとえば、ADAS ECU16の更新処理がゲートウェイ10への電源供給断などにより中断され、電源供給が再開されると、以下のようにリカバリ処理が実行される。なおADAS ECU16は、メモリが多いECUに分類され、図5(b)に示すように2つの制御プログラムを格納できる。
ゲートウェイ10は起動すると図11に示した処理を開始する。すなわち、最初に、ステップS901bにおいて中断中の更新の有無を確認する(図11のS701、S702、図16のS901b)。
FIG. 16 is a sequence diagram showing an example of recovery processing of the ADAS ECU 16. For example, when the update process of the ADAS ECU 16 is interrupted due to the power supply to the gateway 10 being cut off and the power supply is restarted, the recovery process is executed as follows. The ADAS ECU 16 is classified into an ECU having a large amount of memory, and can store two control programs as shown in FIG. 5 (b).
When the gateway 10 is activated, the process shown in FIG. 11 is started. That is, first, in step S901b, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901b in FIG. 16).

また、ゲートウェイ10の処理と並行して、ADAS ECU16では、図10(b)に示した起動処理を行う。ここでは、更新が中断し、起動情報D33はまだ書き換わっておらずプログラムエリア1313bP0に記録された制御プログラムの起動が指定されているため、ADAS ECU16は現行のバージョン2の制御プログラムP4を起動する。
ゲートウェイ10は、更新状態D21の更新開始状態D102からADAS ECU16の更新が中断していると判定すると(S901b)、ステップS903bにおいて以下の処理を行う。すなわちゲートウェイ10は、ADAS ECU16に該当するADAS ECUリカバリ制御情報5021bから開始タイミング50212bを読み出し、ADAS ECU16のリカバリ処理を開始するタイミングが、IGN−OFFであると判定する。
Further, in parallel with the processing of the gateway 10, the ADAS ECU 16 performs the activation processing shown in FIG. 10B. Here, since the update is interrupted, the start information D33 has not been rewritten yet, and the start of the control program recorded in the program area 1313bP0 is specified, the ADAS ECU 16 starts the current version 2 control program P4. ..
When the gateway 10 determines that the update of the ADAS ECU 16 is interrupted from the update start state D102 of the update state D21 (S901b), the gateway 10 performs the following processing in step S903b. That is, the gateway 10 reads the start timing 50212b from the ADAS ECU recovery control information 5021b corresponding to the ADAS ECU 16, and determines that the timing for starting the recovery process of the ADAS ECU 16 is IGN-OFF.

次にゲートウェイ10は、ステップS904bにおいてADAS ECUリカバリ制御情報5021bから表示内容50213bを読み出し、表示内容50213bに基づく注意喚起画面を表示する要求をHMI12に発行する。HMI12は、この要求に基づき図15(c)のG10bに例示する注意喚起画面を表示装置に表示する(S905b)。ゲートウェイ10は、ステップS906bにおいてリカバリ処理を開始するトリガであるイグニッションOFF信号が車両1から入力されると、これを検出し(S907b)、ADAS ECUリカバリ制御情報5021bのリカバリ方式50214bを読み出して、リカバリ処理の方式が「差分リジューム」であると判定する(S908b)。前述のとおり「差分リジューム」によるリカバリとは、差分更新が中断した場合、中断したブロックから差分更新を再開することで、短時間で更新を完了できるようにする方式のことである。ゲートウェイ10は、リジュームを開始するポイントを決定するために、更新状態D21の処理中ブロックD103を読み出す(S909b)。ゲートウェイ10は、リジュームを開始するブロックを決定した後、ステップ910bにおいて、当該ブロックから図8のソフトウェア更新処理S4を実施し、ADAS ECU16の更新を完了する。 Next, in step S904b, the gateway 10 reads the display content 50213b from the ADAS ECU recovery control information 5021b, and issues a request to the HMI 12 to display a warning screen based on the display content 50213b. Based on this request, the HMI 12 displays the attention alert screen illustrated in G10b of FIG. 15C on the display device (S905b). When the ignition OFF signal, which is a trigger for starting the recovery process in step S906b, is input from the vehicle 1, the gateway 10 detects this (S907b), reads the recovery method 50214b of the ADAS ECU recovery control information 5021b, and recovers. It is determined that the processing method is "difference resume" (S908b). As described above, the recovery by "differential resume" is a method in which when the differential update is interrupted, the update can be completed in a short time by restarting the differential update from the interrupted block. The gateway 10 reads the processing block D103 in the update state D21 in order to determine the point at which the resume starts (S909b). After determining the block to start the resume, the gateway 10 executes the software update process S4 of FIG. 8 from the block in step 910b to complete the update of the ADAS ECU 16.

ADAS ECU16も自動運転ECU15と同様に豊富なメモリを備えるので、自動運転ECU15と同様の利点がある。
ゲートウェイ10は、ユーザには更新が中断した旨と、中断した更新の再開はイグニッションオフにより行われる旨をHMI12に注意喚起画面を表示させることでユーザに伝達する。また更新状態D1に更新状態が記録されているので、中断ポイントからリカバリの実行を開始、すなわち更新を再開し、迅速に更新を完了することができる。
Since the ADAS ECU 16 also has abundant memory like the automatic operation ECU 15, it has the same advantages as the automatic operation ECU 15.
The gateway 10 informs the user that the update has been interrupted and that the interrupted update is restarted by the ignition off by displaying a warning screen on the HMI 12. Further, since the update status is recorded in the update status D1, the recovery execution can be started from the interruption point, that is, the update can be restarted, and the update can be completed quickly.

(動作例―エンジン制御ECU)
図17および図18を用いて、エンジン制御ECU13に対応する更新パッケージ5cの構成、HMI12への表示例、および動作シーケンスを説明する。
図17(a)は更新対象がエンジン制御ECU13のみの場合の更新パッケージ5cの構成を示す図、図17(b)はその更新パッケージ5cに含まれるエンジン制御ECUリカバリ制御情報5021cの構成を示す図、図17(c)はエンジン制御ECUリカバリ制御情報5021cに基づくHMI12の表示例を示す図である。
(Operation example-Engine control ECU)
The configuration of the update package 5c corresponding to the engine control ECU 13, the display example on the HMI 12, and the operation sequence will be described with reference to FIGS. 17 and 18.
FIG. 17A is a diagram showing the configuration of the update package 5c when the update target is only the engine control ECU 13, and FIG. 17B is a diagram showing the configuration of the engine control ECU recovery control information 5021c included in the update package 5c. 17 (c) is a diagram showing a display example of HMI 12 based on engine control ECU recovery control information 5021c.

更新対象がエンジン制御ECU13のみの場合の更新パッケージ5cは、図17(a)に示すように、共通更新制御情報5011、エンジン制御ECU更新制御情報5012c、エンジン制御ECU更新データ5013cを含む更新制御情報501cと、エンジン制御ECUリカバリ制御情報5021cを含むリカバリ制御情報502cと、から構成される。
エンジン制御ECUリカバリ制御情報5021cは、図17(b)に示すように、ECU ID50211cには「エンジン制御ECU」が設定され、開始タイミング50212cには「即時」が設定され、表示内容50213cには「緊急」および不図示の表示メッセージ情報が設定され、リカバリ方式50214cには「差分リジューム」が設定され、リカバリデータURI50215cには情報が設定されていないことを意味する「NULL」が設定される。
As shown in FIG. 17A, the update package 5c when the update target is only the engine control ECU 13 includes update control information 5011, engine control ECU update control information 5012c, and engine control ECU update data 5013c. It is composed of 501c and recovery control information 502c including engine control ECU recovery control information 5021c.
As shown in FIG. 17B, the engine control ECU recovery control information 5021c is set to "engine control ECU" in the ECU ID 50221c, "immediate" is set in the start timing 50212c, and "immediate" is set in the display content 50213c. "Urgent" and non-illustrated display message information are set, "difference resume" is set in the recovery method 50214c, and "NULL" meaning that no information is set is set in the recovery data URI50215c.

リカバリ制御部10004は、表示内容50213cに基づきHMI12の表示装置に図17(c)に示す画面表示G10cを出力させる。この画面表示G10cは、ソフトウェアの更新が中断されており、リカバリ処理による車両1の機能制限状態として車両1が使えない旨をユーザに告知するとともに、中断された更新については即時リカバリ中であることを示す。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10c shown in FIG. 17C based on the display content 50213c. This screen display G10c notifies the user that the software update is interrupted and the vehicle 1 cannot be used as the function restricted state of the vehicle 1 due to the recovery process, and the interrupted update is being recovered immediately. Is shown.

図18は、エンジン制御ECU13のリカバリ処理の1例を示すシーケンス図である。たとえば、エンジン制御ECU13の更新処理がゲートウェイ10への電源供給断などにより中断され、電源供給が再開されると、以下のようにリカバリ処理が実行される。なおエンジン制御ECU13は、メモリが少ないECUに分類され、図5(a)に示すように制御プログラムは1つのみ格納できる。
ゲートウェイ10は起動すると図11に示した処理を開始する。すなわち、最初に、ステップS901cにおいて中断中の更新の有無を確認する(図11のS701、S702、図18のS901c)。
FIG. 18 is a sequence diagram showing an example of recovery processing of the engine control ECU 13. For example, when the update process of the engine control ECU 13 is interrupted due to the power supply to the gateway 10 being cut off and the power supply is restarted, the recovery process is executed as follows. The engine control ECU 13 is classified into an ECU having a small memory, and as shown in FIG. 5A, only one control program can be stored.
When the gateway 10 is activated, the process shown in FIG. 11 is started. That is, first, in step S901c, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901c in FIG. 18).

また、ゲートウェイ10の処理と並行して、エンジン制御ECU13では、図10(a)に示した起動処理を行う。ここでは、更新が中断し、現行のバージョン2の制御プログラムの一部がバージョン3の制御プログラムの一部で上書きされてしまっている状態のため、制御プログラムP2の検証に問題が発生し、緊急モードで起動される(S902c)。
ゲートウェイ10は、更新状態D21の更新開始状態D102からエンジン制御ECU13の更新が中断していると判定すると(S901c)、ステップS903cにおいて以下の処理を行う。すなわちゲートウェイ10は、エンジン制御ECU13に該当するエンジン制御ECUリカバリ制御情報5021cから開始タイミング50212cを読み出し、エンジン制御ECU13のリカバリ処理を開始するタイミングが即時であると判定する。
Further, in parallel with the processing of the gateway 10, the engine control ECU 13 performs the activation processing shown in FIG. 10A. Here, since the update is interrupted and a part of the current version 2 control program is overwritten by a part of the version 3 control program, a problem occurs in the verification of the control program P2 and it is urgent. It is started in the mode (S902c).
When the gateway 10 determines that the update of the engine control ECU 13 is interrupted from the update start state D102 of the update state D21 (S901c), the gateway 10 performs the following processing in step S903c. That is, the gateway 10 reads the start timing 50212c from the engine control ECU recovery control information 5021c corresponding to the engine control ECU 13, and determines that the timing to start the recovery process of the engine control ECU 13 is immediate.

次にゲートウェイ10は、ステップS904cにおいてエンジン制御ECUリカバリ制御情報5021cから表示内容50213cを読み出し、表示内容50213cに基づく緊急画面を表示する要求をHMI12に発行する。HMI12は、この要求に基づき図17(c)のG10cに例示する緊急画面を表示装置に表示する(S905c)。ゲートウェイ10は、リカバリ処理を開始するタイミングが即時なので、ステップS904cでHMI12に緊急画面の表示要求を発行すると即時にエンジン制御ECUリカバリ制御情報5021cのリカバリ方式50214cを読み出し、リカバリ処理の方式が「差分リジューム」であると判定する(S906c)。ゲートウェイ10は、ステップS907cにおいてリジュームを開始するポイントを決定するために、更新状態D21の処理中ブロックD103を読み出す。ゲートウェイ10は、リジュームを開始するブロックを決定した後、ステップ908cにおいて、当該ブロックから図8のソフトウェア更新処理S4を実施し、エンジン制御ECU13の更新を完了する。 Next, the gateway 10 reads the display content 50213c from the engine control ECU recovery control information 5021c in step S904c, and issues a request to the HMI 12 to display an emergency screen based on the display content 50213c. Based on this request, the HMI 12 displays an emergency screen illustrated in G10c of FIG. 17 (c) on the display device (S905c). Since the gateway 10 starts the recovery process immediately, when an emergency screen display request is issued to the HMI 12 in step S904c, the recovery method 50214c of the engine control ECU recovery control information 5021c is immediately read, and the recovery process method is "difference". It is determined to be "resume" (S906c). The gateway 10 reads the processing block D103 in the update state D21 in order to determine the point at which the resume starts in step S907c. After determining the block to start the resume, the gateway 10 executes the software update process S4 of FIG. 8 from the block in step 908c to complete the update of the engine control ECU 13.

エンジン制御ECU13のようなメモリが少ないECUの場合は、単一の制御プログラムを上書きしながら更新を行う必要があるため、更新が中断した場合は、制御プログラムは正常動作できなくなる。このため、エンジン制御ECU13の更新が中断した場合、エンジン制御が行えず、走行ができなくなってしまう。上記のとおりリカバリ制御情報502cを構成し、これを用いることで、ゲートウェイ10はエンジン制御ECU13の更新が中断した際は、中断した更新の再開を即時に行う必要があると判断する。またゲートウェイ10は、車両が使用できない旨と中断した更新の再開は即時開始されている旨をHMI12に緊急画面を表示させることでユーザに伝達する。また更新状態D1に更新状態が記録されているので、中断ポイントからリカバリの実行を開始、すなわち更新を再開し、迅速に更新を完了することができる。 In the case of an ECU having a small memory such as the engine control ECU 13, it is necessary to update while overwriting a single control program. Therefore, if the update is interrupted, the control program cannot operate normally. Therefore, if the update of the engine control ECU 13 is interrupted, the engine cannot be controlled and the vehicle cannot travel. By configuring the recovery control information 502c as described above and using the recovery control information 502c, the gateway 10 determines that when the update of the engine control ECU 13 is interrupted, it is necessary to immediately restart the interrupted update. Further, the gateway 10 informs the user that the vehicle cannot be used and that the restart of the interrupted update is immediately started by displaying an emergency screen on the HMI 12. Further, since the update status is recorded in the update status D1, the recovery execution can be started from the interruption point, that is, the update can be restarted, and the update can be completed quickly.

(動作例―ブレーキ制御ECU)
図19および図20を用いて、ブレーキ制御ECU14に対応する更新パッケージ5dの構成、HMI12への表示例、および動作シーケンスを説明する。
図19(a)は更新対象がブレーキ制御ECU14のみの場合の更新パッケージ5dの構成を示す図、図19(b)はその更新パッケージ5dに含まれるブレーキ制御ECUリカバリ制御情報5021dの構成を示す図、図19(c)はブレーキ制御ECUリカバリ制御情報5021dに基づくHMI12の表示例を示す図である。
(Operation example-Brake control ECU)
A configuration of the update package 5d corresponding to the brake control ECU 14, a display example on the HMI 12, and an operation sequence will be described with reference to FIGS. 19 and 20.
FIG. 19A is a diagram showing the configuration of the update package 5d when the update target is only the brake control ECU 14, and FIG. 19B is a diagram showing the configuration of the brake control ECU recovery control information 5021d included in the update package 5d. 19 (c) is a diagram showing a display example of the HMI 12 based on the brake control ECU recovery control information 5021d.

更新対象がブレーキ制御ECU14のみの場合の更新パッケージ5dは、図19(a)に示すように、共通更新制御情報5011、ブレーキ制御ECU更新制御情報5012d、およびブレーキ制御ECU更新データ5013dを含む更新制御情報501dと、ブレーキ制御ECUリカバリ制御情報5021d、およびブレーキ制御ECUリカバリデータ5022dを含むリカバリ制御情報502dと、から構成される。
ブレーキ制御ECUリカバリ制御情報5021dは、図19(b)に示すように、ECU ID50211dには「ブレーキ制御ECU」が設定され、開始タイミング50212dには「即時」が設定され、表示内容50213dには「緊急」および不図示の表示メッセージ情報が設定され、リカバリ方式50214dには「圧縮リカバリ」が設定され、リカバリデータURI50215dには情報が設定されていないことを意味する「NULL」が設定される。
As shown in FIG. 19A, the update package 5d when the update target is only the brake control ECU 14 includes update control including common update control information 5011, brake control ECU update control information 5012d, and brake control ECU update data 5013d. It is composed of information 501d, brake control ECU recovery control information 5021d, and recovery control information 502d including brake control ECU recovery data 5022d.
As for the brake control ECU recovery control information 5021d, as shown in FIG. 19B, "brake control ECU" is set in the ECU ID 50221d, "immediate" is set in the start timing 50212d, and "immediate" is set in the display content 50213d. "Urgent" and not shown display message information are set, "compressed recovery" is set in the recovery method 50214d, and "NULL" meaning that no information is set in the recovery data URI50215d is set.

リカバリ制御部10004は、表示内容50213dに基づきHMI12の表示装置に図19(c)に示す画面表示G10dを出力させる。この画面表示G10dは、ソフトウェアの更新が中断されており、リカバリ処理による車両1の機能制限状態として車両1が使えない旨をユーザに告知するとともに、中断された更新については即時リカバリ中であることを示す。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10d shown in FIG. 19C based on the display content 50213d. This screen display G10d notifies the user that the software update is interrupted and the vehicle 1 cannot be used as the function restricted state of the vehicle 1 due to the recovery process, and the interrupted update is being recovered immediately. Is shown.

図20は、ブレーキ制御ECU14のリカバリ処理の1例を示すシーケンス図である。たとえば、ブレーキ制御ECU14の更新処理がゲートウェイ10への電源供給断などにより中断され、電源供給が再開されると、以下のようにリカバリ処理が実行される。なおブレーキ制御ECU14は、メモリが少ないECUに分類され、図5(a)に示すように制御プログラムは1つのみ格納できる。
ゲートウェイ10は起動すると図11に示した処理を開始する。すなわち、最初に、ステップS901dにおいて中断中の更新の有無を確認する(図11のS701、S702、図20のS901d)。
FIG. 20 is a sequence diagram showing an example of recovery processing of the brake control ECU 14. For example, when the update process of the brake control ECU 14 is interrupted due to the power supply to the gateway 10 being cut off and the power supply is restarted, the recovery process is executed as follows. The brake control ECU 14 is classified into an ECU having a small memory, and as shown in FIG. 5A, only one control program can be stored.
When the gateway 10 is activated, the process shown in FIG. 11 is started. That is, first, in step S901d, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901d in FIG. 20).

また、ゲートウェイ10の処理と並行して、ブレーキ制御ECU14では、図10(a)に示した起動処理を行う。ここでは、更新が中断し、現行のバージョン2の制御プログラムの一部がバージョン3の制御プログラムの一部で上書きされてしまっている状態のため、制御プログラムP2の検証に問題が発生し、緊急モードで起動される(S902d)。
ゲートウェイ10は、更新状態D21の更新開始状態D102からブレーキ制御ECU14の更新が中断していると判定すると(S901d)、ステップS903dにおいて以下の処理を行う。すなわちゲートウェイ10は、ブレーキ制御ECU14に該当するブレーキ制御ECUリカバリ制御情報5021dから開始タイミング50212dを読み出し、ブレーキ制御ECU14のリカバリ処理を開始するタイミングが即時であると判定する。
Further, in parallel with the processing of the gateway 10, the brake control ECU 14 performs the activation processing shown in FIG. 10A. Here, since the update is interrupted and a part of the current version 2 control program is overwritten by a part of the version 3 control program, a problem occurs in the verification of the control program P2 and it is urgent. It is started in the mode (S902d).
When the gateway 10 determines that the update of the brake control ECU 14 is interrupted from the update start state D102 of the update state D21 (S901d), the gateway 10 performs the following processing in step S903d. That is, the gateway 10 reads the start timing 50212d from the brake control ECU recovery control information 5021d corresponding to the brake control ECU 14, and determines that the timing to start the recovery process of the brake control ECU 14 is immediate.

次にゲートウェイ10は、ステップS904dにおいてブレーキ制御ECUリカバリ制御情報5021dから表示内容50213dを読み出し、表示内容50213dに基づく緊急画面を表示する要求をHMI12に発行する。HMI12は、この要求に基づき図19(c)のG10dに例示する緊急画面を表示装置に表示する(S905c)。ゲートウェイ10は、リカバリ処理を開始するタイミングが即時なので、ステップS904dでHMI12に緊急画面の表示要求を発行すると即時にブレーキ制御ECUリカバリ制御情報5021dのリカバリ方式50214dを読み出し、リカバリ処理の方式が「圧縮リカバリ」であると判定する(S906d)。前述のとおり「圧縮リカバリ」方式によるリカバリとは、ソフトウェアの圧縮データを用いて、ソフトウェアの全領域の書込みまたは、破損した領域の書込み、すなわち修復を行うことで、確実にリカバリを行う方式である。ゲートウェイ10は、ステップS907dにおいて、更新パッケージ5dに同梱されたバージョン3の制御プログラムの圧縮データであるブレーキ制御ECUリカバリデータ5022dを読み出す。そしてゲートウェイ10は、読みだしたブレーキ制御ECUリカバリデータ5022dを用いて図8のソフトウェア更新処理S4を実施し、ブレーキ制御ECU14の更新を完了する。 Next, the gateway 10 reads the display content 50213d from the brake control ECU recovery control information 5021d in step S904d, and issues a request to the HMI 12 to display an emergency screen based on the display content 50213d. Based on this request, the HMI 12 displays an emergency screen illustrated in G10d of FIG. 19 (c) on the display device (S905c). Since the gateway 10 immediately starts the recovery process, when an emergency screen display request is issued to the HMI 12 in step S904d, the recovery method 50214d of the brake control ECU recovery control information 5021d is immediately read, and the recovery process method is "compressed". It is determined to be "recovery" (S906d). As described above, the recovery by the "compression recovery" method is a method of reliably recovering by writing the entire area of the software or writing the damaged area, that is, repairing, using the compressed data of the software. .. In step S907d, the gateway 10 reads the brake control ECU recovery data 5022d, which is the compressed data of the version 3 control program included in the update package 5d. Then, the gateway 10 executes the software update process S4 of FIG. 8 using the read brake control ECU recovery data 5022d, and completes the update of the brake control ECU 14.

ブレーキ制御ECU14もエンジン制御ECU13と同様にメモリが少ないので、上記のとおりリカバリ制御情報502cを構成し、これを用いることで、ゲートウェイ10はブレーキ制御ECU14の更新が中断した際は、中断した更新の再開を即時に行う必要があると判断する。またゲートウェイ10は、車両が使用できない旨と中断した更新の再開は即時開始されている旨をHMI12に緊急画面を表示させることでユーザに伝達する。さらに、ブレーキ制御ECUリカバリデータ5022dとしてバージョン3の制御プログラムを圧縮したデータを同梱して制御プログラムの修復を行うようにすることで、差分リジュームの以下の問題点を回避できる。すなわち差分リジュームでは、復元領域としてDataエリア1313aを用いることで処理時間が長くなってしまう問題点や、書換え回数の少ない可能性のあるプログラムエリアを使用してしまう問題点があるが、圧縮リカバリ方式ではこれらの問題点を回避できる。また、後述のブロックリカバリでは、ECUのソフトウェア修復中に再度中断した場合は、その後の復元ができなくなるが、圧縮データによる修復の場合は、再度中断した場合も対応が可能となる。 Since the brake control ECU 14 also has a small memory like the engine control ECU 13, the recovery control information 502c is configured as described above, and by using this, the gateway 10 updates the interrupted update when the update of the brake control ECU 14 is interrupted. Judge that it is necessary to restart immediately. Further, the gateway 10 informs the user that the vehicle cannot be used and that the restart of the interrupted update is immediately started by displaying an emergency screen on the HMI 12. Further, by including the compressed data of the version 3 control program as the brake control ECU recovery data 5022d and repairing the control program, the following problems of the differential resume can be avoided. That is, in the differential resume, there is a problem that the processing time becomes long by using the Data area 1313a as the restoration area, and there is a problem that the program area which may have a small number of rewrites is used. Then, these problems can be avoided. Further, in the block recovery described later, if the ECU is interrupted again during software restoration, the subsequent restoration cannot be performed, but in the case of restoration by compressed data, it is possible to deal with the interruption again.

(動作例―HVAC ECU)
図21および図22を用いて、HVAC ECU18に対応する更新パッケージ5eの構成、HMI12への表示例、および動作シーケンスを説明する。
図21(a)は更新対象がHVAC ECU18のみの場合の更新パッケージ5eの構成を示す図、図21(b)はその更新パッケージ5eに含まれるHVAC ECUリカバリ制御情報5021eの構成を示す図、図21(c)はHVAC ECUリカバリ制御情報5021eに基づくHMI12の表示例を示す図である。
(Operation example-HVAC ECU)
21 and 22 will be used to describe the configuration of the update package 5e corresponding to the HVAC ECU 18, a display example on the HMI 12, and an operation sequence.
21 (a) is a diagram showing the configuration of the update package 5e when the update target is only the HVAC ECU 18, and FIG. 21 (b) is a diagram and a diagram showing the configuration of the HVAC ECU recovery control information 5021e included in the update package 5e. 21 (c) is a diagram showing a display example of the HMI 12 based on the HVAC ECU recovery control information 5021e.

更新対象がHVAC ECU18のみの場合の更新パッケージ5eは、図21(a)に示すように、共通更新制御情報5011、HVAC ECU更新制御情報5012e、HVAC ECU更新データ5013eを含む更新制御情報501eと、HVAC ECUリカバリ制御情報5021eを含むリカバリ制御情報502eと、から構成される。
HVAC ECUリカバリ制御情報5021eは、図21(b)に示すように、ECU ID50211eには「HVAC ECU」が設定され、開始タイミング50212eには「IGN−OFF」が設定され、表示内容50213eには「警告」および不図示の表示メッセージ情報が設定され、リカバリ方式50214eには「サーバ連携」が設定され、リカバリデータURI50215eにはリカバリデータが格納されているURIである「htttps://example.jp/data」が設定される。
As shown in FIG. 21A, the update package 5e when the update target is only the HVAC ECU 18 includes the common update control information 5011, the HVAC ECU update control information 5012e, and the update control information 501e including the HVAC ECU update data 5013e. It is composed of recovery control information 502e including HVAC ECU recovery control information 5021e.
As shown in FIG. 21B, the HVAC ECU recovery control information 5021e is set to "HVAC ECU" in the ECU ID 50221e, "IGN-OFF" is set in the start timing 50212e, and "IGN-OFF" is set in the display content 50213e. "Warning" and display message information (not shown) are set, "server cooperation" is set for the recovery method 50214e, and recovery data is stored in the recovery data URI 50215e "htttps: //example.jp/". "data" is set.

リカバリ制御部10004は、表示内容50213eに基づきHMI12の表示装置に図21(c)に示す画面表示G10eを出力させる。この画面表示G10eは、ソフトウェアの更新が中断されており、リカバリ処理による車両1の機能制限状態としてHVAC機能が使えない旨をユーザに告知するとともに、リカバリのためにはサーバ2との通信が必要であることを示す警告である。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10e shown in FIG. 21 (c) based on the display content 50213e. This screen display G10e notifies the user that the software update is interrupted and the HVAC function cannot be used as the function restricted state of the vehicle 1 due to the recovery process, and communication with the server 2 is required for the recovery. This is a warning indicating that.

図22は、HVAC ECU18のリカバリ処理の1例を示すシーケンス図である。たとえば、HVAC ECU18の更新処理がゲートウェイ10への電源供給断などにより中断され、電源供給が再開されると、以下のようにリカバリ処理が実行される。なおHVAC ECU18は、メモリが少ないECUに分類され、図5(a)に示すように制御プログラムは1つのみ格納できる。
ゲートウェイ10は起動すると図11に示した処理を開始する。すなわち、最初に、ステップS901eにおいて中断中の更新の有無を確認する(図11のS701、S702、図22のS901e)。
FIG. 22 is a sequence diagram showing an example of recovery processing of the HVAC ECU 18. For example, when the update process of the HVAC ECU 18 is interrupted due to the power supply to the gateway 10 being cut off and the power supply is restarted, the recovery process is executed as follows. The HVAC ECU 18 is classified into an ECU having a small memory, and as shown in FIG. 5A, only one control program can be stored.
When the gateway 10 is activated, the process shown in FIG. 11 is started. That is, first, in step S901e, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901e in FIG. 22).

また、ゲートウェイ10の処理と並行して、HVAC ECU18では、図10(a)に示した起動処理を行う。ここでは、更新が中断し、現行のバージョン2の制御プログラムの一部がバージョン3の制御プログラムの一部で上書きされてしまっている状態のため、制御プログラムP2の検証に問題が発生し、緊急モードで起動される(S902e)。
ゲートウェイ10は、更新状態D21の更新開始状態D102からHVAC ECU18の更新が中断していると判定すると(S901e)、ステップS903eにおいて以下の処理を行う。すなわちゲートウェイ10は、HVAC ECU18に該当するHVAC ECUリカバリ制御情報5021eから開始タイミング50212eを読み出し、HVAC ECU18のリカバリ処理を開始するタイミングがイグニッションOFFであると判断する。
Further, in parallel with the processing of the gateway 10, the HVAC ECU 18 performs the activation processing shown in FIG. 10A. Here, since the update is interrupted and a part of the current version 2 control program is overwritten by a part of the version 3 control program, a problem occurs in the verification of the control program P2 and it is urgent. It is started in the mode (S902e).
When the gateway 10 determines that the update of the HVAC ECU 18 is interrupted from the update start state D102 of the update state D21 (S901e), the gateway 10 performs the following processing in step S903e. That is, the gateway 10 reads the start timing 50212e from the HVAC ECU recovery control information 5021e corresponding to the HVAC ECU 18, and determines that the ignition OFF timing is when the recovery process of the HVAC ECU 18 is started.

次にゲートウェイ10は、ステップS904eにおいてHVAC ECUリカバリ制御情報5021eから表示内容50213eを読み出し、表示内容50213eに基づく警告画面を表示する要求をHMI12に発行する。HMI12は、この要求に基づき図21(c)のG10eに例示する警告画面を表示する(S905e)。 Next, the gateway 10 reads the display content 50213e from the HVAC ECU recovery control information 5021e in step S904e, and issues a request to the HMI 12 to display a warning screen based on the display content 50213e. Based on this request, the HMI 12 displays a warning screen illustrated in G10e of FIG. 21 (c) (S905e).

ゲートウェイ10は、イグニッションOFF信号を受信すると(ステップS906e)これを検出する(S907e)。そしてHVAC ECUリカバリ制御情報5021eのリカバリ方式50214eを読み出し、リカバリ処理の方式が「サーバ連携」であると判定する(S908e)。前述のとおり「サーバ連携」方式によるリカバリとは、中断した更新を完了またはロールバックさせるために必要なデータを、リカバリ時にサーバ2から取得する方式である。通信モジュール11がサーバ2との通信が有効化されたことを検出すると、ゲートウェイ10は通信モジュール11からこの通知を受ける(S909e)。そしてゲートウェイ10は、通信モジュール11を経由してサーバ2のリカバリデータURI50215dに対してリカバリデータ取得要求を送信し(ステップ910e)、リカバリデータを受信する(S911e)。さらにゲートウェイ10は、受信したリカバリデータを用いて更新処理を実施し(S912e)、HVAC ECU18の更新を完了する。 When the gateway 10 receives the ignition OFF signal (step S906e), it detects this (S907e). Then, the recovery method 50214e of the HVAC ECU recovery control information 5021e is read out, and it is determined that the recovery processing method is "server cooperation" (S908e). As described above, the recovery by the "server cooperation" method is a method of acquiring the data necessary for completing or rolling back the interrupted update from the server 2 at the time of recovery. When the communication module 11 detects that communication with the server 2 has been enabled, the gateway 10 receives this notification from the communication module 11 (S909e). Then, the gateway 10 transmits a recovery data acquisition request to the recovery data URI50215d of the server 2 via the communication module 11 (step 910e), and receives the recovery data (S911e). Further, the gateway 10 performs an update process using the received recovery data (S912e), and completes the update of the HVAC ECU 18.

HVAC ECU18もエンジン制御ECU13やブレーキ制御ECU14と同様にメモリが少なく、単一の制御プログラムを上書きしながら更新を行う必要があるため、更新が中断した場合は、制御プログラムは正常動作できなくなる。このため、HVAC ECU18の更新が中断した場合、HVAC制御が行えないが、車両1の走行への影響は少ない。上記のとおりリカバリ制御情報502eを構成し、これを用いてゲートウェイ10はHVAC ECU18の更新が中断した際は、すぐにHVAC ECU18を制御して更新を完了させなくてもよく、サーバ連携によりサーバ2から必要なデータをダウンロードした後、次のイグニッションOFF時に更新を再開する。またゲートウェイ10は、更新が中断したためHVAC機能が使えない旨、更新の再開のためには通信可能な環境に移動することが必要である旨、さらに中断した更新の再開はイグニッションOFF時に開始できる旨を、HMI12に警告画面を表示させることでユーザに伝達する。 Like the engine control ECU 13 and the brake control ECU 14, the HVAC ECU 18 also has a small memory and needs to be updated while overwriting a single control program. Therefore, if the update is interrupted, the control program cannot operate normally. Therefore, when the update of the HVAC ECU 18 is interrupted, the HVAC control cannot be performed, but the influence on the running of the vehicle 1 is small. When the recovery control information 502e is configured as described above and the gateway 10 interrupts the update of the HVAC ECU 18, it is not necessary to immediately control the HVAC ECU 18 to complete the update, and the server 2 is linked by the server. After downloading the necessary data from, the update will be restarted when the next ignition is turned off. In addition, the gateway 10 indicates that the HVAC function cannot be used because the update is interrupted, that it is necessary to move to a communicable environment in order to restart the update, and that the restart of the interrupted update can be started when the ignition is turned off. Is transmitted to the user by displaying a warning screen on the HMI 12.

またゲートウェイ10は、リカバリ処理に用いるデータをリカバリデータURI50215に記載されたURIから取得することができる。さらに、頻度の少ない異常発生時のみ、サーバから必要なリカバリデータを取得してECUのソフトウェアを修復する構成とすることで、ゲートウェイ10やECUにリカバリデータやバックアップデータを格納するための追加メモリを準備する必要がなくなり、低コストにシステムを構築できる。 Further, the gateway 10 can acquire the data used for the recovery process from the URI described in the recovery data URI50215. Furthermore, by configuring the system to acquire the necessary recovery data from the server and repair the ECU software only when an abnormality occurs infrequently, additional memory for storing the recovery data and backup data in the gateway 10 and the ECU can be provided. There is no need to prepare, and the system can be built at low cost.

(動作例―エアバッグECU)
図23および図24を用いて、エアバッグECU17に対応する更新パッケージ5fの構成、HMI12への表示例、および動作シーケンスを説明する。
図23(a)は更新対象がエアバッグECU17のみの場合の更新パッケージ5fの構成を示す図、図23(b)はその更新パッケージ5fに含まれるエアバッグECUリカバリ制御情報5021fの構成を示す図、図23(c)はエアバッグECUリカバリ制御情報5021fに基づくHMI12の表示例を示す図である。
(Operation example-airbag ECU)
The configuration of the update package 5f corresponding to the airbag ECU 17, the display example on the HMI 12, and the operation sequence will be described with reference to FIGS. 23 and 24.
FIG. 23 (a) is a diagram showing the configuration of the update package 5f when the update target is only the airbag ECU 17, and FIG. 23 (b) is a diagram showing the configuration of the airbag ECU recovery control information 5021f included in the update package 5f. 23 (c) is a diagram showing a display example of the HMI 12 based on the airbag ECU recovery control information 5021f.

更新対象がエアバッグECU17のみの場合の更新パッケージ5fは、図23(a)に示すように、共通更新制御情報5011、エアバッグECU更新制御情報5012f、エアバッグECU更新データ5013fを含む更新制御情報501fと、エアバッグECUリカバリ制御情報5021f、およびエアバッグECUリカバリデータ5022fを含むリカバリ制御情報502fと、から構成される。
エアバッグECUリカバリ制御情報5021fは、図23(b)に示すように、ECU ID50211fには「エアバッグECU」が設定され、開始タイミング50212fには「IGN−OFF」が設定され、表示内容50213fには「警告」および不図示の表示メッセージ情報が設定され、リカバリ方式50214fには「ブロックリカバリ」が設定され、リカバリデータURI50215fには情報が設定されていないことを意味する「NULL」が設定される。
As shown in FIG. 23A, the update package 5f when the update target is only the airbag ECU 17 is the update control information including the common update control information 5011, the airbag ECU update control information 5012f, and the airbag ECU update data 5013f. It is composed of 501f, recovery control information 502f including airbag ECU recovery control information 5021f, and airbag ECU recovery data 5022f.
As for the airbag ECU recovery control information 5021f, as shown in FIG. 23B, "airbag ECU" is set in the ECU ID 50221f, "IGN-OFF" is set in the start timing 50212f, and the display content 50213f is set. Is set with "warning" and display message information (not shown), "block recovery" is set for the recovery method 50214f, and "NULL" is set, which means that no information is set for the recovery data URI50215f. ..

リカバリ制御部10004は、表示内容50213fに基づきHMI12の表示装置に図23(c)に示す画面表示G10fを出力させる。この画面表示G10fは、ソフトウェアの更新が中断されており、リカバリ処理による車両1の機能制限状態としてエアバッグが使えない旨をユーザに告知するとともに、中断された更新を再開するタイミングは次のイグニッションOFFのタイミングであることを示す。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10f shown in FIG. 23 (c) based on the display content 50213f. This screen display G10f notifies the user that the software update has been interrupted and the airbag cannot be used as the function restricted state of the vehicle 1 due to the recovery process, and the timing for restarting the interrupted update is the next ignition. Indicates that the timing is OFF.

図24は、エアバッグECU17のリカバリ処理の1例を示すシーケンス図である。たとえば、エアバッグECU17の更新処理がゲートウェイ10への電源供給断などにより中断され、電源供給が再開されると、以下のようにリカバリ処理が実行される。なおエアバッグECU17は、メモリが少ないECUに分類され、図5(a)に示すように制御プログラムは1つのみ格納できる。
ゲートウェイ10は起動すると図11に示した処理を開始する。すなわち、最初に、ステップS901fにおいて中断中の更新の有無を確認する(図11のS701、S702、図24のS901f)。
FIG. 24 is a sequence diagram showing an example of recovery processing of the airbag ECU 17. For example, when the update process of the airbag ECU 17 is interrupted due to the power supply to the gateway 10 being cut off and the power supply is restarted, the recovery process is executed as follows. The airbag ECU 17 is classified into an ECU having a small memory, and as shown in FIG. 5A, only one control program can be stored.
When the gateway 10 is activated, the process shown in FIG. 11 is started. That is, first, in step S901f, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901f in FIG. 24).

また、ゲートウェイ10の処理と並行して、エアバッグECU17では、図10(a)に示した起動処理を行う。ここでは、更新が中断し、現行のバージョン2の制御プログラムの一部がバージョン3の制御プログラムの一部で上書きされてしまっている状態のため、制御プログラムP2の検証に問題が発生し、緊急モードで起動される(S902f)。
ゲートウェイ10は、更新状態D21の更新開始状態D102からエアバッグECU17の更新が中断していると判定すると(S901f)、ステップS903fにおいて以下の処理を行う。すなわちゲートウェイ10は、エアバッグECU17に該当するエアバッグECUリカバリ制御情報5021fから開始タイミング50212fを読み出し、エアバッグECU17のリカバリ処理を開始するタイミングがイグニッションOFFであると判定する。
Further, in parallel with the processing of the gateway 10, the airbag ECU 17 performs the activation processing shown in FIG. 10A. Here, since the update is interrupted and a part of the current version 2 control program is overwritten by a part of the version 3 control program, a problem occurs in the verification of the control program P2 and it is urgent. It is started in the mode (S902f).
When the gateway 10 determines that the update of the airbag ECU 17 is interrupted from the update start state D102 of the update state D21 (S901f), the gateway 10 performs the following processing in step S903f. That is, the gateway 10 reads the start timing 50212f from the airbag ECU recovery control information 5021f corresponding to the airbag ECU 17, and determines that the ignition OFF timing is when the recovery process of the airbag ECU 17 is started.

次にゲートウェイ10は、ステップS904fにおいてエアバッグECUリカバリ制御情報5021fから表示内容50213fを読み出し、表示内容50213fに基づく警告画面を表示する要求をHMI12に発行する。HMI12は、この要求に基づき図23(c)のG10fに例示する警告画面を表示する(S905f)。ゲートウェイ10は、リカバリ処理を開始するトリガであるイグニッションOFF信号を受信すると(S906f)これを検出する(S907f)。そしてゲートウェイ10は、エアバッグECUリカバリ制御情報5021fのリカバリ方式50214fを読み出し、リカバリ処理の方式が「ブロックリカバリ」であると判定し(S908f)、更新パッケージ5fに同梱されたエアバッグECUリカバリデータ5022fを読み出す(S909f)。 Next, the gateway 10 reads the display content 50213f from the airbag ECU recovery control information 5021f in step S904f, and issues a request to the HMI 12 to display a warning screen based on the display content 50213f. Based on this request, the HMI 12 displays a warning screen illustrated in G10f of FIG. 23 (c) (S905f). When the gateway 10 receives the ignition OFF signal, which is a trigger for starting the recovery process (S906f), the gateway 10 detects this (S907f). Then, the gateway 10 reads the recovery method 50214f of the airbag ECU recovery control information 5021f, determines that the recovery processing method is "block recovery" (S908f), and determines that the airbag ECU recovery data included in the update package 5f. Read 5022f (S909f).

ゲートウェイ10は、ステップS910fにおいてリジュームを開始するポイントを決定するために、更新状態D21の処理中ブロックD103を読み出す。ゲートウェイ10は、リジュームを開始するブロックを決定した後、ステップ911fにおいて、当該ブロックの次のブロックから図8のソフトウェア更新処理S4を実施し、中断したブロック以外のエアバッグECU17の更新を完了する。ゲートウェイ10は、ステップS912fにおいて、ステップS909fで取得したリカバリデータをエアバッグECU17に送信する。エアバッグECU17は、ステップS913fにおいて、受信したリカバリデータと中断したブロック以外の更新後ソフトウェアのブロックから、中断したブロック(破損ブロック)を復元する。 The gateway 10 reads the processing block D103 in the update state D21 in order to determine the point at which the resume starts in step S910f. After determining the block to start the resume, the gateway 10 executes the software update process S4 of FIG. 8 from the block next to the block in step 911f, and completes the update of the airbag ECU 17 other than the interrupted block. In step S912f, the gateway 10 transmits the recovery data acquired in step S909f to the airbag ECU 17. In step S913f, the airbag ECU 17 restores the interrupted block (damaged block) from the received recovery data and the updated software block other than the interrupted block.

エアバッグECU17のようなメモリが少ないECUの場合は、単一の制御プログラムを上書きしながら更新を行う必要があるため、更新が中断した場合は、制御プログラムは正常動作できなくなる。このため、エアバッグECU17の更新が中断した場合、エアバッグ制御が行えないが、車両1の走行への影響は少ない。上記の通りリカバリ制御情報502fを構成し、これを用いることで、ゲートウェイ10はエアバッグECU17の更新が中断した際は、すぐにECUを制御して更新を完了させなくてもよく、次のイグニッションOFF時に更新を再開すればよいことがわかる。また、ユーザに対して、更新が中断した旨と、そのためエアバッグ機能が使えない旨、中断した更新の再開はイグニッションOFF時に開始できる旨を、HMI12に警告画面を表示させることでユーザに伝達する。 In the case of an ECU having a small memory such as the airbag ECU 17, it is necessary to update while overwriting a single control program. Therefore, if the update is interrupted, the control program cannot operate normally. Therefore, when the update of the airbag ECU 17 is interrupted, the airbag control cannot be performed, but the influence on the running of the vehicle 1 is small. By configuring the recovery control information 502f as described above and using this, the gateway 10 does not have to immediately control the ECU to complete the update when the update of the airbag ECU 17 is interrupted, and the next ignition. It can be seen that the update should be restarted when it is OFF. In addition, the HMI 12 displays a warning screen to inform the user that the update has been interrupted, that the airbag function cannot be used, and that the restart of the interrupted update can be started when the ignition is turned off. ..

上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)ソフトウェア更新装置、たとえばゲートウェイ10は、制御装置、たとえばECUと接続され、ECUのソフトウェア、たとえば制御プログラムを更新前状態から更新完了状態へと遷移させる更新処理を行う更新制御部10001と、リカバリ制御情報502を取得するリカバリ制御情報管理部10005と、更新処理の異常により制御プログラムが更新完了状態へと遷移されていない場合に、リカバリ制御情報502に基づき制御プログラムを更新完了状態に遷移させるリカバリ処理を実行するリカバリ制御部10004とを備える。
ゲートウェイ10は、リカバリ制御情報502に基づきECUのリカバリ処理を実行するので、リカバリ制御情報502の記載に基づき様々なリカバリ処理を実行可能であり、多様な装置、たとえば多様なECUに対応したリカバリ処理を実行できる。換言すると、リカバリ制御情報502に基づいて更新に異常が発生した際のリカバリ制御処理を実行することで、リソースや特性の異なる多数のECUからなるシステムで更新に異常が発生した場合でも、適切なリカバリ処理を行うことができる。
According to the first embodiment described above, the following effects can be obtained.
(1) A software update device, for example, a gateway 10, is connected to a control device, for example, an ECU, and an update control unit 10001 that performs an update process for transitioning the software of the ECU, for example, a control program from a pre-update state to an update complete state. The recovery control information management unit 10055 that acquires the recovery control information 502 and the control program transition to the update complete state based on the recovery control information 502 when the control program has not transitioned to the update complete state due to an abnormality in the update process. It includes a recovery control unit 1004 that executes recovery processing.
Since the gateway 10 executes the recovery process of the ECU based on the recovery control information 502, various recovery processes can be executed based on the description of the recovery control information 502, and the recovery process corresponding to various devices, for example, various ECUs. Can be executed. In other words, by executing the recovery control process when an error occurs in the update based on the recovery control information 502, even if an error occurs in the update in a system consisting of many ECUs with different resources and characteristics, it is appropriate. Recovery processing can be performed.

(2)リカバリ制御情報502はリカバリ処理を開始するタイミングの情報である開始タイミング50212を含む。そのため、ゲートウェイ10はリカバリ制御情報502に基づきリカバリを実行するタイミングを、即時実施や次回のイグニッションOFF時など多様な対応が可能である。リカバリ制御情報502における開始タイミング50212の設定は、たとえば車両におけるそのECUの役割に応じて決定される。 (2) The recovery control information 502 includes a start timing 50212 which is information on a timing for starting the recovery process. Therefore, the gateway 10 can perform various actions such as immediate execution or the next ignition OFF at the timing of executing recovery based on the recovery control information 502. The setting of the start timing 50212 in the recovery control information 502 is determined according to, for example, the role of the ECU in the vehicle.

(3)ゲートウェイ10は、車両に搭載され制御装置が車両のエンジン、およびブレーキの少なくとも一方を制御する装置である場合に、リカバリ制御情報はリカバリ処理を開始するタイミングが即時であることを示す情報を含む。そのためゲートウェイ10は、車両の走行に不可欠なエンジン制御ECU13やブレーキ制御ECU14に対して、即時にリカバリ処理を開始することができる。 (3) When the gateway 10 is a device mounted on the vehicle and the control device controls at least one of the engine and the brake of the vehicle, the recovery control information is information indicating that the timing to start the recovery process is immediate. including. Therefore, the gateway 10 can immediately start the recovery process for the engine control ECU 13 and the brake control ECU 14 which are indispensable for traveling the vehicle.

(4)リカバリ制御情報502は、リカバリ処理の方式を示す情報を含む。そのためゲートウェイ10は、差分リジューム、圧縮リカバリ、サーバ連携、ブロックリカバリなどのリカバリ処理の方式をリカバリ制御情報502に基づき、ECUごとに使い分けることができる。 (4) The recovery control information 502 includes information indicating a recovery processing method. Therefore, the gateway 10 can properly use recovery processing methods such as differential resume, compression recovery, server cooperation, and block recovery for each ECU based on the recovery control information 502.

(5)リカバリ処理の方式は、ECUの構成、たとえばメモリ容量の多少に基づき決定されている。ECUの種類により処理に必要なリソースの量がある程度特定されるため、ECUの構成はECUの種類とも関連がある。すなわち、リカバリ処理の方式はECUの種類に基づき決定されているとも言える。そのため、ECUの構成やECUの種類に応じて適切なリカバリ処理を実施できる。 (5) The recovery processing method is determined based on the configuration of the ECU, for example, the amount of memory capacity. Since the amount of resources required for processing is specified to some extent by the type of ECU, the configuration of the ECU is also related to the type of ECU. That is, it can be said that the recovery processing method is determined based on the type of ECU. Therefore, appropriate recovery processing can be performed according to the configuration of the ECU and the type of the ECU.

(6)リカバリ制御情報502は、リカバリ処理の方式に対応するリカバリデータを含む。そのためゲートウェイ10は、リカバリ制御情報502に含まれるリカバリデータを用いてリカバリ処理を実行することができる。 (6) The recovery control information 502 includes recovery data corresponding to the recovery processing method. Therefore, the gateway 10 can execute the recovery process using the recovery data included in the recovery control information 502.

(7)リカバリ制御情報502は、画面表示のための情報である表示内容50213を含み、ソフトウェア更新装置は画面表示のための情報に基づき、リカバリ処理による車両1の機能制限状態を車両1の乗員であるユーザに告知する画面として、図13(c)、図15(c)、図17(c)、図19(c)、図21(c)、図23(c)のような画面を表示するための信号をHMI12に出力する表示制御部、すなわちリカバリ制御部10004を備える。
そのためゲートウェイ10は、リカバリ処理の実行中には車両1の機能がどのように制限されるかをユーザに告知することができ、ユーザに状況を伝達することでユーザの利便性を向上させることができる。
(7) The recovery control information 502 includes the display content 50213 which is information for screen display, and the software update device sets the function restriction state of vehicle 1 by the recovery process based on the information for screen display to the occupant of vehicle 1. As screens for notifying the user, the screens shown in FIGS. 13 (c), 15 (c), 17 (c), 19 (c), 21 (c), and 23 (c) are displayed. It is provided with a display control unit, that is, a recovery control unit 10004, which outputs a signal for outputting to the HMI 12.
Therefore, the gateway 10 can notify the user how the function of the vehicle 1 is restricted during the execution of the recovery process, and can improve the convenience of the user by communicating the situation to the user. it can.

(変形例1)
上述した実施の形態では、ゲートウェイ10がそれぞれのECUに搭載された制御プログラムを更新する、いわばソフトウェア更新装置の役割を担っていた。しかし、上述したゲートウェイプログラム100が有する機能が通信モジュール11やHMI12に搭載されていてもよい。さらに、車内ネットワーク10aや10bに接続される、不図示の他の装置がゲートウェイプログラム100が有する機能を備えてもよい。
(Modification example 1)
In the above-described embodiment, the gateway 10 plays a role of a software update device that updates the control program mounted on each ECU. However, the function of the gateway program 100 described above may be mounted on the communication module 11 or the HMI 12. Further, another device (not shown) connected to the in-vehicle network 10a or 10b may have a function of the gateway program 100.

(変形例2)
上述した第1の実施の形態では、ゲートウェイ10がリカバリデータURI50215にアクセスすると圧縮されたソフトウェアが得られるとした。しかしリカバリデータURI50215により識別されるリソースは、更新後のソフトウェアから現行のソフトウェアへロールバックするための差分データ、ソフトウエアのブロックのXORデータ、さらには破損したブロックのデータでもよい。そしてゲートウェイ10は、受信したデータに適合する処理を実行する。
(Modification 2)
In the first embodiment described above, it is assumed that when the gateway 10 accesses the recovery data URI50215, compressed software is obtained. However, the resource identified by the recovery data URI50215 may be differential data for rolling back from the updated software to the current software, XOR data for software blocks, or even corrupted block data. Then, the gateway 10 executes a process matching the received data.

(変形例3)
リカバリ制御情報502に含まれるリカバリデータURI50215には、リカバリ方式50214が「サーバ連携」以外の場合は、情報が設定されていないことを意味する「NULL」が設定された。しかしリカバリデータがECUリカバリ制御情報502に含まれる場合には、リカバリデータURI50215にそのことを示す「LOCAL」が設定されてもよい。
(Modification 3)
In the recovery data URI50215 included in the recovery control information 502, "Null", which means that the information is not set, is set when the recovery method 50214 is other than "server cooperation". However, when the recovery data is included in the ECU recovery control information 502, "LOCAL" indicating that may be set in the recovery data URI50215.

(変形例4)
第1の実施の形態では、リカバリは更新処理の異常によりソフトウェアが更新完了状態へと遷移されていない場合に、更新完了状態に遷移させることであると定義した。しかし、リカバリを更新処理の異常によりソフトウェアが更新完了状態へと遷移されていない場合に、更新前状態に遷移させることとしてもよい。換言すると、いわゆるロールバックをリカバリとしてもよい。この場合は、ECUリカバリデータ5022にロールバックを実行するために必要な情報、たとえば、更新前のソフトウェアのブロック間のXORデータが含まれ、リカバリ制御部10004はECUリカバリデータ5022を用いてロールバックを実行する。
(Modification example 4)
In the first embodiment, recovery is defined as transitioning to the update complete state when the software has not transitioned to the update complete state due to an abnormality in the update process. However, recovery may be performed by transitioning to the pre-update state when the software has not transitioned to the update complete state due to an abnormality in the update process. In other words, so-called rollback may be used as recovery. In this case, the ECU recovery data 5022 includes information necessary for executing rollback, for example, XOR data between blocks of software before update, and the recovery control unit 1004 rolls back using the ECU recovery data 5022. To execute.

(変形例5)
ゲートウェイ10は、リカバリ処理を実行する際にネットワーク帯域を通常より多く使用してもよい。たとえばゲートウェイ10は、通常は1秒あたりのデータ送信回数、または1秒あたりに送信するデータ量をネットワークの負荷に対して十分な余裕を持った設定とする。そしてゲートウェイ10は、リカバリ処理を実行する際は通常よりも多いデータ送信回数、または通常よりも多いデータ量を許容する。これにより、リカバリ処理を迅速に実行できる。
(Modification 5)
The gateway 10 may use more network bandwidth than usual when executing the recovery process. For example, the gateway 10 usually sets the number of data transmissions per second or the amount of data transmitted per second with a sufficient margin for the load on the network. Then, the gateway 10 allows a larger number of data transmissions than usual or a larger amount of data than usual when executing the recovery process. As a result, the recovery process can be executed quickly.

またゲートウェイ10は、ネットワーク帯域を通常より多く使用することに代えて、もしくはネットワーク帯域を通常より多く使用するとともに、リカバリ処理に関連するデータフレームの優先度を通常より高く設定してもよい。
さらにゲートウェイ10は、全てのリカバリ処理についてネットワーク帯域を通常より多く使用するのではなく、特定の条件下においてのみネットワーク帯域を通常より多く使用してもよい。特定の条件とは、たとえばECUリカバリ制御情報5021の表示内容50213が「緊急」であることや、リカバリ方式50214において帯域を増加させることが明示されていることである。
Further, the gateway 10 may use the network bandwidth more than usual, or may use the network bandwidth more than usual and set the priority of the data frame related to the recovery process higher than usual.
Further, the gateway 10 does not use more network bandwidth than usual for all recovery processes, but may use more network bandwidth than usual only under certain conditions. The specific conditions are, for example, that the display content 50213 of the ECU recovery control information 5021 is "urgent" and that the recovery method 50214 clearly indicates that the bandwidth is increased.

(変形例6)
ECU更新制御情報5012に含まれる更新制御手順と、ECUリカバリ制御情報5021のリカバリ方式50214の組み合わせが、特定の組み合わせであってもよい。たとえば更新制御手順が差分更新であり、リカバリ方式50214が圧縮リカバリの組み合わせであってもよい。
図25は、変形例6において更新対象がブレーキ制御ECU14のみの場合の更新パッケージ5dの構成を示す図である。ブレーキ制御ECU更新制御情報5012dは、図25(b)に示すように、たとえばECUを識別するECU ID50121d、更新を開始するタイミングを示す開始タイミング50122d、更新制御手順を示す更新方式50124dから構成される。更新方式50124dが差分更新なので、ブレーキ制御ECU更新データ5013dは最新ソフトウエアと現行ソフトウエアとの差分データである。リカバリ方式50214dは圧縮リカバリなので、ブレーキ制御ECUリカバリデータ5022dは圧縮された最新ソフトウエアである。
(Modification 6)
The combination of the update control procedure included in the ECU update control information 5012 and the recovery method 50214 of the ECU recovery control information 5021 may be a specific combination. For example, the update control procedure may be differential update, and the recovery method 50214 may be a combination of compression recovery.
FIG. 25 is a diagram showing a configuration of the update package 5d when the update target is only the brake control ECU 14 in the modification 6. As shown in FIG. 25B, the brake control ECU update control information 5012d is composed of, for example, an ECU ID 50121d that identifies the ECU, a start timing 50122d that indicates the timing to start updating, and an update method 50124d that indicates the update control procedure. .. Since the update method 50124d is the difference update, the brake control ECU update data 5013d is the difference data between the latest software and the current software. Since the recovery method 50214d is a compression recovery, the brake control ECU recovery data 5022d is the latest compressed software.

この場合は、通常は短時間で処理が完了する更新方式が差分更新を実行し、更新に異常が生じた場合はソフトウェアの全領域の書込みを行うことで、確実にリカバリを行うことができる。そのため、処理の迅速性と安全性の確保を両立させることができる。
なお、更新制御手順が差分更新であり、リカバリ方式50214がサーバ連携であり、リカバリデータURIに基づき取得されるデータが圧縮された最新版のソフトウエアであってもよい。
また、「リカバリ」の定義を、更新処理の異常によりソフトウェアが更新完了状態へと遷移されていない場合に、更新完了状態または更新前の状態に遷移させることとする場合は、図25に示した例は以下のとおりでもよい。すなわち、ブレーキ制御ECU更新データ5013dは最新ソフトウエアと現行ソフトウエアとの差分データであり、ブレーキ制御ECUリカバリデータ5022dは圧縮された現行のソフトウエアであってもよい。
In this case, the update method, which normally completes the process in a short time, executes the differential update, and when an abnormality occurs in the update, the entire area of the software is written to ensure recovery. Therefore, it is possible to achieve both speed of processing and ensuring safety.
Note that the update control procedure may be differential update, the recovery method 50214 may be server-linked, and the latest version of software in which the data acquired based on the recovery data URI is compressed may be used.
Further, when the definition of "recovery" is to be changed to the update completed state or the state before the update when the software has not been changed to the update completed state due to an abnormality in the update process, it is shown in FIG. An example may be as follows. That is, the brake control ECU update data 5013d may be the difference data between the latest software and the current software, and the brake control ECU recovery data 5022d may be the compressed current software.

―第2の実施の形態―
図26〜図27を参照して、ソフトウェア更新システムSの第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、ソフトウェアが更新されるECUにリカバリ制御情報が格納されている点で、第1の実施の形態と異なる。
-Second embodiment-
A second embodiment of the software update system S will be described with reference to FIGS. 26 to 27. In the following description, the same components as those in the first embodiment are designated by the same reference numerals, and the differences will be mainly described. The points not particularly described are the same as those in the first embodiment. This embodiment is different from the first embodiment in that recovery control information is mainly stored in the ECU whose software is updated.

(構成)
第2の実施の形態におけるゲートウェイ10のハードウェア構成、およびゲートウェイプログラム100の構成は第1の実施の形態と同様である。ただしゲートウェイプログラム100の動作が後述するように一部異なる。
第2の実施の形態におけるECUのハードウェア構成は第1の実施の形態と同様である。ECUの制御プログラムの構成を説明する。
図26は、第2の実施の形態におけるエンジン制御ECU13上で動作する制御プログラム130の構成を示すブロック図である。ただし本実施の形態においてソフトウェアが更新される対象となるECUはいずれも、少なくとも図26に示す制御プログラム130と同様の構成を備える。
(Constitution)
The hardware configuration of the gateway 10 and the configuration of the gateway program 100 in the second embodiment are the same as those in the first embodiment. However, the operation of the gateway program 100 is partially different as described later.
The hardware configuration of the ECU in the second embodiment is the same as that in the first embodiment. The configuration of the control program of the ECU will be described.
FIG. 26 is a block diagram showing a configuration of a control program 130 operating on the engine control ECU 13 according to the second embodiment. However, in each of the ECUs to which the software is updated in the present embodiment has at least the same configuration as the control program 130 shown in FIG. 26.

第2の実施の形態における制御プログラム130は、第1の実施の形態における構成に加えてリカバリ制御情報13007の記憶領域をさらに備える。このリカバリ制御情報13007には、第1の実施の形態におけるリカバリ制御情報502と同様の情報が含まれる。ただしリカバリ制御情報13007はリカバリ制御情報13007を格納するECU、すなわちエンジン制御ECU13についての情報のみが格納される。換言すると、リカバリ制御情報13007には1つのECUリカバリ制御情報が含まれ、最大で1つのECUリカバリデータが含まれる。リカバリ制御情報13007は、エンジン制御ECU13の工場出荷時にあらかじめ設定されてもよいし、出荷後に設定されてもよい。リカバリ制御情報13007以外の構成要素は、図4(b)の構成と同様である。 The control program 130 in the second embodiment further includes a storage area for recovery control information 13007 in addition to the configuration in the first embodiment. The recovery control information 13007 includes the same information as the recovery control information 502 in the first embodiment. However, the recovery control information 13007 stores only the information about the ECU that stores the recovery control information 13007, that is, the engine control ECU 13. In other words, the recovery control information 13007 includes one ECU recovery control information, and includes a maximum of one ECU recovery data. The recovery control information 13007 may be set in advance at the time of shipment from the factory of the engine control ECU 13, or may be set after shipment. The components other than the recovery control information 13007 are the same as those in FIG. 4B.

(リカバリ制御情報の取得動作)
図27は、ゲートウェイ10がエンジン制御ECU13からリカバリ制御情報13007を取得する処理を示すシーケンス図である。ゲートウェイ10は、エンジン制御ECU13の制御ソフトウェアを更新する前、たとえば更新の直前に以下のようにエンジン制御ECU13からリカバリ制御情報13007を取得する。
ゲートウェイ10の更新制御部10001は、エンジン制御ECU13にリカバリ制御情報取得要求を送信する(S801)。エンジン制御ECU13の更新制御部13001は、リカバリ制御情報取得要求を受信すると、リカバリ制御情報13007を読み出し、これをゲートウェイ10に送信する(S802)。これを受信したゲートウェイ10は、受信したリカバリ制御情報13007を用いて第1の実施の形態と同様にリカバリ処理を実行する。
なおここでは、エンジン制御ECU13を例に説明を行ったが、他のECUも同様の構成及びシーケンスで実施できる。
(Recovery control information acquisition operation)
FIG. 27 is a sequence diagram showing a process in which the gateway 10 acquires recovery control information 13007 from the engine control ECU 13. The gateway 10 acquires recovery control information 13007 from the engine control ECU 13 as follows before updating the control software of the engine control ECU 13, for example, immediately before the update.
The update control unit 10001 of the gateway 10 transmits a recovery control information acquisition request to the engine control ECU 13 (S801). Upon receiving the recovery control information acquisition request, the update control unit 13001 of the engine control ECU 13 reads the recovery control information 13007 and transmits it to the gateway 10 (S802). Upon receiving this, the gateway 10 executes the recovery process in the same manner as in the first embodiment using the received recovery control information 13007.
Although the description has been given here by taking the engine control ECU 13 as an example, other ECUs can be implemented with the same configuration and sequence.

上述した第2の実施の形態によれば、次の作用効果が得られる。
(1)ECUは、当該ECUのリカバリ処理に用いられる情報であるリカバリ制御情報13007の記憶領域を備え、ゲートウェイ10からの要求に応じてリカバリ制御情報13007を提供する。
そのためゲートウェイ10は、ECUごとのリカバリ処理に関する情報を、インターネット3を介して接続されるサーバ2ではなく物理的に近くに存在するECUから取得してリカバリ処理を行うことができる。また、ECUの追加・交換等により実際の車両の構成とサーバ2で管理されている車両の構成の不一致が生じた場合にはサーバからは適切なリカバリ制御情報が取得できなくなるが、サーバ2と実際の車両システムの構成に相違生じた場合でも、適切にリカバリ制御を行うことができる。
According to the second embodiment described above, the following effects can be obtained.
(1) The ECU includes a storage area for recovery control information 13007, which is information used for recovery processing of the ECU, and provides recovery control information 13007 in response to a request from the gateway 10.
Therefore, the gateway 10 can acquire information on the recovery process for each ECU from the ECU physically nearby instead of the server 2 connected via the Internet 3, and perform the recovery process. Further, if there is a discrepancy between the actual vehicle configuration and the vehicle configuration managed by the server 2 due to the addition or replacement of the ECU, appropriate recovery control information cannot be obtained from the server, but the server 2 and the server 2 Even if there is a difference in the configuration of the actual vehicle system, recovery control can be appropriately performed.

―第3の実施の形態―
図28〜図30を参照して、ソフトウェア更新システムSの第3の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、リカバリ制御情報が中断要因ごとに格納されている点で、第1の実施の形態と異なる。また、本実施の形態における「リカバリ」とは、更新処理の異常によりソフトウェアが更新完了状態へと遷移されていない場合であって、かつ、致命的な異常により更新完了状態に遷移させることができない場合に、ユーザにその旨を通知する動作も含む。ユーザは当該通知により、車両に致命的な異常が発生したことを確認し、ディーラに連絡等必要な手段を講じることができる。
-Third embodiment-
A third embodiment of the software update system S will be described with reference to FIGS. 28 to 30. In the following description, the same components as those in the first embodiment are designated by the same reference numerals, and the differences will be mainly described. The points not particularly described are the same as those in the first embodiment. This embodiment is different from the first embodiment in that recovery control information is mainly stored for each interruption factor. Further, "recovery" in the present embodiment means that the software has not transitioned to the update complete state due to an abnormality in the update process, and cannot be transitioned to the update complete state due to a fatal abnormality. In some cases, it also includes an operation of notifying the user to that effect. By the notification, the user can confirm that a fatal abnormality has occurred in the vehicle and take necessary measures such as contacting the dealer.

(構成)
第3の実施の形態におけるゲートウェイ10のハードウェア構成、およびゲートウェイプログラム100の構成は第1の実施の形態と同様である。ただしゲートウェイプログラム100の動作が後述するように一部異なる。
第3の実施の形態におけるECUのハードウェア構成は第1の実施の形態と同様である。
(Constitution)
The hardware configuration of the gateway 10 and the configuration of the gateway program 100 in the third embodiment are the same as those in the first embodiment. However, the operation of the gateway program 100 is partially different as described later.
The hardware configuration of the ECU in the third embodiment is the same as that in the first embodiment.

図28(a)は、第3の実施の形態における更新パッケージ5の構成例である。図28(a)に示すように、第3の実施の形態における更新パッケージ5の構成は第1の実施の形態と同様であり、ECUリカバリ制御情報に符号5023を用いる点と以下に説明するようにECUリカバリ制御情報5023の構成が第1の実施の形態と異なる。
図28(b)は、第3の実施の形態におけるECUリカバリ制御情報5023の構成を示す図である。ECUリカバリ制御情報5023は、第1の実施の形態におけるECUリカバリ制御情報5021の構成に加えて、1つのリカバリ制御情報数50231、および1つ以上の中断要因50232をさらに備える。そしてECUリカバリ制御情報5023には、それぞれの中断要因50232に対応する、開始タイミング50212、表示内容50213、リカバリ方式50214、およびリカバリデータURI50215が含まれる。リカバリ制御情報数50231は、ECUリカバリ制御情報5023に中断要因50232がいくつ含まれるかを示す。中断要因50232は、更新が中断した要因を示す。以下では、ECUリカバリ制御情報5023に含まれる中断要因50232、開始タイミング50212、表示内容50213、リカバリ方式50214、およびリカバリデータURI50215の組み合わせを、要因別リカバリ制御情報50230と呼ぶ。
FIG. 28A is a configuration example of the update package 5 in the third embodiment. As shown in FIG. 28A, the configuration of the update package 5 in the third embodiment is the same as that in the first embodiment, and the point that reference numeral 5023 is used for the ECU recovery control information will be described below. The configuration of the ECU recovery control information 5023 is different from that of the first embodiment.
FIG. 28B is a diagram showing the configuration of the ECU recovery control information 5023 according to the third embodiment. The ECU recovery control information 5023 further includes one recovery control information number 50231 and one or more interruption factors 50232 in addition to the configuration of the ECU recovery control information 5021 according to the first embodiment. The ECU recovery control information 5023 includes a start timing 50212, a display content 50213, a recovery method 50214, and recovery data URI50215 corresponding to the respective interruption factors 50232. The number of recovery control information 50231 indicates how many interruption factors 50232 are included in the ECU recovery control information 5023. The interruption factor 50232 indicates a factor for which the update was interrupted. In the following, the combination of the interruption factor 50232, the start timing 50212, the display content 50213, the recovery method 50214, and the recovery data URI50215 included in the ECU recovery control information 5023 will be referred to as factor-specific recovery control information 50230.

(動作例)
図29及び図30を用いて、自動運転ECU15について、中断要因ごとに異なるリカバリ制御を行う場合の場合のリカバリ制御情報5023aの構成例、HMI12への表示例、更新状態D1aの構成例、および動作シーケンスを示す。
(Operation example)
A configuration example of recovery control information 5023a, a display example on the HMI 12, a configuration example of the update state D1a, and an operation when different recovery controls are performed for the automatic operation ECU 15 for each interruption factor using FIGS. 29 and 30. Shows the sequence.

第3の実施の形態におけるリカバリ制御情報5023aは、図29(a)に示すように、ECU ID50211a、リカバリ制御情報数50231a、および要因別リカバリ制御情報50230aから構成される。ECU ID50211aには「自動運転ECU」が設定され、リカバリ制御情報数50231には「2」が設定され、第1の中断要因50232aには「電源断・通信断」が設定され、開始タイミング50212aには「走行開始」が設定され、表示内容50213aには「注意喚起」および不図示の表示メッセージ情報が設定され、リカバリ方式50214aには「差分リジューム」が設定され、リカバリデータURI50215aには情報が設定されていないことを意味する「NULL」が設定される。第2の中断要因50232a2には「即時」が設定され、開始タイミング50212a2には「即時」が設定され、表示内容50213a2には「緊急」および不図示の表示メッセージ情報としてディーラへの誘導を促す情報が設定され、リカバリ方式50214a2には情報が設定されていないことを意味する「NULL」が設定され、リカバリデータURI50215a2には情報が設定されていないことを意味する「NULL」が設定される。 As shown in FIG. 29 (a), the recovery control information 5023a according to the third embodiment is composed of the ECU ID 50221a, the number of recovery control information 50231a, and the recovery control information 50230a for each factor. "Automatic operation ECU" is set for ECU ID 50221a, "2" is set for the number of recovery control information 50231, "power cutoff / communication cutoff" is set for the first interruption factor 50232a, and the start timing 50212a is set. Is set to "start running", "caution" and display message information (not shown) are set in the display content 50213a, "difference resume" is set in the recovery method 50214a, and information is set in the recovery data URI50215a. "NULL" which means that it is not done is set. "Immediate" is set for the second interruption factor 50232a2, "immediate" is set for the start timing 50212a2, and "emergency" is set for the display content 50213a2, and information prompting the dealer to be guided as display message information (not shown). Is set, "Null" meaning that no information is set in the recovery method 50214a2 is set, and "Null" meaning that no information is set is set in the recovery data URI50215a2.

リカバリ制御部10004は、表示内容50213a2に基づきHMI12の表示装置に図29(b)に示す画面表示G10a2を出力させる。この画面表示G10a2は、ソフトウェアの更新が致命的エラーにより中断されており、リカバリするためにはディーラーに連絡する必要があることを示す表示である。 The recovery control unit 1004 causes the display device of the HMI 12 to output the screen display G10a2 shown in FIG. 29B based on the display content 50213a2. The screen display G10a2 is a display indicating that the software update has been interrupted due to a fatal error and it is necessary to contact the dealer in order to recover.

第3の実施の形態における更新状態D1aは、図29(c)に示すように、第1の実施の形態における更新状態D1の情報に加え、中断要因D106を備える。中断要因D106は、更新が中断した要因が格納されるフィールドであり、例えば「電源断」「通信断」「FROM故障」などが格納される。 As shown in FIG. 29 (c), the update state D1a in the third embodiment includes the interruption factor D106 in addition to the information of the update state D1 in the first embodiment. The interruption factor D106 is a field in which the factor for which the update is interrupted is stored, and for example, "power failure", "communication disconnection", "FROM failure", etc. are stored.

レコードD11aは第3の実施の形態において自動運転ECU15の更新状態を示すレコードであり、中断要因D106のフィールドには「FROM故障」が格納されている。このように、中断要因D106を記録することにより、更新が中断した要因を認識して適切なリカバリ処理を開始することができる。 The record D11a is a record indicating the update state of the automatic operation ECU 15 in the third embodiment, and "FROM failure" is stored in the field of the interruption factor D106. By recording the interruption factor D106 in this way, it is possible to recognize the cause of the interruption of the update and start an appropriate recovery process.

図30は、第3の実施の形態における自動運転ECU15のリカバリ処理の1例を示すシーケンス図である。たとえば、自動運転ECU15の更新処理が、ゲートウェイ10への電源供給断などにより中断された後で電源供給が再開された後や、自動運転ECU15のFROMの故障により中断した後に、再度イグニッションがONされると、以下のようにリカバリ処理が実行される。
ゲートウェイ10が起動すると、最初に、ステップS901aにおいて中断中の更新の有無を確認する(図11のS701、S702、図30のS901a)。
FIG. 30 is a sequence diagram showing an example of recovery processing of the automatic operation ECU 15 according to the third embodiment. For example, the ignition is turned on again after the update process of the automatic operation ECU 15 is interrupted due to a power supply interruption to the gateway 10 and then the power supply is restarted, or after the update process is interrupted due to a failure of the FROM of the automatic operation ECU 15. Then, the recovery process is executed as follows.
When the gateway 10 is activated, first, in step S901a, it is confirmed whether or not there is an interrupted update (S701 and S702 in FIG. 11 and S901a in FIG. 30).

また、ゲートウェイ10の処理と並行して、自動運転ECU15では、図10(b)に示した起動処理を行う。ここでは、更新が中断し、起動情報D33はまだ書き換わっておらずプログラムエリア1313bP0に記録された制御プログラムの起動が指定されているため、自動運転ECU15は現行のバージョン2の制御プログラムP4を起動する。
ゲートウェイ10は、更新状態D21の更新開始状態D102から自動運転ECU15の更新が中断していると判定すると(S901a)、ステップS910a2において以下の処理を行う。すなわちゲートウェイ10は、更新状態D1aから自動運転ECU15に該当する中断要因D106を読み出し、中断要因を判定する。中断要因が「電源断・通信断」の場合(S910a2:「通信断・電源断」)、次に、ステップS911a2において自動運転ECUリカバリ制御情報5023aから中断要因が「電源断・通信断」であるリカバリ制御情報を読み出し、リカバリ制御情報に基づくリカバリ処理を行う。中断要因が「電源断・通信断」であるリカバリ制御情報に基づくリカバリ処理は、図14のステップS903aからステップS909aまでの処理と同じである。中断要因が「FROM故障」である場合(S910a2:「FROM故障」)、次に、ステップS912a2において自動運転ECUリカバリ制御情報5023aから中断要因が「FROM故障」であるリカバリ制御情報を読み出し、リカバリ制御情報に基づくリカバリ処理を行う。
Further, in parallel with the processing of the gateway 10, the automatic operation ECU 15 performs the activation processing shown in FIG. 10B. Here, since the update is interrupted, the start information D33 has not been rewritten yet, and the start of the control program recorded in the program area 1313bP0 is specified, the automatic operation ECU 15 starts the current version 2 control program P4. To do.
When the gateway 10 determines that the update of the automatic operation ECU 15 is interrupted from the update start state D102 of the update state D21 (S901a), the gateway 10 performs the following processing in step S910a2. That is, the gateway 10 reads the interruption factor D106 corresponding to the automatic operation ECU 15 from the update state D1a, and determines the interruption factor. When the interruption factor is "power interruption / communication interruption" (S910a2: "communication disconnection / power interruption"), then, in step S911a2, the interruption factor is "power interruption / communication interruption" from the automatic operation ECU recovery control information 5023a. Read the recovery control information and perform recovery processing based on the recovery control information. The recovery process based on the recovery control information in which the interruption factor is “power failure / communication disconnection” is the same as the processes from step S903a to step S909a in FIG. When the interruption factor is "FROM failure" (S910a2: "FROM failure"), then, in step S912a2, the recovery control information whose interruption factor is "FROM failure" is read from the automatic operation ECU recovery control information 5023a, and recovery control is performed. Performs recovery processing based on information.

中断要因が「FROM故障」であるリカバリ制御情報に基づくリカバリ処理は、図30(b)に示す手順で行われる。すなわち、ゲートウェイ10は、自動運転ECU15に該当する自動運転ECUリカバリ制御情報5023から中断要因が「FROM故障」である場合の開始タイミング50212a2を読み出し、自動運転ECU15のリカバリ処理を開始するタイミングが、即時であると判定する。次にゲートウェイ10は、ステップS903a2において自動運転ECUリカバリ制御情報5023から中断要因が「FROM故障」である場合の表示内容50213a2を読み出し、表示内容50213a2に基づく緊急画面を表示する要求をHMI12に発行する(S911a2)。HMI12は、この要求に基づき図29(b)のG10a2に例示する緊急画面を表示装置に表示する(S912a2)。 The recovery process based on the recovery control information in which the interruption factor is "FROM failure" is performed by the procedure shown in FIG. 30B. That is, the gateway 10 reads the start timing 50212a2 when the interruption factor is "FROM failure" from the automatic operation ECU recovery control information 5023 corresponding to the automatic operation ECU 15, and the timing to start the recovery process of the automatic operation ECU 15 is immediate. Is determined to be. Next, in step S903a2, the gateway 10 reads out the display content 50213a2 when the interruption factor is "FROM failure" from the automatic operation ECU recovery control information 5023, and issues a request to the HMI 12 to display an emergency screen based on the display content 50213a2. (S911a2). Based on this request, the HMI 12 displays the emergency screen illustrated in G10a2 of FIG. 29 (b) on the display device (S912a2).

上述した第3の実施の形態によれば、以下の作用効果が得られる。
(1)リカバリ制御情報5023は、異常要因ごとのリカバリ制御情報を備え、ゲートウェイ10は、異常要因に応じて適用するリカバリ処理を選択する。
更新が中断する要因がFROMの故障の場合などは、ハードウェアの交換などが必要となり、システム単独でリカバリを行うことが困難であるなど、中断要因によっては、適用可能なリカバリ処理が異なる可能性がある。上記の通りリカバリ制御情報5023を構成し、これを用いることで、ゲートウェイ10は、例えばECUに致命的な異常が発生した場合とそうでない場合で、異なるリカバリ処理を実行し、ユーザに適切な情報を伝えることができる。
According to the third embodiment described above, the following effects can be obtained.
(1) The recovery control information 5023 includes recovery control information for each abnormality factor, and the gateway 10 selects the recovery process to be applied according to the abnormality factor.
If the cause of the update interruption is a FROM failure, hardware replacement is required and it is difficult to perform recovery by the system alone.Therefore, the applicable recovery process may differ depending on the interruption factor. There is. By configuring the recovery control information 5023 as described above and using it, the gateway 10 executes different recovery processes depending on, for example, when a fatal abnormality occurs in the ECU and when it does not, and information appropriate for the user. Can be conveyed.

なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。たとえば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることや各処理における処理の順番を入れ替えることも可能である。たとえば、本実施の形態ではソフトウェア更新装置はゲートウェイ10であるとしたが、通信モジュール11やHMI12がソフトウェア更新装置であってもよい。 The present invention is not limited to the above-mentioned examples, and includes various modifications. For example, the above-described embodiment has been described in detail in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to those having all the described configurations. Further, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. In addition, it is possible to add / delete / replace other configurations or change the order of processing in each processing for a part of the configuration of each embodiment. For example, in the present embodiment, the software update device is the gateway 10, but the communication module 11 and the HMI 12 may be the software update device.

また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、たとえば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するソフトウェアを解釈し、実行することによりソフトウェアで実現してもよい。
また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。
上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
Further, each of the above configurations, functions, processing units, processing means and the like may be realized by hardware by designing a part or all of them by, for example, an integrated circuit. Further, each of the above configurations, functions, and the like may be realized by software by the processor interpreting and executing software that realizes each function.
In addition, the control lines and information lines indicate those that are considered necessary for explanation, and do not necessarily indicate all the control lines and information lines in the product. In practice, it can be considered that almost all configurations are interconnected.
Although various embodiments and modifications have been described above, the present invention is not limited to these contents. Other aspects conceivable within the scope of the technical idea of the present invention are also included within the scope of the present invention.

S … ソフトウェア更新システム
1 … 車両
2 … サーバ
10 … ゲートウェイ
13 … エンジン制御ECU
14 … ブレーキ制御ECU
10001 … 更新制御部
10004 … リカバリ制御部
10005 … リカバリ制御情報管理部
502 … ECUリカバリ制御情報
5021 … ECUリカバリ制御情報
5022 … ECUリカバリデータ
50212 … リカバリ開始タイミング
50212 … 開始タイミング
50213 … 表示内容
50214 … リカバリ方式
S ... Software update system
1 ... Vehicle
2 ... Server 10 ... Gateway 13 ... Engine control ECU
14 ... Brake control ECU
10001… Update control unit 10004… Recovery control unit 10055… Recovery control information management unit 502… ECU recovery control information 5021… ECU recovery control information 5022… ECU recovery data 50212… Recovery start timing 50212… Start timing 50213… Display contents 50214… Recovery method

本発明は、ソフトウェア更新装置、およびソフトウェア更新方法関する。 The present invention, software update device, and relates to a software update process.

特許文献1に記載の発明は、ソフトウェアの更新に異常が発生した場合に、更新を完了できないThe invention described in Patent Document 1 cannot complete the update when an abnormality occurs in the software update .

本発明の第1の態様によるソフトウェア更新装置は、制御装置と接続されるソフトウェア更新装置であって、前記制御装置のソフトウェアを更新前状態から更新完了状態へと遷移させる更新処理を行う更新制御部と、リカバリ制御情報を取得するリカバリ制御情報管理部と、前記更新処理の異常により前記ソフトウェアが前記更新完了状態へと遷移されていない場合に、前記リカバリ制御情報に基づき前記ソフトウェアを前記更新完了状態に遷移させるリカバリ処理を実行するリカバリ制御部とを備え、前記リカバリ制御部は、前記リカバリ処理を実行する場合は、前記ソフトウェア更新装置と前記制御装置との通信設定を変更する
本発明の第2の態様によるソフトウェア更新方法は、制御装置と接続されるソフトウェア更新装置が実行する更新方法であって、前記制御装置のソフトウェアを更新前状態から更新完了状態へと遷移させる更新処理を行うことと、リカバリ制御情報を取得することと、前記更新処理の異常により前記ソフトウェアが前記更新完了状態へと遷移されていない場合に、前記リカバリ制御情報に基づき前記ソフトウェアを前記更新完了状態に遷移させるリカバリ処理を実行することと、前記リカバリ処理を実行する場合は、前記ソフトウェア更新装置と前記制御装置との通信設定を変更することとを含む
The software update device according to the first aspect of the present invention is a software update device connected to a control device, and is an update control unit that performs update processing for transitioning the software of the control device from the pre-update state to the update complete state. And the recovery control information management unit that acquires the recovery control information, and the update completed state of the software based on the recovery control information when the software has not transitioned to the update completed state due to an abnormality in the update process. The recovery control unit includes a recovery control unit that executes the recovery process of transitioning to the above, and the recovery control unit changes the communication setting between the software update device and the control device when executing the recovery process .
The software update method according to the second aspect of the present invention is an update method executed by the software update device connected to the control device, and is an update process for transitioning the software of the control device from the pre-update state to the update complete state. When the software has not transitioned to the update complete state due to an abnormality in the update process, the software is put into the update complete state based on the recovery control information. Execute the recovery process to be transitioned, and when executing the recovery process, it includes changing the communication setting between the software update device and the control device .

本発明によれば、更新完了状態に遷移させるリカバリ処理を迅速に実行できるAccording to the present invention, it is possible to quickly execute the recovery process for transitioning to the update completion state .

Claims (3)

制御装置と接続されるソフトウェア更新装置であって、
前記制御装置のソフトウェアを更新前状態から更新完了状態へと遷移させる更新処理を行う更新制御部と、
リカバリ制御情報を取得するリカバリ制御情報管理部と、
前記更新処理の異常により前記ソフトウェアが前記更新完了状態へと遷移されていない場合に、前記リカバリ制御情報に基づき前記ソフトウェアを前記更新完了状態に遷移させるリカバリ処理を実行するリカバリ制御部とを備え、
前記リカバリ制御情報は前記リカバリ処理の方式を示す情報を含み、
前記リカバリ処理の方式を示す情報は、前記制御装置の構成に基づき決定されることを特徴とするソフトウェア更新装置。
A software updater that is connected to the control device
An update control unit that performs update processing that transitions the software of the control device from the pre-update state to the update complete state.
The recovery control information management unit that acquires recovery control information,
A recovery control unit that executes recovery processing for transitioning the software to the update completion state based on the recovery control information when the software has not transitioned to the update completion state due to an abnormality in the update processing is provided.
The recovery control information includes information indicating the recovery processing method.
A software update device, characterized in that information indicating a recovery processing method is determined based on the configuration of the control device.
請求項1に記載のソフトウェア更新装置と、
前記ソフトウェア更新装置に前記リカバリ制御情報を送信するサーバとを備えるソフトウェア更新システム。
The software update device according to claim 1 and
A software update system including a server that transmits the recovery control information to the software update device.
制御装置と接続されるソフトウェア更新装置が実行するソフトウェア更新方法であって、
前記制御装置のソフトウェアを更新前状態から更新完了状態へと遷移させる更新処理を行うことと、
リカバリ制御情報を取得することと、
前記更新処理の異常により前記ソフトウェアが前記更新完了状態へと遷移されていない場合に、前記リカバリ制御情報に基づき前記ソフトウェアを前記更新完了状態に遷移させるリカバリ処理を実行することとを有し、
前記リカバリ制御情報は前記リカバリ処理の方式を示す情報を含み、
前記リカバリ処理の方式を示す情報は、前記制御装置の構成に基づき決定されたソフトウェア更新方法。
A software update method executed by a software update device connected to a control device.
Performing an update process for transitioning the software of the control device from the pre-update state to the update complete state,
Acquiring recovery control information and
When the software has not transitioned to the update completed state due to an abnormality in the update process, the recovery process for transitioning the software to the update completed state is executed based on the recovery control information.
The recovery control information includes information indicating the recovery processing method.
The information indicating the recovery processing method is a software update method determined based on the configuration of the control device.
JP2020148013A 2020-09-03 2020-09-03 SOFTWARE UPDATE DEVICE, SOFTWARE UPDATE METHOD Active JP7184855B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020148013A JP7184855B2 (en) 2020-09-03 2020-09-03 SOFTWARE UPDATE DEVICE, SOFTWARE UPDATE METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020148013A JP7184855B2 (en) 2020-09-03 2020-09-03 SOFTWARE UPDATE DEVICE, SOFTWARE UPDATE METHOD

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016202767A Division JP6760813B2 (en) 2016-10-14 2016-10-14 Software update device, software update method, software update system

Publications (2)

Publication Number Publication Date
JP2020201986A true JP2020201986A (en) 2020-12-17
JP7184855B2 JP7184855B2 (en) 2022-12-06

Family

ID=73744330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020148013A Active JP7184855B2 (en) 2020-09-03 2020-09-03 SOFTWARE UPDATE DEVICE, SOFTWARE UPDATE METHOD

Country Status (1)

Country Link
JP (1) JP7184855B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116112595A (en) * 2021-11-11 2023-05-12 丰田自动车株式会社 Vehicle management system, server, vehicle, and vehicle management method
WO2023171242A1 (en) * 2022-03-10 2023-09-14 トヨタ自動車株式会社 Communication control device, communication control method, and communication control program

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000315157A (en) * 1994-09-19 2000-11-14 Hitachi Ltd Program updating and restoring method
JP2003337723A (en) * 2002-03-11 2003-11-28 Fujitsu Ltd Difference transfer method, program, and system
JP2004048340A (en) * 2002-07-11 2004-02-12 Ntt Me Corp System for controlling access / connection quality to wide area computer communication network
US20050210459A1 (en) * 2004-03-12 2005-09-22 Henderson Gary S Controlling installation update behaviors on a client computer
JP2010198155A (en) * 2009-02-24 2010-09-09 Fujitsu Ten Ltd Device and method for updating program, and information processing apparatus
JP2011155600A (en) * 2010-01-28 2011-08-11 Oki Electric Industry Co Ltd Communication control apparatus
JP4901955B2 (en) * 2007-03-30 2012-03-21 富士通株式会社 Base station apparatus, communication system, and computer program
JP2013543200A (en) * 2010-11-17 2013-11-28 アップル インコーポレイテッド Networked recovery system
JP2015121987A (en) * 2013-12-24 2015-07-02 株式会社ノーリツ Program update system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000315157A (en) * 1994-09-19 2000-11-14 Hitachi Ltd Program updating and restoring method
JP2003337723A (en) * 2002-03-11 2003-11-28 Fujitsu Ltd Difference transfer method, program, and system
JP2004048340A (en) * 2002-07-11 2004-02-12 Ntt Me Corp System for controlling access / connection quality to wide area computer communication network
US20050210459A1 (en) * 2004-03-12 2005-09-22 Henderson Gary S Controlling installation update behaviors on a client computer
JP4901955B2 (en) * 2007-03-30 2012-03-21 富士通株式会社 Base station apparatus, communication system, and computer program
JP2010198155A (en) * 2009-02-24 2010-09-09 Fujitsu Ten Ltd Device and method for updating program, and information processing apparatus
JP2011155600A (en) * 2010-01-28 2011-08-11 Oki Electric Industry Co Ltd Communication control apparatus
JP2013543200A (en) * 2010-11-17 2013-11-28 アップル インコーポレイテッド Networked recovery system
JP2015121987A (en) * 2013-12-24 2015-07-02 株式会社ノーリツ Program update system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116112595A (en) * 2021-11-11 2023-05-12 丰田自动车株式会社 Vehicle management system, server, vehicle, and vehicle management method
WO2023171242A1 (en) * 2022-03-10 2023-09-14 トヨタ自動車株式会社 Communication control device, communication control method, and communication control program

Also Published As

Publication number Publication date
JP7184855B2 (en) 2022-12-06

Similar Documents

Publication Publication Date Title
JP6760813B2 (en) Software update device, software update method, software update system
US11223525B2 (en) Gateway device, firmware update method, and recording medium
JP2020107355A (en) Virtual machine monitor, and update method of software and firmware
WO2020080273A1 (en) In-vehicle update device, update processing program, and program update method
JP6780724B2 (en) In-vehicle update device, update processing program, and program update method
US20210397433A1 (en) On-board update device, update processing program, program update method, and on-board update system
CN110809755B (en) electronic control system
JP7192415B2 (en) Program update system and update processing program
JP2020201986A (en) Software update device and software update method
WO2023241458A1 (en) Software upgrade method and apparatus for vehicle-mounted controller, and device and storage medium
US11449329B2 (en) Vehicle control device and program update system
JP7331818B2 (en) In-vehicle update device, update processing program, and program update method
CN106095474A (en) For the method and apparatus updating the software in means of transport
US20220391192A1 (en) Ota master, center, system, method, non-transitory storage medium, and vehicle
JP7484791B2 (en) OTA master, update control method, and update control program
WO2023106072A1 (en) In-vehicle device, program, method for updating program, and in-vehicle updating system
CN112799370B (en) Control device, and vehicle-mounted system software restoration method and system
US20230333838A1 (en) Method and device for updating software of an onboard computer in a vehicle, comprising a runtime memory, a backup memory and a control memory
WO2021166603A1 (en) Information processing device, program update system, and program update method
US20220276853A1 (en) Ota master, center, system, update method, and vehicle
US20220391193A1 (en) Ota master, system, method, non-transitory storage medium, and vehicle
JP2023131640A (en) On-vehicle device, program, and updating method of program
JP2023119314A (en) Electronic control device
JP2001022561A (en) Controller
CN117971265A (en) Radar software upgrading method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200903

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201030

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211109

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20220107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220712

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220829

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: 20221025

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221124

R150 Certificate of patent or registration of utility model

Ref document number: 7184855

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150