JP2016170471A - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP2016170471A
JP2016170471A JP2015048103A JP2015048103A JP2016170471A JP 2016170471 A JP2016170471 A JP 2016170471A JP 2015048103 A JP2015048103 A JP 2015048103A JP 2015048103 A JP2015048103 A JP 2015048103A JP 2016170471 A JP2016170471 A JP 2016170471A
Authority
JP
Japan
Prior art keywords
data
rewriting
electronic control
control device
tool
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.)
Pending
Application number
JP2015048103A
Other languages
Japanese (ja)
Inventor
友典 田中
Tomonori Tanaka
友典 田中
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 JP2015048103A priority Critical patent/JP2016170471A/en
Publication of JP2016170471A publication Critical patent/JP2016170471A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten a data rewrite time in an electronic control device.SOLUTION: A non-volatile memory in an electronic control device has secured a reserved region used when rewriting data including a program and a control constant written there. When rewriting data in the non-volatile memory, the electronic control device obtains differential data constituting at least a part of rewritten object data by communication (S6), generates new data by combining the rewritten object data stored in the non-volatile memory and the differential data, and writes the new data in the reserved region (S7).SELECTED DRAWING: Figure 6

Description

本発明は、自動車用などに搭載された電子制御装置に関する。   The present invention relates to an electronic control device mounted on an automobile or the like.

自動車に搭載された電子制御装置においては、フラッシュROM(Read Only Memory)などの不揮発性メモリに格納されたプログラム及び制御定数などのデータを書き換えるとき、書換えツールから送信されるデータによって書き換えることが一般的である。データの書き換え時間を短縮するために、特開2014−182571号公報(特許文献1)に記載されるように、電子制御装置において新旧のデータを比較して差分を抽出し、その差分を書換え対象とする技術が提案されている。   In an electronic control device mounted on an automobile, when data such as a program and a control constant stored in a nonvolatile memory such as a flash ROM (Read Only Memory) is rewritten, it is generally rewritten by data transmitted from a rewriting tool. Is. In order to shorten the data rewriting time, as described in Japanese Patent Application Laid-Open No. 2014-182571 (Patent Document 1), the electronic control device compares old and new data to extract a difference, and the difference is rewritten. A technology has been proposed.

特開2014−182571号公報JP 2014-182571 A

しかしながら、従来の技術においては、比較対象となる新データを書換えツールから電子制御装置へと送信しなければならず、電子制御装置におけるデータ書込み速度と比較して通信速度が遅いことから、データ書換えに時間がかかっていた。   However, in the conventional technology, new data to be compared must be transmitted from the rewriting tool to the electronic control device, and the data rewriting speed is slower than the data writing speed in the electronic control device. It took a long time.

そこで、本発明は、データ書換え時間を短縮可能な、電子制御装置を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an electronic control device that can shorten the data rewriting time.

このため、不揮発性メモリに格納されたデータを、所定規則で分割された任意単位で書き換え可能な電子制御装置は、データの少なくとも一部を書き換える書換えデータを通信によって取得する。そして、電子制御装置は、不揮発性メモリにおける任意単位の書換え部分を特定し、書換えデータと不揮発性メモリにおける書換え部分以外のデータとを合わせてデータを書き換える。   For this reason, an electronic control unit that can rewrite data stored in the nonvolatile memory in arbitrary units divided according to a predetermined rule acquires rewritten data for rewriting at least a part of the data by communication. Then, the electronic control unit specifies a rewrite portion of an arbitrary unit in the nonvolatile memory, and rewrites the data by combining the rewrite data with data other than the rewrite portion in the nonvolatile memory.

本発明によれば、通信データ量が減ることから、データ書換え時間を短縮することができる。   According to the present invention, since the amount of communication data is reduced, the data rewriting time can be shortened.

電子制御装置のデータ書換えシステムの一例を示す概要図である。It is a schematic diagram which shows an example of the data rewriting system of an electronic controller. 電子制御装置の内部構造の一例を示すブロック図である。It is a block diagram which shows an example of the internal structure of an electronic controller. 書換えツールに備えられたデータベースの一例を示すブロック図である。It is a block diagram which shows an example of the database with which the rewriting tool was equipped. サーバに備えられたデータベースの一例を示すブロック図である。It is a block diagram which shows an example of the database with which the server was equipped. ROMに格納されたデータの第1のフォーマットの説明図である。It is explanatory drawing of the 1st format of the data stored in ROM. データ書換え処理の第1実施例を示すフローチャートである。It is a flowchart which shows 1st Example of a data rewriting process. 書換えデータ量と通信データ量との相関関係の説明図である。It is explanatory drawing of the correlation of rewriting data amount and communication data amount. 従来技術及び提案技術の通信データ量を比較した説明図である。It is explanatory drawing which compared the communication data amount of a prior art and a proposal technique. ROMに格納されたデータの第2のフォーマットの説明図である。It is explanatory drawing of the 2nd format of the data stored in ROM. データ書換え処理の第2実施例を示すフローチャートである。It is a flowchart which shows 2nd Example of a data rewriting process. データ書換え処理の第2実施例を示すフローチャートである。It is a flowchart which shows 2nd Example of a data rewriting process. データ書換え処理の第3実施例を示すフローチャートである。It is a flowchart which shows 3rd Example of a data rewriting process. データ書換え処理の第3実施例を示すフローチャートである。It is a flowchart which shows 3rd Example of a data rewriting process.

以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。
図1は、電子制御装置のデータ書換えシステムの一例を示す。
Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 shows an example of a data rewriting system of an electronic control device.

自動車100には、エンジン、自動変速機、ABS(Antilock Brake System)、ESC(Electronic Stability Control)システムなどの制御対象システム200を電子制御する、少なくとも1つの電子制御装置300が搭載されている。また、自動車100の所定箇所には、各種のツールを有線で着脱可能に接続する、サービスコネクタ120が取り付けられている。サービスコネクタ120、制御対象システム200及び電子制御装置300は、例えば、CAN(Controller Area Network)、FlexRay(登録商標)などの車載ネットワーク140を介して、相互に通信可能に接続されている。   The automobile 100 is equipped with at least one electronic control device 300 that electronically controls a control target system 200 such as an engine, an automatic transmission, an ABS (Antilock Brake System), and an ESC (Electronic Stability Control) system. A service connector 120 is attached to a predetermined location of the automobile 100 to connect various tools in a detachable manner by wire. The service connector 120, the control target system 200, and the electronic control device 300 are connected to each other via a vehicle-mounted network 140 such as a CAN (Controller Area Network), FlexRay (registered trademark), or the like so as to communicate with each other.

自動車100のサービスコネクタ120には、電子制御装置300のプログラム及び制御定数などのデータを書き換えるとき、例えば、パーソナルコンピュータなどからなる書換えツール400が着脱可能に接続される。自動車100と書換えツール400との間の通信は、例えば、車載ネットワーク140と同じCAN、FlexRayなどで行うことができる。   When rewriting data such as a program and control constant of the electronic control device 300, the service connector 120 of the automobile 100 is detachably connected with a rewriting tool 400 formed of, for example, a personal computer. Communication between the automobile 100 and the rewriting tool 400 can be performed by, for example, the same CAN or FlexRay as the in-vehicle network 140.

また、書換えツール400は、電子制御装置300のデータを一括管理する、例えば、汎用コンピュータなどからなるサーバ500と通信可能に接続されている。書換えツール400とサーバ500との間の通信は、例えば、有線又は無線によるインターネット、LAN(Local Area Network)、WAN(Wide Area Network)などの公知のネットワークを利用することができる。なお、インターネット、LAN、WANなどを利用することで、書換えツール400とサーバ500との間の通信速度を向上させることができる。   The rewriting tool 400 is communicably connected to a server 500 that collectively manages the data of the electronic control device 300, for example, a general-purpose computer. For communication between the rewriting tool 400 and the server 500, for example, a known network such as the wired or wireless Internet, a LAN (Local Area Network), a WAN (Wide Area Network) can be used. Note that the communication speed between the rewriting tool 400 and the server 500 can be improved by using the Internet, LAN, WAN, or the like.

電子制御装置300は、図2に示すように、プロセッサの一例として挙げられるCPU310と、揮発性メモリの一例として挙げられるRAM(Random Access Memory)320と、不揮発性メモリの一例として挙げられるROM330と、外部装置とデータの送受信を行う入出力回路(I/O)340と、時間を計時するタイマ350と、これらを通信可能に接続するバス360と、を有する。ここで、ROM330は、プログラム及び制御定数などのデータを格納し、例えば、所定単位でデータを消去した後に、その消去領域にデータを書込み可能なフラッシュROMとすることができる。   As shown in FIG. 2, the electronic control device 300 includes a CPU 310 that is an example of a processor, a RAM (Random Access Memory) 320 that is an example of a volatile memory, a ROM 330 that is an example of a nonvolatile memory, It has an input / output circuit (I / O) 340 that transmits / receives data to / from an external device, a timer 350 that measures time, and a bus 360 that connects these to be communicable. Here, the ROM 330 stores data such as programs and control constants. For example, the ROM 330 can be a flash ROM capable of writing data in the erase area after the data is erased in a predetermined unit.

書換えツール400は、図3に示すように、電子制御装置300のデータ構成情報が登録されたデータベース(DB)420を備える。データベース420は、例えば、パーソナルコンピュータのハードディスクに構築され、識別子テーブル422、最新データファイル群424及び差分データファイル群426を有する。識別子テーブル422には、データの構成要素(プログラム、制御定数など)ごとに、最新の構成要素を特定可能な識別子(新ID)と、その次に新しい構成要素を特定可能な識別子(旧ID)と、を関連付けたレコードが格納されている。最新データファイル群424には、最新の構成要素のデータファイルが格納されている。差分データファイル群426には、最新の構成要素のデータとその次に新しい構成要素のデータとの差分データファイル(パッチファイル)が格納されている。   As shown in FIG. 3, the rewriting tool 400 includes a database (DB) 420 in which data configuration information of the electronic control device 300 is registered. The database 420 is constructed on a hard disk of a personal computer, for example, and includes an identifier table 422, a latest data file group 424, and a difference data file group 426. The identifier table 422 includes, for each data component (program, control constant, etc.), an identifier (new ID) that can identify the latest component, and an identifier (old ID) that can identify the next new component. And a record that associates and is stored. The latest data file group 424 stores the latest component data files. The difference data file group 426 stores a difference data file (patch file) between the latest component data and the next new component data.

サーバ500は、図4に示すように、一括管理対象となる電子制御装置300のデータ構成情報が登録されたデータベース520を備える。データベース520は、書換えツール400のデータベース420と同様に、識別子テーブル522、最新データファイル群524及び差分データファイル群526を有する。なお、識別子テーブル522、最新データファイル群524及び差分データファイル群526は、書換えツール400と同一構成であるため、その説明は省略する。但し、サーバ500のデータベース520は、電子制御装置300のデータ構成情報を一括管理するため、例えば、作業者によって最新の状態に維持されている。   As shown in FIG. 4, the server 500 includes a database 520 in which data configuration information of the electronic control device 300 to be collectively managed is registered. Similar to the database 420 of the rewriting tool 400, the database 520 includes an identifier table 522, a latest data file group 524, and a difference data file group 526. The identifier table 522, the latest data file group 524, and the difference data file group 526 have the same configuration as that of the rewriting tool 400, and thus description thereof is omitted. However, the database 520 of the server 500 is maintained in the latest state by, for example, an operator in order to collectively manage the data configuration information of the electronic control device 300.

電子制御装置300のROM330には、図5に示すような第1のフォーマットで、プログラム及び制御定数を含んだデータが格納されていると共に、そのデータを書き換えるために使用される予約領域が確保されている。ROM330は、消去可能な任意のブロック単位で、例えば、領域1〜5に論理的に分割されている。図示の例では、領域1〜4には、所定の機能(機能1〜7)を実現するデータが少なくとも1つ格納されていると共に、領域5が予約領域として確保されている様子を示している。また、各機能1〜7には、その機能を識別可能にする識別子(ID1〜7)が付与されている。各機能1〜7に付与された識別子(ID1〜7)は、書換えツール400の識別子テーブル422及びサーバ500の識別子テーブル522において、新旧のデータを識別する新ID及び旧IDに対応している。   The ROM 330 of the electronic control device 300 stores data including a program and control constants in the first format as shown in FIG. 5, and a reserved area used for rewriting the data is secured. ing. The ROM 330 is logically divided into areas 1 to 5, for example, in any erasable block unit. In the illustrated example, at least one piece of data for realizing a predetermined function (functions 1 to 7) is stored in the areas 1 to 4, and the area 5 is reserved as a reserved area. . In addition, identifiers (ID1 to 7) that can identify the functions are assigned to the functions 1 to 7, respectively. The identifiers (ID 1 to 7) assigned to the functions 1 to 7 correspond to the new ID and the old ID that identify the old and new data in the identifier table 422 of the rewriting tool 400 and the identifier table 522 of the server 500.

ここで、各機能1〜7としては、例えば、データの書換えプログラム、BIOS(Basic Input/Output System)、OS(Operating System)、アプリケーションのプログラム(制御)、アプリケーションの制御定数(定数)などとすることができる。なお、領域1〜4又は各機能1〜7には、空き領域があってもよい。また、電子制御装置300のROM330には、予約領域が確保されていなくてもよい。   Here, the functions 1 to 7 are, for example, a data rewriting program, BIOS (Basic Input / Output System), OS (Operating System), application program (control), application control constant (constant), and the like. be able to. The areas 1 to 4 or the functions 1 to 7 may have free areas. In addition, a reserved area may not be secured in the ROM 330 of the electronic control device 300.

図6は、作業者が書換えツール400を操作して電子制御装置300のデータ書換えを指示したことを契機として、電子制御装置300、書換えツール400及びサーバ500が協働して実行するデータ書換え処理の第1実施例を示す。なお、作業者がデータ書換えを指示する前に、作業者が自動車100のサービスコネクタ120に書換えツール400を接続し、電子制御装置300を予め起動させておく(以下同様)。   FIG. 6 shows a data rewriting process executed in cooperation by the electronic control device 300, the rewriting tool 400, and the server 500 when the operator operates the rewriting tool 400 to instruct data rewriting of the electronic control device 300. The 1st Example of this is shown. Before the worker instructs data rewriting, the worker connects the rewriting tool 400 to the service connector 120 of the automobile 100 and activates the electronic control device 300 in advance (the same applies hereinafter).

ステップ1(図では「S1」と略記する。以下同様。)では、書換えツール400が、書換えツール400のデータベース420とサーバ500のデータベース520とが一致しているか否か、要するに、データベース420が最新の状態になっているか否かを判定する。そして、書換えツール400は、データベース420とデータベース520とが一致していると判定すれば(Yes)、処理をステップ3へと進める。一方、書換えツール400は、データベース420とデータベース520とが一致していないと判定すれば(No)、処理をステップ2へと進める。   In step 1 (abbreviated as “S1” in the figure, the same applies hereinafter), the rewriting tool 400 determines whether or not the database 420 of the rewriting tool 400 and the database 520 of the server 500 match. It is determined whether or not it is in the state. If the rewriting tool 400 determines that the database 420 and the database 520 match (Yes), the rewriting tool 400 advances the process to step 3. On the other hand, if the rewriting tool 400 determines that the database 420 and the database 520 do not match (No), the rewriting tool 400 proceeds to step 2.

ここで、書換えツール400は、例えば、次のような処理によって、書換えツール400のデータベース420とサーバ500のデータベース520とが一致しているか否かを判定することができる。即ち、書換えツール400は、サーバ500に対して識別子テーブル522の送信を要求する。すると、サーバ500は、書換えツール400からの要求に応答して、データベース520の識別子テーブル522を書換えツール400に返送する。そして、書換えツール400は、サーバ500から送信された識別子テーブル522とデータベース420の識別子テーブル422とを比較することで、両者に相違があるか否かを介して、データベース420とデータベース520とが一致しているか否かを判定することができる。   Here, the rewriting tool 400 can determine whether or not the database 420 of the rewriting tool 400 and the database 520 of the server 500 match, for example, by the following process. That is, the rewriting tool 400 requests the server 500 to transmit the identifier table 522. Then, the server 500 returns the identifier table 522 of the database 520 to the rewriting tool 400 in response to the request from the rewriting tool 400. Then, the rewriting tool 400 compares the identifier table 522 transmitted from the server 500 with the identifier table 422 of the database 420 so that the database 420 and the database 520 can be compared with each other through whether or not there is a difference between the two. It can be determined whether or not it is done.

ステップ2では、書換えツール400が、書換えツール400のデータベース420を最新の状態に更新する。即ち、書換えツール400は、サーバ500に対してデータベース520に登録された最新のデータの送信を要求する。すると、サーバ500は、書換えツール400からの要求に応答して、データベース520の内容、具体的には、識別子テーブル522、最新データファイル群524及び差分データファイル群526を書換えツール400に返送する。そして、書換えツール400は、サーバ500から送信されたデータベース520の内容に基づいて、データベース420の識別子テーブル422、最新データファイル群524及び差分データファイル群526を夫々更新する。   In step 2, the rewriting tool 400 updates the database 420 of the rewriting tool 400 to the latest state. That is, the rewriting tool 400 requests the server 500 to transmit the latest data registered in the database 520. Then, in response to the request from the rewriting tool 400, the server 500 returns the contents of the database 520, specifically, the identifier table 522, the latest data file group 524, and the difference data file group 526 to the rewriting tool 400. Then, the rewriting tool 400 updates the identifier table 422, the latest data file group 524, and the difference data file group 526 of the database 420 based on the contents of the database 520 transmitted from the server 500, respectively.

このとき、サーバ500は、データベース520に登録されたデータのうち、機能拡張などによって修正されたデータのみを送信することもできる。このようにすれば、サーバ500から書換えツール400に送信されるデータ量が低減するので、データ送信に要する時間が短くなり、データ書換えに要する時間を短縮することができる。また、サーバ500は、書換えツール400に送信するデータを所定規則で暗号化することもできる。このようにすれば、データの秘匿性を確保することができる。   At this time, the server 500 can also transmit only the data that has been corrected by the function expansion among the data registered in the database 520. In this way, since the amount of data transmitted from the server 500 to the rewriting tool 400 is reduced, the time required for data transmission is shortened, and the time required for data rewriting can be shortened. The server 500 can also encrypt data to be transmitted to the rewriting tool 400 according to a predetermined rule. In this way, data confidentiality can be ensured.

ステップ3では、書換えツール400が、電子制御装置300のROM330に格納された各データ(機能)の識別子を取得する。即ち、書換えツール400は、自動車100の電子制御装置300に対して、ROM330に格納された各データの識別子の送信を要求する。すると、電子制御装置300は、書換えツール400からの要求に応答して、ROM330の各データから識別子を読み出し、例えば、各データの識別子を列挙した識別子情報を書換えツール400に返送する。そして、書換えツール400は、電子制御装置300から送信された識別子情報を受信し、例えば、これをRAM320に一時保存する。   In step 3, the rewriting tool 400 acquires an identifier of each data (function) stored in the ROM 330 of the electronic control device 300. That is, the rewriting tool 400 requests the electronic control device 300 of the automobile 100 to transmit an identifier of each data stored in the ROM 330. Then, in response to the request from the rewriting tool 400, the electronic control device 300 reads the identifier from each data in the ROM 330 and returns, for example, identifier information listing the identifiers of each data to the rewriting tool 400. Then, the rewriting tool 400 receives the identifier information transmitted from the electronic control device 300, and temporarily stores it in the RAM 320, for example.

ステップ4では、書換えツール400が、電子制御装置300のROM330に書換え対象となるデータが存在するか否かを判定する。即ち、書換えツール400は、RAM320に一時保存した識別子情報の各識別子が、データベース420の識別子テーブル422の旧IDに格納されているか否かを介して、書換え対象となるデータが存在するか否かを判定する。そして、書換えツール400は、書換え対象となるデータが存在すると判定すれば(Yes)、処理をステップ5へと進める。一方、書換えツール400は、書換え対象となるデータが存在しないと判定すれば(No)、処理をステップ13へと進める。   In step 4, the rewriting tool 400 determines whether there is data to be rewritten in the ROM 330 of the electronic control device 300. That is, the rewriting tool 400 determines whether or not there is data to be rewritten through whether or not each identifier of the identifier information temporarily stored in the RAM 320 is stored in the old ID of the identifier table 422 of the database 420. Determine. If the rewriting tool 400 determines that there is data to be rewritten (Yes), the rewriting tool 400 proceeds to step 5. On the other hand, if the rewriting tool 400 determines that there is no data to be rewritten (No), the rewriting tool 400 proceeds to step 13.

ステップ5では、書換えツール400が、電子制御装置300のROM330に予約領域が確保されているか否かを判定する。即ち、書換えツール400は、電子制御装置300に対して、ROM330に確保された予約領域の個数を問い合わせる。すると、電子制御装置300は、書換えツール400からの問い合わせに応答して、例えば、ROM330のデータフォーマットを参照し、ROM330に確保されている予約領域の個数を計数して書換えツール400に返送する。ここで、電子制御装置300は、ROM330に予約領域が確保されていない場合、その個数として0を書換えツール400に返送する。また、電子制御装置300は、ROM330に確保された予約領域にデータが書き込まれている場合、その予約領域は使用済であるため、これを計数対象から除外する。そして、書換えツール400は、電子制御装置300から送信された予約領域の個数が0より大きいとき、ROM330に予約領域が確保されていると判定し(Yes)、処理をステップ6へと進める。一方、書換えツール400は、電子制御装置300から送信された予約領域の個数が0のとき、ROM330に予約領域が確保されていないと判定し(No)、処理をステップ8へと進める。   In step 5, the rewriting tool 400 determines whether a reserved area is secured in the ROM 330 of the electronic control device 300. That is, the rewriting tool 400 inquires of the electronic control device 300 about the number of reserved areas secured in the ROM 330. Then, in response to the inquiry from the rewriting tool 400, the electronic control device 300 refers to, for example, the data format of the ROM 330, counts the number of reserved areas secured in the ROM 330, and returns it to the rewriting tool 400. Here, when the reserved area is not secured in the ROM 330, the electronic control device 300 returns 0 as the number to the rewriting tool 400. In addition, when data is written in the reserved area secured in the ROM 330, the electronic control device 300 excludes the reserved area from being counted because the reserved area has been used. Then, when the number of reserved areas transmitted from the electronic control device 300 is greater than 0, the rewrite tool 400 determines that a reserved area is secured in the ROM 330 (Yes), and advances the process to step 6. On the other hand, when the number of reserved areas transmitted from the electronic control device 300 is 0, the rewrite tool 400 determines that no reserved area is secured in the ROM 330 (No), and advances the process to step 8.

ステップ6では、書換えツール400が、電子制御装置300に対して、データの書込み領域としてROM330の予約領域を指定し、データベース420の差分データファイル群426に格納された差分データファイルの中から、書換え対象となるデータの差分データファイルを送信する。ここで、書換えツール400は、データの書き込み領域として指定する予約領域は、未使用のものから順次選定する。また、書換えツール400は、書換え対象となるデータが複数存在する場合、例えば、電子制御装置300のROM330のアドレスが小さい領域から順次選定した、1つの差分データファイルを送信する。   In step 6, the rewrite tool 400 designates a reserved area in the ROM 330 as a data write area for the electronic control unit 300, and rewrites from the differential data files stored in the differential data file group 426 of the database 420. Send the difference data file of the target data. Here, the rewrite tool 400 sequentially selects reserved areas to be designated as data write areas from unused ones. In addition, when there are a plurality of data to be rewritten, the rewrite tool 400 transmits, for example, one differential data file that is sequentially selected from an area with a small address in the ROM 330 of the electronic control device 300.

ステップ7では、電子制御装置300が、ROM330に格納されている既存のデータと書換えツール400から送信された差分データファイルとを合体させて新しいデータを生成、要するに、旧データにパッチを当てながら、指定された予約領域に書き込む。   In step 7, the electronic control unit 300 generates new data by combining the existing data stored in the ROM 330 and the differential data file transmitted from the rewriting tool 400. In short, while patching the old data, Write to the specified reserved area.

ステップ8では、電子制御装置300にデータの書き込み領域を確保するため、電子制御装置300と書換えツール400とが協働して、書換え対象となるデータが格納されている領域を消去する。即ち、書換えツール400は、電子制御装置300に対して、旧IDによって特定されるデータが格納されている領域の消去を命令する。すると、電子制御装置300は、書換えツール400からの命令に応答して、旧IDによって特定されるデータが格納されている領域を消去する。ここで、消去対象となる領域に、書換え対象となるデータに加えて、書換え対象とならないデータが格納されていても、その領域全体を消去する。以下、消去した領域を、「消去領域」と呼ぶ。   In step 8, in order to secure a data writing area in the electronic control apparatus 300, the electronic control apparatus 300 and the rewriting tool 400 cooperate to erase the area where the data to be rewritten is stored. In other words, the rewrite tool 400 instructs the electronic control device 300 to erase the area where the data specified by the old ID is stored. Then, in response to the command from the rewriting tool 400, the electronic control device 300 erases the area where the data specified by the old ID is stored. Here, even if data not to be rewritten is stored in the area to be erased in addition to the data to be rewritten, the entire area is erased. Hereinafter, the erased area is referred to as an “erased area”.

ステップ9では、書換えツール400が、電子制御装置300に対して、データベース420の最新データファイル群424に格納されたデータファイルの中から、消去領域に書き込む最新のデータファイルを送信する。ここで、書換えツール400から電子制御装置300に送信されるデータファイルは、1つに限らず、消去領域に格納されていたデータに応じた数とすることができる。   In step 9, the rewriting tool 400 transmits the latest data file to be written to the erasure area from the data files stored in the latest data file group 424 of the database 420 to the electronic control device 300. Here, the number of data files transmitted from the rewriting tool 400 to the electronic control device 300 is not limited to one, and may be a number corresponding to the data stored in the erase area.

ステップ10では、電子制御装置300が、書換えツール400から送信されたデータファイルを消去領域に書き込む。   In step 10, the electronic control device 300 writes the data file transmitted from the rewriting tool 400 in the erasure area.

ステップ11では、電子制御装置300と書換えツール400とが協働して、電子制御装置300のROM330にデータが正常に書き込まれたか否かを判定する。即ち、電子制御装置300は、例えば、ROM330に書き込んだデータとROM330から読み込んだデータとを比較することでベリファイを行い、そのベリファイ結果を書換えツール400に送信する。書換えツール400は、電子制御装置300から送信されたベリファイ結果に基づいて、データが正常に書き込まれたか否かを判定する。そして、書換えツール400は、データが正常に書き込まれたと判定すれば(Yes)、処理をステップ12へと進める。一方、書換えツール400は、データが正常に書き込まれていないと判定すれば(No)、データ書込みを再度実行すべく、処理をステップ5へと戻す。   In step 11, the electronic control device 300 and the rewriting tool 400 cooperate to determine whether data has been normally written in the ROM 330 of the electronic control device 300. That is, for example, the electronic control device 300 performs verification by comparing data written in the ROM 330 with data read from the ROM 330 and transmits the verification result to the rewriting tool 400. The rewriting tool 400 determines whether data has been normally written based on the verification result transmitted from the electronic control device 300. If the rewriting tool 400 determines that the data has been normally written (Yes), the rewriting tool 400 proceeds to step 12. On the other hand, if the rewriting tool 400 determines that the data is not normally written (No), the rewriting tool 400 returns the process to step 5 in order to execute the data writing again.

ステップ12では、書換えツール400が、書換え対象となるデータに残りがあるか否かを判定する。そして、書換えツール400は、データに残りがないと判定すれば(Yes)、処理をステップ13へと進める。一方、書換えツール400は、データに残りがあると判定すれば(No)、処理をステップ5へと戻す。   In step 12, the rewriting tool 400 determines whether there is any remaining data to be rewritten. If the rewriting tool 400 determines that there is no remaining data (Yes), the rewriting tool 400 proceeds to step 13. On the other hand, if the rewriting tool 400 determines that there is a remaining data (No), the process returns to step 5.

ステップ13では、書換えツール400が、データ書換えが完了したことをモニタに表示する。このようにすれば、作業者は、データ書換えが完了、即ち、電子制御装置300のデータが最新となったことを容易に認識することができる。   In step 13, the rewriting tool 400 displays on the monitor that the data rewriting has been completed. In this way, the operator can easily recognize that the data rewriting is completed, that is, the data of the electronic control device 300 is the latest.

かかるデータ書換えシステムによれば、データ書換え作業を開始するとき、必要に応じて、書換えツール400のデータベース420が最新の状態に更新される。そして、電子制御装置300のROM330に書き込まれているデータの識別子と、データベース420に格納されている最新のデータの識別子(新ID)と、を比較することで、電子制御装置300に書換え対象となるデータがあるか否かが判定される。   According to such a data rewriting system, when starting the data rewriting work, the database 420 of the rewriting tool 400 is updated to the latest state as necessary. Then, by comparing the identifier of the data written in the ROM 330 of the electronic control device 300 with the identifier (new ID) of the latest data stored in the database 420, the electronic control device 300 can be rewritten. Whether there is data to be determined is determined.

電子制御装置300に書換え対象となるデータがある場合、そのROM330に予約領域が確保されていれば、書換えツール400から電子制御装置300へと、書換え対象となるデータの差分データファイルが送信される。そして、電子制御装置300では、ROM330に書き込まれている旧データと差分データファイルとを合体させて新しいデータを生成しながら、これが予約領域に書き込まれる。   When there is data to be rewritten in the electronic control device 300, if a reserved area is secured in the ROM 330, a difference data file of the data to be rewritten is transmitted from the rewriting tool 400 to the electronic control device 300. . Then, in the electronic control device 300, the old data written in the ROM 330 and the difference data file are combined to generate new data, and this is written into the reserved area.

また、電子制御装置300に書換え対象となるデータがある場合、そのROM330に予約領域が確保されていなければ、書換え対象となるデータが格納されている領域が消去される。そして、書換えツール400から電子制御装置300へと、消去領域に書き込むデータの最新データファイルが送信され、これが消去領域に書き込まれる。   Further, when there is data to be rewritten in the electronic control device 300, if the reserved area is not secured in the ROM 330, the area in which the data to be rewritten is stored is deleted. Then, the latest data file of the data to be written in the erase area is transmitted from the rewrite tool 400 to the electronic control device 300, and this is written in the erase area.

電子制御装置300と書換えツール400との間で送受信する通信データは、通信制御に関するデータ量と、データ送信に関するデータ量と、に分けることができる。通信制御に関するデータ量は、データ送信に関するデータ量の大小にかかわらず、同一又は略一定である。従来技術においては、前述したように、書換えツール400から電子制御装置300へとすべてのデータが送信されていたため、図7に示すように、通信データ量は、書換え対象となるデータ量にかかわらず、略一定であった。しかし、本提案技術においては、電子制御装置300のROM330に予約領域が確保されていれば、書換えツール400から電子制御装置300へと差分データファイルが送信される。このため、図7に示すように、通信データ量は、書換え対象となるデータ量に比例して増加し、すべてのデータが書換え対象となっても従来技術と同一である。   Communication data transmitted and received between the electronic control device 300 and the rewriting tool 400 can be divided into a data amount related to communication control and a data amount related to data transmission. The amount of data related to communication control is the same or substantially constant regardless of the amount of data related to data transmission. In the prior art, as described above, all data is transmitted from the rewriting tool 400 to the electronic control device 300. Therefore, as shown in FIG. 7, the communication data amount does not depend on the data amount to be rewritten. It was almost constant. However, in the proposed technique, if a reserved area is secured in the ROM 330 of the electronic control device 300, the difference data file is transmitted from the rewriting tool 400 to the electronic control device 300. For this reason, as shown in FIG. 7, the amount of communication data increases in proportion to the amount of data to be rewritten, and even if all data is to be rewritten, it is the same as in the prior art.

従って、本提案技術においては、電子制御装置300と書換えツール400との間の通信データ量は、図8に示すように、従来技術と比較して減少し、その分だけデータ通信に要する時間を短縮することができる。よって、本提案技術は、データ書換え時間を短縮することができる。   Therefore, in the proposed technique, the communication data amount between the electronic control device 300 and the rewriting tool 400 is reduced as compared with the conventional technique as shown in FIG. 8, and the time required for data communication is reduced accordingly. It can be shortened. Therefore, the proposed technique can shorten the data rewriting time.

電子制御装置300のROM330には、図5に示す第1のフォーマットに限らず、図9に示すような第2のフォーマットで、プログラム及び制御定数を含んだデータが格納されていると共に、そのデータを書き換えるために使用される予約領域が確保されていてもよい。即ち、ROM330は、消去可能な任意のブロック単位で、例えば、領域1〜5に論理的に分割されている。図示の例では、第1のフォーマットとは異なり、各機能1〜7には空き領域がなく、領域1から5に向かって、機能1、空き領域、機能2〜7及び予約領域がこの順番で連続して配置されている。従って、機能の一部、例えば、機能3(OS)、機能5(アプリケーション1の制御定数)及び予約領域などは、2つ以上の領域に亘って配置されることがある。ここで、空き領域は未使用であるので、これを予約領域とみなすこともできる。   The ROM 330 of the electronic control device 300 stores data including programs and control constants in the second format as shown in FIG. 9 as well as in the first format shown in FIG. A reserved area used for rewriting may be reserved. That is, the ROM 330 is logically divided into, for example, areas 1 to 5 in an arbitrary erasable block unit. In the illustrated example, unlike the first format, each function 1 to 7 has no free space, and from region 1 to 5, the function 1, free space, functions 2 to 7 and reserved space are in this order. It is arranged continuously. Accordingly, some of the functions, for example, function 3 (OS), function 5 (control constant of application 1), reserved area, and the like may be arranged over two or more areas. Here, since the empty area is unused, it can be regarded as a reserved area.

なお、第2のフォーマットでは、各機能の配置領域が特定できないため、その機能を識別可能にする識別子は付与されていない。従って、各機能に識別子が付与されているか否かを調べることで、データの配置が第1のフォーマットか第2のフォーマットであるかを判定することができる。   In the second format, since an arrangement area for each function cannot be specified, an identifier for identifying the function is not given. Accordingly, by checking whether or not an identifier is assigned to each function, it is possible to determine whether the data arrangement is in the first format or the second format.

図10及び図11は、作業者が書換えツール400を操作して電子制御装置300のデータ書換えを指示したことを契機として、電子制御装置300、書換えツール400及びサーバ500が協働して実行するデータ書換え処理の第2実施例を示す。なお、先の第1実施例と共通する処理については、重複説明を排除する目的で、その説明を簡単にする(以下同様)。   10 and 11 are executed in cooperation by the electronic control device 300, the rewriting tool 400, and the server 500 when the operator operates the rewriting tool 400 to instruct data rewriting of the electronic control device 300. 2 shows a second embodiment of data rewriting processing. In addition, about the process which is common in the previous 1st Example, the description is simplified for the purpose of eliminating duplication description (the following is the same).

ステップ21では、書換えツール400が、書換えツール400のデータベース420とサーバ500のデータベース520とが一致しているか否かを判定する。そして、書換えツール400は、データベース420とデータベース520とが一致していると判定すれば(Yes)、処理をステップ23へと進める。一方、書換えツール400は、データベース420とデータベース520とが一致していないと判定すれば(No)、処理をステップ22へと進める。   In step 21, the rewriting tool 400 determines whether or not the database 420 of the rewriting tool 400 matches the database 520 of the server 500. If the rewriting tool 400 determines that the database 420 and the database 520 match (Yes), the rewriting tool 400 advances the process to step 23. On the other hand, if the rewriting tool 400 determines that the database 420 and the database 520 do not match (No), the rewriting tool 400 advances the process to step 22.

ステップ22では、書換えツール400が、書換えツール400のデータベース420を最新の状態に更新する。   In step 22, the rewriting tool 400 updates the database 420 of the rewriting tool 400 to the latest state.

ステップ23では、書換えツール400が、電子制御装置300のROM330に格納された各データの識別子を取得する。   In step 23, the rewriting tool 400 acquires an identifier of each data stored in the ROM 330 of the electronic control device 300.

ステップ24では、書換えツール400が、各データの識別子がブランク(未設定)であるか否か、要するに、データの配置が第2のフォーマットであるか否かを判定する。そして、書換えツール400は、各データの識別子がブランクであると判定すれば(Yes)、処理をステップ25へと進める。一方、書換えツール400は、各データの識別子がブランクでない、要するに、データの配置が第1のフォーマットであると判定すれば(No)、処理をステップ34へと進める。   In step 24, the rewriting tool 400 determines whether or not each data identifier is blank (unset), in other words, whether or not the data arrangement is in the second format. If the rewrite tool 400 determines that the identifier of each data is blank (Yes), the rewrite tool 400 advances the process to step 25. On the other hand, if the rewriting tool 400 determines that the identifier of each data is not blank, in other words, the data arrangement is in the first format (No), the process proceeds to step 34.

ステップ25では、書換えツール400が、作業者にデータを書き換えるか否かを選択させる画面をモニタに表示する。そして、作業者は、モニタに表示された画面において、データ書換えを行うか否かを選択する。   In step 25, the rewriting tool 400 displays on the monitor a screen that allows the operator to select whether to rewrite data. Then, the operator selects whether or not to rewrite data on the screen displayed on the monitor.

ステップ26では、書換えツール400が、作業者の選択結果に応じて、データを書き換えるか否かを判定する。そして、書換えツール400は、データを書き換えると判定すれば(Yes)、処理をステップ27へと進める。一方、書換えツール400は、データを書き換えないと判定すれば(No)、処理をステップ43へと進める。   In step 26, the rewriting tool 400 determines whether to rewrite data according to the selection result of the operator. If the rewriting tool 400 determines that the data is to be rewritten (Yes), the processing proceeds to step 27. On the other hand, if the rewrite tool 400 determines that the data is not rewritten (No), the process proceeds to step 43.

ステップ27では、書換えツール400が、作業者に書き換えるデータを選択させる画面をモニタに表示する。そして、作業者は、モニタに表示された画面において、書換えを行うデータを少なくとも1つ選択する。   In step 27, the rewriting tool 400 displays on the monitor a screen that allows the operator to select data to be rewritten. Then, the operator selects at least one data to be rewritten on the screen displayed on the monitor.

ステップ28では、電子制御装置300にデータの書き込み領域を確保するため、電子制御装置300と書換えツール400とが協働して、ROM330の全領域(領域1〜5)を消去する。即ち、書換えツール400は、電子制御装置300に対して、全領域の消去を命令する。そして、電子制御装置300は、書換えツール400からの命令に応答し、ROM330の全領域を消去する。なお、ROM330の空き領域及び予約領域が消去済である場合には、これらに対応する領域を消去しなくてもよい。   In step 28, in order to secure a data writing area in the electronic control unit 300, the electronic control unit 300 and the rewriting tool 400 cooperate to erase all the areas (areas 1 to 5) of the ROM 330. That is, the rewrite tool 400 instructs the electronic control device 300 to erase the entire area. Then, in response to the command from the rewriting tool 400, the electronic control device 300 erases the entire area of the ROM 330. If the free area and the reserved area in the ROM 330 have been erased, the areas corresponding to these areas need not be erased.

ステップ29では、書換えツール400が、データベース420の最新データファイル群424に格納されたデータファイルの中から、電子制御装置300に対して、作業者によって選択されたデータのデータファイルを送信する。ここで、作業者が複数のデータを選択した場合には、書換えツール400は、例えば、作業者が選択した順序で1つのデータファイルを送信する。   In step 29, the rewrite tool 400 transmits the data file of the data selected by the operator to the electronic control device 300 from the data files stored in the latest data file group 424 of the database 420. Here, when the worker selects a plurality of data, the rewriting tool 400 transmits one data file in the order selected by the worker, for example.

ステップ30では、電子制御装置300が、書換えツール400から送信されたデータファイルを消去領域に書き込む。ここで、データファイルは、消去範囲の先頭から順番に書き込まれる。   In step 30, the electronic control device 300 writes the data file transmitted from the rewriting tool 400 in the erase area. Here, the data file is written in order from the beginning of the erase range.

ステップ31では、電子制御装置300と書換えツール400とが協働して、電子制御装置300のROM330にデータが正常に書き込まれたか否かを判定する。そして、書換えツール400は、データが正常に書き込まれたと判定すれば(Yes)、処理をステップ32へと進める。一方、書換えツール400は、データが正常に書き込まれていないと判定すれば(No)、処理をステップ29へと戻す。   In step 31, the electronic control device 300 and the rewriting tool 400 cooperate to determine whether data has been normally written in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that the data has been normally written (Yes), the rewriting tool 400 proceeds to step 32. On the other hand, if the rewriting tool 400 determines that the data has not been written normally (No), it returns the process to step 29.

ステップ32では、書換えツール400が、書換え対象となるデータに残りがあるか否かを判定する。そして、書換えツール400は、データに残りがないと判定すれば(Yes)、処理をステップ33へと進める。一方、書換えツール400は、データに残りがあると判定すれば(No)、処理をステップ29へと戻す。   In step 32, the rewriting tool 400 determines whether there is any remaining data to be rewritten. If the rewriting tool 400 determines that there is no remaining data (Yes), the rewriting tool 400 proceeds to step 33. On the other hand, if the rewriting tool 400 determines that there is a remaining data (No), the process returns to step 29.

ステップ33では、書換えツール400が、データ書換えが完了したことをモニタに表示する。   In step 33, the rewriting tool 400 displays on the monitor that the data rewriting has been completed.

ステップ34では、書換えツール400が、電子制御装置300のROM330に書換え対象となるデータが存在するか否かを判定する。そして、書換えツール400は、書換え対象となるデータが存在すると判定すれば(Yes)、処理をステップ35へと進める。一方、書換えツール400は、書換え対象となるデータが存在しないと判定すれば(No)、処理をステップ33へと進める。   In step 34, the rewriting tool 400 determines whether there is data to be rewritten in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that there is data to be rewritten (Yes), the rewriting tool 400 proceeds to step 35. On the other hand, if the rewriting tool 400 determines that there is no data to be rewritten (No), the rewriting tool 400 proceeds to step 33.

ステップ35では、書換えツール400が、電子制御装置300のROM330に予約領域が確保されているか否かを判定する。そして、書換えツール400は、ROM330に予約領域が確保されていると判定すれば(Yes)、処理をステップ36へと進める。一方、書換えツール400は、ROM330に予約領域が確保されていないと判定すれば(No)、処理をステップ40へと進める。   In step 35, the rewriting tool 400 determines whether a reserved area is secured in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that the reserved area is secured in the ROM 330 (Yes), the rewriting tool 400 proceeds to step 36. On the other hand, if the rewriting tool 400 determines that the reserved area is not secured in the ROM 330 (No), the rewriting tool 400 proceeds to step 40.

ステップ36では、書換えツール400が、電子制御装置300に対して、データの書込み領域としてROM330の予約領域を指定し、データベース420の差分データファイル群426に格納された差分データファイルの中から、書換え対象となるデータの差分データファイルを送信する。   In step 36, the rewriting tool 400 designates a reserved area in the ROM 330 as a data writing area for the electronic control unit 300, and rewrites from the difference data files stored in the difference data file group 426 of the database 420. Send the difference data file of the target data.

ステップ37では、電子制御装置300が、ROM330に格納されている既存のデータと書換えツール400から送信された差分データファイルとを合体させて新しいデータを生成しながら、指定された予約領域に書き込む。   In step 37, the electronic control unit 300 writes the existing data stored in the ROM 330 and the differential data file transmitted from the rewriting tool 400 into the designated reserved area while generating new data.

ステップ38では、電子制御装置300と書換えツール400とが協働して、電子制御装置300のROM330にデータが正常に書き込まれたか否かを判定する。そして、書換えツール400は、データが正常に書き込まれたと判定すれば(Yes)、処理をステップ39へと進める。一方、書換えツール400は、データが正常に書き込まれていないと判定すれば(No)、処理をステップ35へと戻す。   In step 38, the electronic control device 300 and the rewriting tool 400 cooperate to determine whether data has been normally written in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that the data has been normally written (Yes), the rewriting tool 400 proceeds to step 39. On the other hand, if the rewriting tool 400 determines that the data has not been written normally (No), it returns the process to step 35.

ステップ39では、書換えツール400が、書換え対象となるデータに残りがあるか否かを判定する。そして、書換えツール400は、データに残りがないと判定すれば(Yes)、処理をステップ33へと進める。一方、書換えツール400は、データに残りがあると判定すれば(No)、処理をステップ35へと戻す。   In step 39, the rewriting tool 400 determines whether there is any remaining data to be rewritten. If the rewriting tool 400 determines that there is no remaining data (Yes), the rewriting tool 400 proceeds to step 33. On the other hand, if the rewriting tool 400 determines that there is a remaining data (No), the process returns to step 35.

ステップ40では、電子制御装置300にデータの書き込み領域を確保するため、電子制御装置300と書換えツール400とが協働して、書換え対象となるデータが格納されている領域を消去する。   In step 40, in order to secure a data writing area in the electronic control apparatus 300, the electronic control apparatus 300 and the rewriting tool 400 cooperate to erase the area in which the data to be rewritten is stored.

ステップ41では、書換えツール400が、電子制御装置300に対して、データベース420の最新データファイル群424に格納されたデータファイルの中から、消去領域に書き込む最新のデータファイルを送信する。   In step 41, the rewriting tool 400 transmits the latest data file to be written to the erasure area from the data files stored in the latest data file group 424 of the database 420 to the electronic control device 300.

ステップ42では、電子制御装置300が、書換えツール400から送信されたデータファイルを消去領域に書き込む。   In step 42, the electronic control device 300 writes the data file transmitted from the rewriting tool 400 in the erasure area.

ステップ43では、作業者によってデータの書換え作業がキャンセルされたので、書換えツール400が、書換えがキャンセルされたことをモニタに表示する。   In step 43, since the data rewriting operation has been canceled by the operator, the rewriting tool 400 displays on the monitor that the rewriting has been canceled.

かかるデータ書換えシステムによれば、電子制御装置300のROM330に格納されたデータの識別子がブランクであるか否かを介して、データの配置が第1のフォーマットであるか第2のフォーマットであるか否かが判定される。そして、データの配置が第1のフォーマットであれば、先の第1実施例と同様な処理によってデータが書き換えられる。一方、データの配置が第2のフォーマットであれば、作業者に対して、データの書換えを実行するか否か、及び、書換え対象となるデータを選択させる。そして、各データの配置が不定であるため、ROM330の全領域が消去された後、作業者によって選択されたデータのデータファイルが順次送信され、これが消去領域に書き込まれる。   According to such a data rewriting system, whether the data arrangement is in the first format or the second format through whether or not the identifier of the data stored in the ROM 330 of the electronic control device 300 is blank. It is determined whether or not. If the data arrangement is the first format, the data is rewritten by the same processing as in the first embodiment. On the other hand, if the data arrangement is the second format, the operator is made to select whether or not to rewrite the data and to select the data to be rewritten. Since the arrangement of each data is indefinite, after the entire area of the ROM 330 is erased, the data file of the data selected by the operator is sequentially transmitted and written in the erase area.

従って、データの配置が異なっていても、電子制御装置300のROM330のデータを書き換えることができる。このとき、電子制御装置300のROM330は、その全領域が消去されるので、例えば、新旧のデータでサイズが異なっていても、これに対応することができる。なお、他の作用及び効果については、先の第1実施例と同様であるので、必要があればその説明を参照されたい。   Therefore, the data in the ROM 330 of the electronic control device 300 can be rewritten even if the data arrangement is different. At this time, since the entire area of the ROM 330 of the electronic control device 300 is erased, for example, even if the sizes of old and new data are different, this can be dealt with. Since other operations and effects are the same as those in the first embodiment, refer to the description if necessary.

図12及び図13は、作業者が書換えツール400を操作して電子制御装置300のデータ書換えを指示したことを契機として、電子制御装置300、書換えツール400及びサーバ500が協働して実行するデータ書換え処理の第3実施例を示す。   12 and 13 are executed in cooperation by the electronic control device 300, the rewriting tool 400, and the server 500 when the operator operates the rewriting tool 400 to instruct data rewriting of the electronic control device 300. The 3rd Example of a data rewriting process is shown.

ステップ51では、書換えツール400が、書換えツール400のデータベース420とサーバ500のデータベース520とが一致しているか否かを判定する。そして、書換えツール400は、データベース420とデータベース520とが一致していると判定すれば(Yes)、処理をステップ53へと進める。一方、書換えツール400は、データベース420とデータベース520とが一致していないと判定すれば(No)、処理をステップ52へと進める。   In step 51, the rewriting tool 400 determines whether or not the database 420 of the rewriting tool 400 matches the database 520 of the server 500. If the rewriting tool 400 determines that the database 420 and the database 520 match (Yes), the rewriting tool 400 advances the process to step 53. On the other hand, if the rewriting tool 400 determines that the database 420 and the database 520 do not match (No), the rewriting tool 400 advances the process to step 52.

ステップ52では、書換えツール400が、書換えツール400のデータベース420を最新の状態に更新する。   In step 52, the rewriting tool 400 updates the database 420 of the rewriting tool 400 to the latest state.

ステップ53では、書換えツール400が、電子制御装置300のROM330に格納された各データの識別子を取得する。   In step 53, the rewriting tool 400 acquires an identifier of each data stored in the ROM 330 of the electronic control device 300.

ステップ54では、書換えツール400が、電子制御装置300のROM330に書換え対象となるデータが存在するか否かを判定する。そして、書換えツール400は、書換え対象となるデータが存在すると判定すれば(Yes)、処理をステップ55へと進める。一方、書換えツール400は、書換え対象となるデータが存在しないと判定すれば(No)、処理をステップ65へと進める。   In step 54, the rewriting tool 400 determines whether there is data to be rewritten in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that there is data to be rewritten (Yes), the rewriting tool 400 proceeds to step 55. On the other hand, if the rewriting tool 400 determines that there is no data to be rewritten (No), the rewriting tool 400 advances the process to step 65.

ステップ55では、書換えツール400が、電子制御装置300のROM330に予約領域が確保されているか否かを判定する。そして、書換えツール400は、ROM330に予約領域が確保されていると判定すれば(Yes)、処理をステップ56へと進める。一方、書換えツール400は、ROM330に予約領域が確保されていないと判定すれば(No)、処理をステップ66へと進める。   In step 55, the rewriting tool 400 determines whether a reserved area is secured in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that the reserved area is secured in the ROM 330 (Yes), the rewriting tool 400 proceeds to step 56. On the other hand, if the rewriting tool 400 determines that the reserved area is not secured in the ROM 330 (No), the rewriting tool 400 proceeds to step 66.

ステップ56では、電子制御装置300と書換えツール400とが協働して、電子制御装置300のROM330に確保された予約領域が消去、要するに、データを書き込む準備ができているか否かを判定する。即ち、書換えツール400は、電子制御装置300に対して、予約領域が消去されているか否かを問い合わせる。電子制御装置300は、書換えツール400からの問い合わせに応答して、ROM330の予約領域を確認し、書換えツール400に予約領域の状況を返送する。書換えツール400は、電子制御装置300から送信された予約領域の状況に応じて、予約領域が消去されているか否かを判定する。そして、書換えツール400は、予約領域が消去されていないと判定すれば(Yes)、処理をステップ57へと進める。一方、書換えツール400は、予約領域が消去されていると判定すれば(No)、処理をステップ58へと進める。   In step 56, the electronic control device 300 and the rewriting tool 400 cooperate to determine whether or not the reserved area secured in the ROM 330 of the electronic control device 300 is erased, that is, whether data is ready to be written. That is, the rewrite tool 400 inquires of the electronic control device 300 whether or not the reserved area has been erased. In response to the inquiry from the rewriting tool 400, the electronic control device 300 confirms the reserved area in the ROM 330 and returns the status of the reserved area to the rewriting tool 400. The rewriting tool 400 determines whether or not the reserved area has been deleted according to the status of the reserved area transmitted from the electronic control device 300. If the rewriting tool 400 determines that the reserved area has not been erased (Yes), the rewriting tool 400 proceeds to step 57. On the other hand, if the rewriting tool 400 determines that the reserved area has been deleted (No), the rewriting tool 400 advances the process to step 58.

ステップ57では、電子制御装置300と書換えツール400とが協働して、電子制御装置300のROM330に確保された予約領域を消去する。即ち、書換えツール400は、電子制御装置300に対して、予約領域の消去を命令する。電子制御装置300は、電子制御装置300からの命令に応答して、ROM330に確保された予約領域を消去する。   In step 57, the electronic control device 300 and the rewrite tool 400 cooperate to erase the reserved area secured in the ROM 330 of the electronic control device 300. That is, the rewriting tool 400 instructs the electronic control device 300 to erase the reserved area. In response to the command from the electronic control device 300, the electronic control device 300 erases the reserved area secured in the ROM 330.

ステップ58では、書換えツール400が、電子制御装置300に対して、データの書き込み領域としてROM330の予約領域を指定し、データベース420の差分データファイル群426に格納された差分データファイルの中から、書換え対象となるデータの差分データファイルを送信する。   In step 58, the rewriting tool 400 designates a reserved area in the ROM 330 as a data writing area for the electronic control unit 300, and rewrites from the difference data files stored in the difference data file group 426 of the database 420. Send the difference data file of the target data.

ステップ59では、電子制御装置300が、ROM330に格納されている既存のデータと書換えツール400から送信された差分データファイルとを合体させて新しいデータを生成しながら、これを指定された予約領域に書き込む。   In step 59, the electronic control unit 300 combines the existing data stored in the ROM 330 and the differential data file transmitted from the rewriting tool 400 to generate new data, and stores it in the designated reserved area. Write.

ステップ60では、書込みツール400が、電子制御装置300にデータを書き込んでいるときに、例えば、通信ノイズ、バッテリ瞬断などに起因する外乱によって、異常が発生したか否かを判定する。ここで、外乱によって異常が発生したか否かは、書込みツール400が、例えば、通信状態、バッテリ電圧を監視することで判定することができる。そして、書込みツール400は、異常が発生したと判定すれば(Yes)、処理をステップ61へと進める。一方、書込みツール400は、異常が発生していないと判定すれば(No)、処理をステップ63へと進める。   In step 60, when the writing tool 400 is writing data to the electronic control device 300, it is determined whether or not an abnormality has occurred due to a disturbance caused by, for example, communication noise or an instantaneous battery interruption. Here, whether or not an abnormality has occurred due to disturbance can be determined by the writing tool 400 monitoring, for example, the communication state and the battery voltage. If the writing tool 400 determines that an abnormality has occurred (Yes), the writing tool 400 proceeds to step 61. On the other hand, if the writing tool 400 determines that no abnormality has occurred (No), the writing tool 400 proceeds to step 63.

ステップ61では、書込みツール400が、異常が発生したことをモニタに表示する。ここで、モニタの表示には、データの書換え作業を継続するか否かを選択する画面が含まれる。そして、作業者は、この画面を操作し、データの書換え作業を継続するか否かを選択する。なお、モニタの表示には、異常発生の原因を併せて表示することもできる。   In step 61, the writing tool 400 displays on the monitor that an abnormality has occurred. Here, the display on the monitor includes a screen for selecting whether or not to continue the data rewriting work. Then, the operator operates this screen and selects whether or not to continue the data rewriting work. The cause of the abnormality can also be displayed on the monitor display.

ステップ62では、書込みツール400が、作業者の選択結果に応じて、データの書換え作業を継続するか否かを判定する。そして、書込みツール400は、データ書換え作業を続行すると判定すれば(Yes)、処理をステップ64へと進める。一方、書込みツール400は、データ書換え作業を継続しない、要するに、データ書換え作業をキャンセルすると判定すれば(No)、処理を終了させる。   In step 62, the writing tool 400 determines whether or not to continue the data rewriting work according to the selection result of the worker. If the writing tool 400 determines that the data rewriting operation is to be continued (Yes), the processing proceeds to step 64. On the other hand, if the writing tool 400 determines not to continue the data rewriting work, that is, cancels the data rewriting work (No), the writing tool 400 ends the process.

ステップ63では、電子制御装置300と書換えツール400とが協働して、電子制御装置300のROM330にデータが正常に書き込まれたか否かを判定する。そして、書換えツール400は、データが正常に書き込まれたと判定すれば(Yes)、処理をステップ64へと進める。一方、書換えツール400は、データが正常に書き込まれていないと判定すれば(No)、処理をステップ55へと戻す。   In step 63, the electronic control device 300 and the rewriting tool 400 cooperate to determine whether data has been normally written in the ROM 330 of the electronic control device 300. If the rewriting tool 400 determines that the data has been normally written (Yes), the rewriting tool 400 proceeds to step 64. On the other hand, if the rewriting tool 400 determines that the data has not been written normally (No), it returns the process to step 55.

ステップ64では、書換えツール400が、書換え対象となるデータに残りがあるか否かを判定する。そして、書換えツール400は、データに残りがないと判定すれば(Yes)、処理をステップ65へと進める。一方、書換えツール400は、データに残りがあると判定すれば(No)、処理をステップ55へと戻す。   In step 64, the rewriting tool 400 determines whether there is any remaining data to be rewritten. If the rewriting tool 400 determines that there is no remaining data (Yes), the rewriting tool 400 proceeds to step 65. On the other hand, if the rewriting tool 400 determines that there is a remaining data (No), the process returns to step 55.

ステップ65では、書換えツール400が、データ書換えが完了したことをモニタに表示する。   In step 65, the rewriting tool 400 displays on the monitor that the data rewriting has been completed.

ステップ66では、電子制御装置300にデータの書き込み領域を確保するため、電子制御装置300と書換えツール400とが協働して、書換え対象となるデータが格納されている領域を消去する。   In step 66, in order to secure a data writing area in the electronic control apparatus 300, the electronic control apparatus 300 and the rewriting tool 400 cooperate to erase the area where the data to be rewritten is stored.

ステップ67では、書換えツール400が、電子制御装置300に対して、データベース420の最新データファイル群424に格納されたデータファイルの中から、消去領域に書き込む最新のデータファイルを送信する。   In step 67, the rewriting tool 400 transmits the latest data file to be written to the erasure area from the data files stored in the latest data file group 424 of the database 420 to the electronic control device 300.

ステップ68では、電子制御装置300が、書換えツール400から送信されたデータファイルを消去領域に書き込む。   In step 68, the electronic control device 300 writes the data file transmitted from the rewriting tool 400 in the erase area.

かかるデータ書換えシステムによれば、電子制御装置300のROM330にデータを書き込んでいるときに、外乱などによって異常が発生すると、データ書換え作業が中断され、作業継続の要否が作業者によって選択される。そして、データ書換え作業を継続する場合には、データの書換え作業が最初から実行される。このため、異常が発生したときには、最初からデータ書換え作業が再開されるので、一部のデータが正しく書き込まれていないなど、電子制御装置300が不完全な状態で稼働することを抑制できる。   According to such a data rewriting system, if an abnormality occurs due to a disturbance or the like while data is being written to the ROM 330 of the electronic control device 300, the data rewriting operation is interrupted and the necessity of continuing the operation is selected by the operator. . When the data rewriting work is continued, the data rewriting work is executed from the beginning. For this reason, when an abnormality occurs, the data rewriting operation is resumed from the beginning, so that it is possible to prevent the electronic control device 300 from operating in an incomplete state, for example, some data has not been written correctly.

また、電子制御装置300のROM330に予約領域が確保されている場合、その予約領域が消去されていなければ、データ書込みに先立ってこれが消去される。このため、予約領域が消去済である場合、その消去作業が実行されないため、データ書込み作業に要する時間を更に短縮することができる。なお、他の作用及び効果については、先の第1の実施例及び第2の実施例と同様であるので、その説明は省略する。必要があれば、第1の実施例又は第2の実施例の該当箇所を参照されたい。   Further, when a reserved area is secured in the ROM 330 of the electronic control unit 300, if the reserved area is not erased, it is erased prior to data writing. For this reason, when the reserved area has been erased, the erasing operation is not executed, so that the time required for the data writing operation can be further shortened. Since other operations and effects are the same as those in the first and second embodiments, description thereof will be omitted. If necessary, refer to the corresponding part of the first embodiment or the second embodiment.

上記実施形態から、次のような技術的特徴を把握することができる。
不揮発性メモリの一例として挙げられるROM330に格納されたデータを、所定規則で分割された任意単位で書換え可能な電子制御装置300は、データの少なくとも一部を書き換える書換えデータを通信によって取得する。そして、電子制御装置300は、ROM330における任意単位の書換え部分を特定し、書換えデータとROM330における書換え部分以外のデータとを合わせてデータを書き換える。
From the above embodiment, the following technical features can be grasped.
The electronic control device 300 capable of rewriting data stored in a ROM 330, which is an example of a nonvolatile memory, in an arbitrary unit divided according to a predetermined rule, acquires rewritten data for rewriting at least a part of the data by communication. Then, the electronic control device 300 identifies a rewritten portion in an arbitrary unit in the ROM 330, and rewrites the data by combining the rewritten data and data other than the rewritten portion in the ROM 330.

本実施形態では、第1の実施例、第2の実施例及び第3の実施例における各処理を、技術的に矛盾が発生しない限りにおいて、適宜置き換えたり、又は、適宜組み合わせたりすることができる。   In the present embodiment, the processes in the first example, the second example, and the third example can be appropriately replaced or appropriately combined as long as no technical contradiction occurs. .

また、本実施形態は、自動車100に搭載された電子制御装置300に限らず、例えば、インターネットに接続された家電製品などに搭載された電子制御装置にも適用することができる。   Further, the present embodiment is not limited to the electronic control device 300 mounted on the automobile 100, and can be applied to an electronic control device mounted on, for example, a home appliance connected to the Internet.

300 電子制御装置
330 ROM(不揮発性メモリ)
300 Electronic control device 330 ROM (nonvolatile memory)

Claims (3)

不揮発性メモリに格納されたデータを、所定規則で分割された任意単位で書換え可能な電子制御装置であって、
前記データの少なくとも一部を書き換える書換えデータを通信によって取得し、前記不揮発性メモリにおける前記任意単位の書換え部分を特定し、前記書換えデータと前記不揮発性メモリにおける書換え部分以外のデータとを合わせてデータを書き換える、
ことを特徴とする電子制御装置。
An electronic control device capable of rewriting data stored in a nonvolatile memory in an arbitrary unit divided according to a predetermined rule,
Rewrite data for rewriting at least a part of the data is acquired by communication, the rewrite portion of the arbitrary unit in the nonvolatile memory is specified, and the rewrite data and data other than the rewrite portion in the nonvolatile memory are combined Rewrite,
An electronic control device characterized by that.
前記不揮発性メモリにおける書換え部分は、前記任意単位ごとに付された識別情報によって特定される、
ことを特徴とする請求項1に記載の電子制御装置。
The rewrite part in the non-volatile memory is specified by the identification information given to each arbitrary unit,
The electronic control device according to claim 1.
前記不揮発性メモリに、前記書換えデータと前記不揮発性メモリにおける書換え部分以外のデータとを合わせたデータを書き込む予約領域が確保されている、
ことを特徴とする請求項1又は請求項2に記載の電子制御装置。
In the nonvolatile memory, a reserved area for writing data in which the rewritten data and data other than the rewritten portion in the nonvolatile memory are combined is secured.
The electronic control device according to claim 1 or 2, characterized by the above.
JP2015048103A 2015-03-11 2015-03-11 Electronic control device Pending JP2016170471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015048103A JP2016170471A (en) 2015-03-11 2015-03-11 Electronic control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015048103A JP2016170471A (en) 2015-03-11 2015-03-11 Electronic control device

Publications (1)

Publication Number Publication Date
JP2016170471A true JP2016170471A (en) 2016-09-23

Family

ID=56982464

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015048103A Pending JP2016170471A (en) 2015-03-11 2015-03-11 Electronic control device

Country Status (1)

Country Link
JP (1) JP2016170471A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018150820A1 (en) * 2017-02-17 2018-08-23 日立オートモティブシステムズ株式会社 Information processing device
JP2020528629A (en) * 2017-07-25 2020-09-24 オーロラ ラブズ リミテッド Building software delta updates for vehicle ECU software and toolchain-based anomaly detection
WO2021039326A1 (en) * 2019-08-28 2021-03-04 株式会社デンソー Vehicular electronic control system, vehicular master device, method for providing instruction to rewrite through configuration information overwriting, and program for providing instruction to rewrite through configuration information overwriting
WO2023175752A1 (en) * 2022-03-16 2023-09-21 日立Astemo株式会社 Onboard program update system and onboard program update method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001125790A (en) * 1999-10-27 2001-05-11 Mitsubishi Electric Corp Program reloading method for on-vehicle electronics
JP2002044742A (en) * 2000-07-28 2002-02-08 Omron Corp Operating system for vehicle control apparatus and the apparatus
JP2006298260A (en) * 2005-04-22 2006-11-02 Denso Corp Control system for automobile
JP2009048557A (en) * 2007-08-22 2009-03-05 Mitsubishi Electric Corp Data update device, data update method, and data update program
JP2014182571A (en) * 2013-03-19 2014-09-29 Denso Corp On-vehicle electronic control device program rewriting system and on-vehicle relay device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001125790A (en) * 1999-10-27 2001-05-11 Mitsubishi Electric Corp Program reloading method for on-vehicle electronics
JP2002044742A (en) * 2000-07-28 2002-02-08 Omron Corp Operating system for vehicle control apparatus and the apparatus
JP2006298260A (en) * 2005-04-22 2006-11-02 Denso Corp Control system for automobile
JP2009048557A (en) * 2007-08-22 2009-03-05 Mitsubishi Electric Corp Data update device, data update method, and data update program
JP2014182571A (en) * 2013-03-19 2014-09-29 Denso Corp On-vehicle electronic control device program rewriting system and on-vehicle relay device

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018150820A1 (en) * 2017-02-17 2018-08-23 日立オートモティブシステムズ株式会社 Information processing device
JPWO2018150820A1 (en) * 2017-02-17 2019-07-18 日立オートモティブシステムズ株式会社 Information processing device
US11526348B2 (en) 2017-07-25 2022-12-13 Aurora Labs Ltd. Detecting anomalies online using controller processing activity
JP7169340B2 (en) 2017-07-25 2022-11-10 オーロラ ラブズ リミテッド Building Software Delta Updates and Toolchain Based Anomaly Detection for Vehicle ECU Software
US11635955B2 (en) 2017-07-25 2023-04-25 Aurora Labs Ltd. Roll back of data delta updates
US11416242B2 (en) 2017-07-25 2022-08-16 Aurora Labs Ltd. Roll back of data delta updates
US11422793B2 (en) 2017-07-25 2022-08-23 Aurora Labs Ltd. Orchestrator reporting of probability of downtime from machine learning process
US11422794B2 (en) 2017-07-25 2022-08-23 Aurora Labs Ltd. Using data deltas in controllers and managing interdependencies between software versions in controllers using tool chain
US11442721B2 (en) 2017-07-25 2022-09-13 Aurora Labs Ltd. Opportunistic software updates during select operational modes
US11455165B2 (en) 2017-07-25 2022-09-27 Aurora Labs Ltd. Hot updates to controller software using tool chain
US11650807B2 (en) 2017-07-25 2023-05-16 Aurora Labs Ltd. Self-healing learning system for one or more controllers
US11789720B2 (en) 2017-07-25 2023-10-17 Aurora Labs Ltd. Opportunistic software updates during select operational modes
JP2020528629A (en) * 2017-07-25 2020-09-24 オーロラ ラブズ リミテッド Building software delta updates for vehicle ECU software and toolchain-based anomaly detection
US11900103B2 (en) 2017-07-25 2024-02-13 Aurora Labs Ltd. Self-healing learning system for one or more controllers
US11467823B2 (en) 2017-07-25 2022-10-11 Aurora Labs Ltd. Constructing software delta updates for controller software and abnormality detection based on toolchain
US11650808B2 (en) 2017-07-25 2023-05-16 Aurora Labs Ltd. Hot updates to controller software using tool chain
US11829750B2 (en) 2017-07-25 2023-11-28 Aurora Labs Ltd. Orchestrator reporting of probability of downtime from machine learning process
US11704111B2 (en) 2017-07-25 2023-07-18 Aurora Labs Ltd. Using data deltas in controllers and managing interdependencies between software versions in controllers using tool chain
US11822917B2 (en) 2017-07-25 2023-11-21 Aurora Labs Ltd. Detecting anomalies online using controller processing activity
JPWO2021039326A1 (en) * 2019-08-28 2021-03-04
JP7287476B2 (en) 2019-08-28 2023-06-06 株式会社デンソー Vehicle master device, vehicle electronic control system, configuration information rewrite instruction method, and configuration information rewrite instruction program
WO2021039326A1 (en) * 2019-08-28 2021-03-04 株式会社デンソー Vehicular electronic control system, vehicular master device, method for providing instruction to rewrite through configuration information overwriting, and program for providing instruction to rewrite through configuration information overwriting
US11960875B2 (en) 2019-08-28 2024-04-16 Denso Corporation Vehicle master device, vehicle electronic control system, configuration setting information rewrite instruction method, and configuration setting information rewrite instruction program product
WO2023175752A1 (en) * 2022-03-16 2023-09-21 日立Astemo株式会社 Onboard program update system and onboard program update method

Similar Documents

Publication Publication Date Title
JP6889296B2 (en) Gateway device, system and firmware update method
US7895394B2 (en) Storage system
US20230153099A1 (en) Gateway device, in-vehicle network system, and firmware update method
JP2016170471A (en) Electronic control device
JP5547701B2 (en) Electronic control unit for automobile
WO2018157716A1 (en) Smart card
JP5381713B2 (en) Data storage system for virtual machine, data storage method, and data storage program
WO2019123747A1 (en) Electronic control device for automobile and control method thereof
JP4933822B2 (en) Data erasing system, management server, data erasing method and program
JP6030485B2 (en) Electronic control unit
US9569113B2 (en) Data storage device and operating method thereof
JP6299095B2 (en) Shared data definition support system, its master device, local terminal, program
US8302207B2 (en) Computer readable medium for access right management, access right management apparatus and data processing system
JP5945044B2 (en) Electronic control device for automobile, writing system for electronic control device for automobile, and writing method of control program for vehicle control
JP7087334B2 (en) Electronic control device
WO2014038016A1 (en) Control program, control method, and control device
JP2019160133A (en) Information processing device, information processing system, and method
JP2016170813A (en) Electronic controller for automatic vehicle
JP6107710B2 (en) Program management device, vehicle control device, and program management program
CN110737546B (en) Consistency snapshot checking method, device, equipment and storage medium
US11886869B2 (en) Information processing device and information processing method for updating a program by partially relocating the program
JP2019020897A (en) Electronic control device and update software distribution system
JP6875449B2 (en) Storage system and data recovery method
KR102030167B1 (en) Debuging method for embedded device
JP5956505B2 (en) Electronic control unit for automobile

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170317

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180220

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20180814