JP2011133974A - Data rewrite device - Google Patents

Data rewrite device Download PDF

Info

Publication number
JP2011133974A
JP2011133974A JP2009290837A JP2009290837A JP2011133974A JP 2011133974 A JP2011133974 A JP 2011133974A JP 2009290837 A JP2009290837 A JP 2009290837A JP 2009290837 A JP2009290837 A JP 2009290837A JP 2011133974 A JP2011133974 A JP 2011133974A
Authority
JP
Japan
Prior art keywords
program
rewriting
rewrite
rom
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.)
Pending
Application number
JP2009290837A
Other languages
Japanese (ja)
Inventor
Masahiro Mori
昌弘 毛利
Takenobu Tanida
武信 谷田
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2009290837A priority Critical patent/JP2011133974A/en
Publication of JP2011133974A publication Critical patent/JP2011133974A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a data rewrite device for partially performing the rewrite of a program. <P>SOLUTION: The data rewrite device includes: a program execution means 16 for executing the program; and a storage means 14 for integrally storing a first program 32 describing processing, a second program 32 to be read from the first program, and a rewrite program 34 for rewriting a program for update to be rewritten with the second program obtained from the outside, with the second program, wherein when accepting the rewrite of the second program, the rewrite program 34 obtains the program for update from the outside 200, and rewrites only the second program without rewriting the first program and the program for rewrite. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、組み込みソフトを更新するデータ書き換え装置に関し、特に、書き換え時間を抑制するデータ書き換え装置に関する。   The present invention relates to a data rewriting device that updates embedded software, and more particularly, to a data rewriting device that suppresses rewriting time.

車両の電子化が進むにつれて車両に搭載されるECU(Electronic Control Unit)の数も増大しその機能も複雑化している。ECUは、例えばEEPROMやフラッシュメモリ(以下、単にROMという)に記憶されたプログラムを実行して、データ処理やアクチュエータの制御等を行っている。   As the computerization of vehicles progresses, the number of ECUs (Electronic Control Units) mounted on the vehicle also increases and its functions become complicated. The ECU executes a program stored in, for example, an EEPROM or a flash memory (hereinafter simply referred to as a ROM) to perform data processing, actuator control, and the like.

このプログラムは、バージョンアップなどの理由で書き換えられる必要が生じることがあり、この場合、一般的にはサービスステーションなどで書き換えツールを車外からECUに接続させ、プログラムを書き換える。書き換え時には、書き換えツールがECUのROMに記憶された書き換えプログラムを起動して、書き換えプログラムが制御用のプログラムを書き換えるという手順を取ることが多い。   This program may need to be rewritten for reasons such as version upgrade. In this case, the program is generally rewritten by connecting a rewriting tool to the ECU from outside the vehicle at a service station or the like. In rewriting, the rewriting tool often starts a rewriting program stored in the ROM of the ECU, and the rewriting program rewrites the control program.

このため、書き換えプログラムが何らかの理由で起動できないとプログラムを書き換えることができなくなる。そこで、書き換えプログラムを外部から提供する技術が考えられている(例えば、特許文献1参照。)。特許文献1には、プログラミングすべきデータをシリアルデータ伝送線路を介して外部から受け取り、制御プログラム(CONTROL)による制御なしで、ROMをリプログラミングするためのプログラムを導入する制御装置が開示されている。リプログラミングするための書き換えプログラムを外部から導入するので、ROMに欠陥があってもプログラムを書き換えることが可能になる。   For this reason, if the rewriting program cannot be started for some reason, the program cannot be rewritten. Therefore, a technique for providing a rewriting program from the outside has been considered (for example, see Patent Document 1). Patent Document 1 discloses a control device that receives data to be programmed from the outside via a serial data transmission line and introduces a program for reprogramming the ROM without being controlled by a control program (CONTROL). . Since a rewriting program for reprogramming is introduced from the outside, the program can be rewritten even if the ROM is defective.

特開平08−083176号公報Japanese Patent Application Laid-Open No. 08-083176

しかしながら、特許文献1に記載の制御装置では、プログラムの書き換え時間や書き換え対象のプログラムサイズについては考慮されていないという問題がある。   However, the control device described in Patent Document 1 has a problem that the rewrite time of the program and the program size to be rewritten are not considered.

制御用のプログラムを書き変える場合、バージョンアップにより制御用のプログラムのサイズが変わることが多い。コスト低減等のため、ROMには制御用のプログラムや書き換えプログラムだけでなく、これらのプログラムを起動させる起動プログラムも記憶されている。バージョンアップにより制御用のプログラムのサイズが変わると、起動プログラムや書き換えプログラムの領域に制御用のプログラムを記憶する必要が生じ、変更のない制御用のプログラムや起動プログラムも書き換える(同じものを場所を変えて記憶する)必要が生じる。万一、制御用のプログラムや起動プログラムの書き換え中に、ECUへの電源遮断等が生じて書き換えに失敗した場合、制御用のプログラムが破壊されたり制御用プログラムを起動させることができなくなる。   When rewriting a control program, the size of the control program often changes due to version upgrade. In order to reduce costs, the ROM stores not only a control program and a rewrite program, but also a startup program for starting these programs. If the size of the control program changes due to the upgrade, it will be necessary to store the control program in the boot program and rewrite program areas, and rewrite control programs and boot programs that have not changed. Need to change and store). In the unlikely event that the control program or the startup program is being rewritten and the power supply to the ECU is interrupted and the rewriting fails, the control program is destroyed or the control program cannot be started.

また、仮に、バージョンアップにより制御用のプログラムのサイズが変わらなくても、ROMの書き換えは、RAMと比べて時間がかかることが知られており、書き換えるプログラムのサイズが大きいほど時間がかかってしまうことになる。変更があった制御用のプログラムの一部だけを書き換えることも考えられるが、一部のプログラムロジックの追加が他のロジックの命令の番地をずらすため、変更部分がわずかであっても制御用のプログラムは全体を書き換えなければならない。   Even if the size of the control program does not change due to version upgrade, it is known that ROM rewriting takes time compared to RAM, and the larger the size of the rewriting program, the longer it takes. It will be. Although it is possible to rewrite only a part of the control program that has changed, the addition of some program logic shifts the address of the instruction of other logic, so even if there is a slight change, The program must be rewritten entirely.

したがって、従来のプログラムの書き換え方法では、プログラムの書き換えを一部だけに留めたり、プログラムの書き換え時間を短縮できないという問題があった。   Therefore, the conventional program rewriting method has a problem that the rewriting of the program is limited to a part or the rewriting time of the program cannot be shortened.

本発明は、上記課題に鑑み、プログラムの書き換えを一部だけに留めることができるデータ書き換え装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a data rewriting apparatus that can rewrite a program only in part.

上記課題に鑑み、本発明は、プログラムを実行するプログラム実行手段と、処理を記述した第1のプログラムと、前記第1のプログラムから読み出される第2のプログラムと、外部から取得した前記第2のプログラムと置き換えらえる更新用プログラムを、前記第2のプログラムと置き換える書き換えプログラムと、を一体に記憶した記憶手段と、を有し、前記第2のプログラムの書き換えを受け付けた場合、前記書き換えプログラムは、外部から前記更新用プログラムを取得して、前記第1のプログラム及び書き換え用プログラムを書き換えることなく、前記第2のプログラムのみを書き換える、ことを特徴とするプログラム書き換え装置を提供する。   In view of the above problems, the present invention provides a program execution means for executing a program, a first program describing processing, a second program read from the first program, and the second program acquired from the outside. A storage unit that integrally stores a renewal program that replaces the second program with an update program that can be replaced with a program, and when the rewriting of the second program is accepted, The present invention provides a program rewriting apparatus that obtains the update program from outside and rewrites only the second program without rewriting the first program and the rewriting program.

プログラムの書き換えを一部だけに留めることができるデータ書き換え装置を提供することができる。   It is possible to provide a data rewriting device that can rewrite a program only in part.

プログラム書き換え方法に関するECUの構造を模式的に示す図の一例である。It is an example of the figure which shows typically the structure of ECU regarding a program rewriting method. ROMに記憶されたプログラムD、プログラムLを模式的に説明する図の一例である。It is an example of the figure which illustrates typically the program D and the program L which were memorize | stored in ROM. 制御パターンが変更された2次元配列の一例を示す図である。It is a figure which shows an example of the two-dimensional arrangement | sequence where the control pattern was changed. それぞれのROMに記憶される各プログラムを模式的に説明する図の一例である。It is an example of the figure which illustrates typically each program memorized by each ROM. 診断装置の概略構成図の一例である。It is an example of the schematic block diagram of a diagnostic apparatus.

以下、本発明を実施するための形態について図面を参照しながら実施例を挙げて説明する。
図1は、本実施形態のプログラム書き換え方法に関するECU(Electronic Control Unit)100の構造を模式的に示す図の一例である。
本実施形態のプログラム書き換え方法の特徴は以下のとおりである。
(1)制御用のプログラムが、ロジック部分のプログラム32(以下、プログラムLという)と、データ部分のプログラム33(以下、プログラムDという)に分けてコーディングされていること
(2)プログラムDでは、データが処理単位に分けられており、処理そのものを記述することなく、処理の組み合わせ(制御パターン)の指定を受け付けるように構成されていること
(3)ROM14は、ブロック単位など、少なくともプログラムD単位で書き換え可能な物理的構造を有すること
この特徴により、プログラムDだけを書き換えることが可能になる。ロジック部分のプログラムLに比べてプログラムDはサイズが小さいので、制御用のプログラムの書き換え時間を、プログラムLとプログラムDの全体を書き換えるよりも大幅に短縮することができる。
DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
FIG. 1 is an example of a diagram schematically showing the structure of an ECU (Electronic Control Unit) 100 relating to the program rewriting method of the present embodiment.
The features of the program rewriting method of the present embodiment are as follows.
(1) The control program is coded separately into a logic part program 32 (hereinafter referred to as program L) and a data part program 33 (hereinafter referred to as program D). (2) In program D, The data is divided into processing units, and it is configured to accept the designation of a combination (control pattern) of processing without describing the processing itself. (3) The ROM 14 is at least a program D unit such as a block unit. This feature makes it possible to rewrite only the program D. Since the program D is smaller in size than the program L in the logic portion, the rewriting time of the control program can be significantly shortened compared with rewriting the entire program L and program D.

また、プログラムDは、処理そのものでなく処理の組み合わせが記述されているので、組み合わせに含まれる処理の指定に変更があってもプログラムDのサイズに影響しない。このため、プログラムDを書き換えてもプログラムL、書き換えプログラム及び起動プログラムを書き換える必要が生じない。   In addition, since the program D describes a combination of processes, not the process itself, the size of the program D is not affected even if the designation of the process included in the combination is changed. For this reason, even if the program D is rewritten, it is not necessary to rewrite the program L, the rewrite program, and the startup program.

〔ECU100〕
ECU100について説明する。ECU100には種々のものがあるが図1のECU100の構成は、プログラムの書き換えの説明に好適な部分だけを取り出したものである。本実施形態のプログラム書き換え方法は、車載された種々のECU(エンジンECU、ボデイECU、マルチメディア系ECU、ナビECU、画像処理ECU等)に適用できる。
[ECU 100]
The ECU 100 will be described. Although there are various types of ECUs 100, the configuration of the ECU 100 in FIG. 1 is obtained by taking out only a part suitable for explanation of rewriting of the program. The program rewriting method of this embodiment can be applied to various ECUs (engine ECU, body ECU, multimedia ECU, navigation ECU, image processing ECU, etc.) mounted on the vehicle.

ECU100は、主に、ドライバ12及びマイコン13を有する。この他、リセット回路、判定回路、アクチュエータやスイッチ素子と接続するI/OやASIC(Application Specific Integrated Circuit)を有していることがある。   The ECU 100 mainly includes a driver 12 and a microcomputer 13. In addition, a reset circuit, a determination circuit, an I / O connected to an actuator or a switch element, or an ASIC (Application Specific Integrated Circuit) may be included.

ECU100は、コネクタ11を介して書き換えツール200と接続される。コネクタ11は、サービスステーションにある書き換えツール200やOBD2に対応した外部診断ツールを接続するインターフェイスである。コネクタ11は、例えば車両の運転席の周囲に設けられている。書き換えツール200とECU100は、車載ネットワークと同じプロトコル(例えば、CAN(Controller Area Network)やFlexRay等)により通信する。なお、物理的にコネクタ11を介してECU100と書き換えツール200を接続するのでなく、書き換えツール200と車両側の無線通信装置が通信してもよい。無線通信装置は、例えば、携帯電話、無線LAN装置等である。   The ECU 100 is connected to the rewriting tool 200 via the connector 11. The connector 11 is an interface for connecting a rewriting tool 200 in the service station and an external diagnostic tool corresponding to the OBD2. The connector 11 is provided, for example, around the driver's seat of the vehicle. The rewriting tool 200 and the ECU 100 communicate with each other by the same protocol as the in-vehicle network (for example, CAN (Controller Area Network), FlexRay, etc.). Instead of physically connecting the ECU 100 and the rewriting tool 200 via the connector 11, the rewriting tool 200 and the wireless communication device on the vehicle side may communicate with each other. The wireless communication device is, for example, a mobile phone or a wireless LAN device.

ドライバ12は、例えばCAN通信のプロトコルのうち物理層やデータリンク層における通信制御を提供する。したがって、ドライバ12は書き換えツール200から受信した電気信号を規定された電圧の電気信号に変換するなど、物理的な通信経路を提供する。   The driver 12 provides communication control in the physical layer and the data link layer in the CAN communication protocol, for example. Accordingly, the driver 12 provides a physical communication path such as converting the electrical signal received from the rewriting tool 200 into an electrical signal having a specified voltage.

マイコン13は、内部バスを介して接続されたCOM15、CPU16、RAM17及びROM14と接続されている。COM15はドライバ12と接続されており、CAN通信のプロトコルに従って、書き換えツール200から書き込み対象のプログラムDを受信する。   The microcomputer 13 is connected to a COM 15, a CPU 16, a RAM 17, and a ROM 14 that are connected via an internal bus. The COM 15 is connected to the driver 12 and receives the program D to be written from the rewriting tool 200 according to the CAN communication protocol.

CPU16は、ROM14に記憶されたプログラムD及びプログラムLを実行することで、センサの検出した信号の処理、車両制御用の信号の演算、アクチュエータの制御、等を実行する。なお、プログラムDはほぼデータのみしか保持していないので、CPU16がプログラムDだけを実行することはない。また、プログラムDを書き換える際、CPU16はROM14に記憶された書き換えプログラム34を実行して、一連の書き換え処理を統合的に制御する。RAM17は、CPU16が書き換えツール200から受信したプログラムDを一時的に保管する記憶手段である。また、RAM17は、CPU16が書き換えプログラム34を実行する際の作業メモリとなる。   The CPU 16 executes the program D and the program L stored in the ROM 14, thereby executing processing of signals detected by the sensors, calculation of signals for vehicle control, control of actuators, and the like. Since the program D holds almost only data, the CPU 16 does not execute only the program D. Further, when rewriting the program D, the CPU 16 executes a rewriting program 34 stored in the ROM 14 and controls a series of rewriting processes in an integrated manner. The RAM 17 is a storage unit that temporarily stores the program D received by the CPU 16 from the rewriting tool 200. The RAM 17 serves as a working memory when the CPU 16 executes the rewriting program 34.

ROM14について説明する。ROM14は、例えばフラッシュメモリを実体とするEEPROM(Electrically Erasable and Programmable Read Only Memory)である。ROM14は、書き換え可能な不揮発メモリであればよく、例えばFeRAM(Ferroelectric Random Access Memory)、MRAM(Magnetoresistive Random Access Memory)等でもよい。ただしブロック毎の書き換えが可能である必要がある。ROM14がフラッシュメモリの場合、ROM14へのアクセスはフラッシュメモリコントローラと呼ばれるICが制御するが図では省略した。フラッシュメモリコントローラは、RAM17又は不図示のバッファメモリからROM14へ、又は、ROM14からRAM17又は不図示のバッファメモリへ、データを転送する。   The ROM 14 will be described. The ROM 14 is, for example, an EEPROM (Electrically Erasable and Programmable Read Only Memory) having a flash memory as an entity. The ROM 14 may be any rewritable nonvolatile memory, and may be, for example, an FeRAM (Ferroelectric Random Access Memory), an MRAM (Magnetoresistive Random Access Memory), or the like. However, it is necessary to be able to rewrite each block. When the ROM 14 is a flash memory, access to the ROM 14 is controlled by an IC called a flash memory controller, which is omitted in the figure. The flash memory controller transfers data from the RAM 17 or a buffer memory (not shown) to the ROM 14 or from the ROM 14 to the RAM 17 or a buffer memory (not shown).

また、ROM14がフラッシュメモリの場合、消去できる最少のサイズが決まっている。このサイズは、例えば、8Kbytes〜64Kbytesなどであり、このサイズを1ブロックという。消去単位をブロック化することで、消去の高速化、内部構造の簡略化、大容量化等が可能になる。   Further, when the ROM 14 is a flash memory, the minimum size that can be erased is determined. This size is, for example, 8 Kbytes to 64 Kbytes, and this size is called one block. By making the erase unit into blocks, it is possible to speed up the erase, simplify the internal structure, increase the capacity, and the like.

〔プログラムL、プログラムDのデータ構造〕
図2を用いて、ROM14に記憶されているデータについて説明する。図2は、ROM14に記憶されたプログラムD、プログラムLを模式的に説明する図の一例である。上記のとおり、ROM14には、プログラムL、プログラムD、書き換えプログラム34、又は、起動プログラム31が記憶されている。図2ではソースコードだが実際にはコンパイル後に記憶されている。
[Data structure of program L and program D]
The data stored in the ROM 14 will be described with reference to FIG. FIG. 2 is an example of a diagram schematically illustrating the program D and the program L stored in the ROM 14. As described above, the ROM 14 stores the program L, the program D, the rewriting program 34, or the startup program 31. In FIG. 2, the source code is actually stored after compilation.

起動プログラム31と書き換えプログラム34は公知のものである。起動プログラム31は、IGオンやACCオンにより、リセット回路がマイコン13をリセットすると起動される。例えばIGオンにより、各ECU100の端子にHigh信号が入力されるとそれぞれのリセット回路がCPU16やレジスタなどの回路にリセット信号を出力する。これによりマイコン13が初期化される。CPU16はリセット割込みがあったことを検知してROM14の特定のアドレスに記憶されているリセットベクタの内容をPC(プログラムカウンタ)に設定する。この特定のアドレスの先頭に起動プログラム31が記憶されている。   The start program 31 and the rewrite program 34 are known. The activation program 31 is activated when the reset circuit resets the microcomputer 13 by turning on IG or ACC. For example, when the IG is turned on and a High signal is input to the terminal of each ECU 100, each reset circuit outputs a reset signal to a circuit such as the CPU 16 or a register. Thereby, the microcomputer 13 is initialized. The CPU 16 detects that a reset interrupt has occurred, and sets the contents of the reset vector stored at a specific address in the ROM 14 in a PC (program counter). An activation program 31 is stored at the head of this specific address.

CPU16は、PCが指定するアドレスの起動プログラム31の実行を開始する。起動プログラム31は、例えば、アクチュエータやセンサのパラメータ、レジスタ等を設定し、アクチュエータ等の制御に必要なデータをRAM17に読み込む。最終的に起動プログラム31は、ROM14に記憶されているプログラムLの先頭アドレス(例えば、Main関数のアドレス)をPCに設定して終了する。以降、CPU16は、車両制御のためにプログラムLを実行していく。   The CPU 16 starts executing the activation program 31 at the address specified by the PC. For example, the activation program 31 sets parameters, registers, and the like of actuators and sensors, and reads data necessary for controlling the actuators into the RAM 17. Finally, the start program 31 sets the start address (for example, the address of the Main function) of the program L stored in the ROM 14 to the PC and ends. Thereafter, the CPU 16 executes the program L for vehicle control.

書き換えプログラム34は、プログラムDのみ、プログラムD及びプログラムL、又は、ROM14の全体を書き換えることができるプログラムである。本実施形態ではプログラムDのみを書き換える手順を説明する。書き換えプログラム34を起動する方法は種々あるが、例えば、リセット回路によるリセット信号を利用する方法や、書き換えツール200から受信する信号(書き換え指示信号)を利用する方法がある。   The rewriting program 34 is a program that can rewrite only the program D, the program D and the program L, or the entire ROM 14. In the present embodiment, a procedure for rewriting only the program D will be described. There are various methods for activating the rewrite program 34. For example, there are a method using a reset signal from a reset circuit and a method using a signal (rewrite instruction signal) received from the rewrite tool 200.

リセット信号を利用する方法の場合、上記のようにリセット回路がマイコン13をリセットした際、CPU16がCOM15から割り込みを検出することで、ECU100に書き換えツール200が接続されていることを検出する。リセット信号により起動した起動プログラム31は、書き換えツール200が接続されていることをCOM15からの割り込みを示すフラグ等により検出し、制御用のプログラムLでなく、書き換えプログラム34を起動すべきであると判定する。なお、書き換えプログラム34は、ROM14の全体を書き換えることもできるため、書き換えプログラム34を退避しておかないと書き換え中にCPU16が書き換えプログラム34を実行できない状況となってしまう。このため、起動プログラム31は、書き換えプログラム34をRAM17にコピーして、RAM17における書き換えプログラム34のアドレスをPCにセットする。   In the case of a method using a reset signal, when the reset circuit resets the microcomputer 13 as described above, the CPU 16 detects an interrupt from the COM 15 to detect that the rewriting tool 200 is connected to the ECU 100. The activation program 31 activated by the reset signal detects that the rewriting tool 200 is connected by using a flag indicating an interrupt from the COM 15 and should activate the rewriting program 34 instead of the control program L. judge. Since the rewriting program 34 can also rewrite the entire ROM 14, the CPU 16 cannot execute the rewriting program 34 during rewriting unless the rewriting program 34 is saved. Therefore, the activation program 31 copies the rewrite program 34 to the RAM 17 and sets the address of the rewrite program 34 in the RAM 17 in the PC.

また、書き換えツール200から受信した書き換え指示信号を利用する場合、すでにプログラムLが起動しているので、プログラムLに記述された起動関数(起動プログラム31と同等の機能を有する)が、書き換えプログラム34に制御を移すと判定する。起動関数は、書き換えプログラム34をRAM17にコピーして、RAM17における書き換えプログラム34のアドレスをPCにセットする。   When the rewrite instruction signal received from the rewrite tool 200 is used, since the program L has already been activated, the activation function described in the program L (having a function equivalent to the activation program 31) is replaced by the rewrite program 34. It is determined that control is transferred to. The activation function copies the rewrite program 34 to the RAM 17 and sets the address of the rewrite program 34 in the RAM 17 in the PC.

いずれの場合も、CPU16がRAM17から書き換えプログラム34を実行できるようになる。なお、書き換えプログラム34は、安全のためROM14の全体又はプログラムDのみを書き換えツール200に転送してから書き換えを実行してもよい。   In either case, the CPU 16 can execute the rewrite program 34 from the RAM 17. Note that the rewriting program 34 may execute rewriting after transferring the entire ROM 14 or only the program D to the rewriting tool 200 for safety.

起動した書き換えプログラム34は、プログラムDの送信を書き換えツール200に要求する。書き換えツール200はプログラムDの送信を開始するので、マイコン13はCOM15経由でプログラムDを受信する。プログラムDはCANフレームに格納された状態で何回かに分けて送信される。書き換えプログラム34は、受信したプログラムDを順番にRAM17に記憶していく。そして、RAM17にある程度の容量のプログラムDが記憶されると、不図示のフラッシュメモリコントローラにプログラムDをROM14に書き込むように要求する。   The activated rewriting program 34 requests the rewriting tool 200 to transmit the program D. Since the rewriting tool 200 starts transmission of the program D, the microcomputer 13 receives the program D via the COM 15. The program D is transmitted several times while being stored in the CAN frame. The rewriting program 34 stores the received program D in the RAM 17 in order. When a certain amount of program D is stored in the RAM 17, the flash memory controller (not shown) is requested to write the program D into the ROM 14.

本実施形態では、ROM14におけるプログラムDのアドレスは固定であるので、書き換えプログラム34は、既知の又は診断ツール200から指示されたプログラムDの先頭アドレスをフラッシュメモリコントローラに通知する。したがって、フラッシュメモリコントローラは、ROM14のプログラムDのための領域にRAM17のプログラムDを記憶させることができる。書き換えプログラム34とフラッシュメモリコントローラは、以上の作業を繰り返してプログラムDをROM14に記憶していく。   In the present embodiment, since the address of the program D in the ROM 14 is fixed, the rewriting program 34 notifies the flash memory controller of the head address of the program D that is known or instructed from the diagnostic tool 200. Therefore, the flash memory controller can store the program D of the RAM 17 in the area for the program D of the ROM 14. The rewrite program 34 and the flash memory controller repeat the above operations and store the program D in the ROM 14.

書き換えプログラム34は、書き換えツール200からプログラムDの送信が終わった旨の終了通知を受け取ると、終了処理を実行する。例えば、書き換えツール200からマイコン13にリセット信号を入力してもよいし、ACCをオフ→オンとすることでマイコン13をリセットしてもよい。リセット後は、起動プログラム31はプログラムLをCPU16に実行させることができる。   When the rewriting program 34 receives an end notification indicating that the transmission of the program D is completed from the rewriting tool 200, the rewriting program 34 executes an end process. For example, a reset signal may be input from the rewriting tool 200 to the microcomputer 13 or the microcomputer 13 may be reset by turning ACC off → on. After the reset, the activation program 31 can cause the CPU 16 to execute the program L.

<プログラムL>
本実施形態では制御用のプログラムをプログラムLとプログラムDに区分している。プログラムLは、制御のための処理を記述したロジックを有する。制御のための処理とは、センサが検出した信号の取得処理、信号値と閾値の比較処理、信号値に対する演算処理、演算結果に基づく制御処理、等である。ECU100が可能な制御は決まっており、制御のための処理も決まっている。例えば、設計者は、このECU100で必要な各制御の各処理を抽出し、プログラムとして関数化、サブルーチン化等する。関数化やサブルーチン化という言葉は、プログラム言語の仕様に応じたものであり、実際の呼称は問わない。
<Program L>
In this embodiment, the control program is divided into a program L and a program D. The program L has a logic describing a process for control. Processing for control includes acquisition processing of a signal detected by a sensor, comparison processing of a signal value and a threshold value, calculation processing for a signal value, control processing based on a calculation result, and the like. Controls that can be performed by the ECU 100 are determined, and processing for control is also determined. For example, the designer extracts each process of each control required by the ECU 100 and converts it into a function, a subroutine, etc. as a program. The terms “functionalization” and “subroutineization” are in accordance with the specifications of the programming language, and the actual names are not limited.

なお、設計者が抽出する処理は、着目しているECU100が現在可能な処理に限られない。というのは、車両にオプション(例えば、ムーンルーフ)が装着されることで必要になる処理(ムーンルーフの開閉等)もある等、ECU100は将来的に利用される機能も有するためである。   Note that the process extracted by the designer is not limited to the process that can be currently performed by the ECU 100 of interest. This is because the ECU 100 also has functions that will be used in the future, such as processing (such as opening and closing the moon roof) that is required when an option (for example, moon roof) is mounted on the vehicle.

設計者は、このように、ECU100が可能な処理を所定の粒度で抽出する。粒度は、例えば、それ以上、細分化できない1つの処理であるが、より細分化できても処理1と処理2が必ず連続して実行されるような場合は処理1と処理2で1つの処理とすることができる。   In this way, the designer extracts the processing that can be performed by the ECU 100 with a predetermined granularity. The granularity is, for example, one process that cannot be further subdivided. However, even if the process can be further subdivided, if the process 1 and the process 2 are always executed consecutively, the process 1 and the process 2 are one process. It can be.

図2では、fancA、fancB…がそれぞれ1つの処理であり、それぞれ処理に対応したロジックが記述されているとする。本実施形態では説明のためfancA〜fancZの計26個の処理が関数化されているものとするが、処理の数は1以上であればいくつでもよい。なお、例えばfancAの処理は温度センサの値をチェックする処理で、fancBの処理は前回値と現在の値を比較する処理である。   In FIG. 2, it is assumed that fancA, fancB... Are each one process, and logic corresponding to each process is described. In the present embodiment, for the sake of explanation, it is assumed that a total of 26 processes of fancA to fancZ are functioned. However, the number of processes may be any number as long as it is 1 or more. For example, the process of fancA is a process of checking the value of the temperature sensor, and the process of fancB is a process of comparing the previous value with the current value.

各関数は、プログラム言語の仕様に沿った位置に記述される。図2では、C言語を例にしているため、main_routine() よりも前にプロトタイプが宣言され、プロトタイプの宣言に続いて関数の内容も記述されている。なお、「void funcA(void)」のうち、最初のvoidは返却値がないことを、括弧内のvoidは引数がないことをそれぞれ意味する。したがって、処理の内容によっては「double funcA(double)」のような関数もある。   Each function is described at a position according to the specification of the programming language. In FIG. 2, since the C language is taken as an example, a prototype is declared before main_routine (), and the contents of the function are also described following the declaration of the prototype. In “void funcA (void)”, the first void means that there is no return value, and the void in parentheses means that there is no argument. Therefore, there is a function such as “double funcA (double)” depending on the contents of processing.

main_routine()は、関数を呼び出す、プログラムLの実行部分である。
「for(i = 0; i<26 ; i++)」は、整数「i」を「0〜25」まで順番に変化させることを意味し、「FuctionTbl[i][mode]()」は、プログラムDのFuctionTblに格納された関数(正確には関数が格納されたアドレスを示すポインタ)を呼び出すことを意味する。[mode]は固定である。関数はテーブル状に登録されているので、この例では最大で26個の関数を連続的に呼び出すことができる。
main_routine () is an execution part of the program L that calls a function.
“For (i = 0; i <26; i ++)” means that the integer “i” is changed in order from “0 to 25”, and “FuctionTbl [i] [mode] ()” This means that the function stored in the FuctionTbl of D (to be exact, a pointer indicating the address where the function is stored) is called. [mode] is fixed. Since the functions are registered in a table, in this example, a maximum of 26 functions can be called continuously.

ここで、「mode」は、所定の範囲の整数を取り得る。「mode」は、車両の制御モードや車両状況等により定まる。プログラムLの不図示の記述が、車両の制御モードを他のECU100から取得したり、車両の状況等を判別するなどして、「mode」を指定する。例えば、運転者がecoモードをオンにしている場合には、プログラムLはそのことを示す「mode」を設定し、アダプティブクルーズコントロールが作動している場合には、プログラムLはそのことを示す「mode」を設定する。こうすることで、プログラムLは制御パターンを「mode」により指定することができる。   Here, “mode” can take an integer in a predetermined range. The “mode” is determined by the vehicle control mode, the vehicle status, and the like. A description (not shown) of the program L designates “mode” by acquiring the control mode of the vehicle from another ECU 100 or determining the situation of the vehicle. For example, when the driver turns on the eco mode, the program L sets “mode” indicating that, and when the adaptive cruise control is operating, the program L indicates “ mode ”is set. By doing so, the program L can specify the control pattern by “mode”.

<プログラムD>
プログラムDは、2次元配列にポインタを格納したテーブル状のデータである。「void(*const FunctionTbl[26][5](void))は、2次元配列の要素(変数)が定数であることを示す。「*」から分かるように、2次元配列の要素には関数のポインタが格納される。ROM14に記憶されたプログラムLの各関数のアドレスは固定であるので、設計者にとっては既知である。なお、プログラムLにおいて各関数が記述されたアドレスは固定であるので、const修飾子により要素の変更を防止している。
<Program D>
The program D is table-like data in which pointers are stored in a two-dimensional array. “Void (* const FunctionTbl [26] [5] (void)) indicates that the element (variable) of the two-dimensional array is a constant. As can be seen from“ * ”, the element of the two-dimensional array is a function. Is stored. Since the address of each function of the program L stored in the ROM 14 is fixed, it is known to the designer. Since the address where each function is described in the program L is fixed, the element is prevented from being changed by the const qualifier.

2次元配列について説明する。設計者は全ての関数から制御パターンに応じて実行するもの、しないものを指定するようにテーブルを設計する。このため、プログラムDを作成するに当たり、設計者は制御パターンを決定する。制御パターンは、制御モードや車両状況等により定まる。具体的には、制御パターンは、関数の呼び出しの有無及び呼び出しの順序と同じものである。例えば、車両がecoモードの場合、fancAの処理の次にfancBの処理が必要になるのであれば、fancA→fancBが制御パターンである。このように制御パターンは、関数(すなわち処理)の組み合わせで表すことができる。   A two-dimensional array will be described. The designer designs the table so that all functions are specified according to the control pattern and not. For this reason, when creating the program D, the designer determines a control pattern. The control pattern is determined by the control mode, the vehicle situation, and the like. Specifically, the control pattern is the same as the presence / absence of function calls and the order of calls. For example, when the vehicle is in the eco mode, fancA → fancB is the control pattern if fancB processing is required after fancA processing. Thus, the control pattern can be expressed by a combination of functions (that is, processes).

また、funcAの次に何も処理がないような制御パターンでは、設計者は、関数を呼び出さないように「NULL(なにもしない)」を処理に指定する。したがって、関数の指定とNULLの組み合わせで、車両の制御パターンを全て表すことができる。設計者は、着目しているECU100において生じうる制御パターンを全て網羅し、2次元配列に格納する。図では制御パターンの数は5つになっている。   In a control pattern in which no processing is performed after funcA, the designer designates “NULL (do nothing)” for the processing so as not to call the function. Therefore, all the control patterns of the vehicle can be expressed by a combination of function designation and NULL. The designer covers all control patterns that can occur in the ECU 100 of interest, and stores them in a two-dimensional array. In the figure, the number of control patterns is five.

関数の数とパターンの数から、図では、「26×5」の2次元配列になっている。プログラムLの「for(i = 0; i<26 ; i++)」「FuctionTbl[i][mode]()」は、横軸の位置は固定で縦軸の方向に2次元配列の要素を指定するので、制御パターンに応じて必要な関数を順番に呼び出すことができる。   From the number of functions and the number of patterns, in the figure, it is a “26 × 5” two-dimensional array. "For (i = 0; i <26; i ++)" and "FuctionTbl [i] [mode] ()" of program L specify the elements of the two-dimensional array in the direction of the vertical axis with the position of the horizontal axis fixed. Therefore, necessary functions can be called in order according to the control pattern.

図では、縦軸に順番にfuncA〜funcZを配置し、その有効・無効を指定することで制御パターンが形成されている。funcA〜funcZの処理順が変わる制御パターンがあれば、縦軸方向のfuncA〜funcZの配置順を変えることもできる。   In the figure, funcA to funcZ are arranged in order on the vertical axis, and a control pattern is formed by designating the validity / invalidity thereof. If there is a control pattern that changes the processing order of funcA to funcZ, the arrangement order of funcA to funcZ in the vertical axis direction can be changed.

処理の順番が変わらないのであれば、ECU100が提供しうる処理を順番に2次元配列に配置して、使用しない処理は無効化(NULL)しておくことで、1つの制御パターンを生成できる。図では5つの制御パターンが生成されている。制御パターンに変更があった場合、変更対象の関数を有効化又は無効化すればよいことになる。また、処理の順番が変わる場合でも、関数のポインタを換えるだけでよいことになる。各要素のバイト数は固定なので、NULLから有効化、又は、有効化からNULLに書き換えても2次元配列のサイズすなわちプログラムDのサイズに変更が生じることを防止できる。また、有効化/無効化、関数のポインタの変更は他の関数に影響しない。   If the order of the processes does not change, one control pattern can be generated by arranging the processes that can be provided by the ECU 100 in a two-dimensional array in order and invalidating (NULL) the processes that are not used. In the figure, five control patterns are generated. When the control pattern is changed, the function to be changed may be validated or invalidated. Even when the processing order changes, it is only necessary to change the function pointer. Since the number of bytes of each element is fixed, it is possible to prevent the size of the two-dimensional array, that is, the size of the program D from being changed even if the validation is made from NULL or rewriting from validation to NULL. Also, validation / invalidation and change of function pointers do not affect other functions.

したがって、プログラムDを書き換える場合でも、プログラムDの書き換えのために他のプログラムである起動プログラム31、プログラムL、及び、書き換えプログラム34の領域に侵食することがないので、書き換えるプログラムはプログラムDのみでよいことになる。   Therefore, even when the program D is rewritten, the program D is rewritten only by the program D because the areas of the start program 31, the program L, and the rewrite program 34, which are other programs, are not eroded for rewriting the program D. It will be good.

〔プログラムDの書き換え〕
例えば、オプションの脱着等によりいずれかの制御パターンにおいて所定の有効化や無効が必要になることがある。このような場合、設計者は、2次元配列の要素を変更したプログラムDを用意する。
[Rewriting program D]
For example, a predetermined validation or invalidation may be required in any one of the control patterns due to optional attachment / detachment or the like. In such a case, the designer prepares a program D in which the elements of the two-dimensional array are changed.

プログラムDの書き換えの例について説明する。図3は、制御パターンが変更された2次元配列の一例を示す図である。図3では、要素[1][1]、要素[2][3]、要素[3][3]が、図2から変更されている。   An example of rewriting program D will be described. FIG. 3 is a diagram illustrating an example of a two-dimensional array in which the control pattern is changed. In FIG. 3, element [1] [1], element [2] [3], element [3] [3] are changed from FIG.

しかし、上記のように、2次元配列のサイズには変更がないので、書き換えプログラム34はプログラムDのみを書き換えることができる。   However, since the size of the two-dimensional array is not changed as described above, the rewriting program 34 can rewrite only the program D.

なお、プログラムDが、2次元配列以外のデータを記憶している場合もある。このような場合、プログラムDの全体を書き換えることなく、プログラムDの2次元配列のデータのみを書き換えることができる。例えば、書き換えツール200が2次元配列のアドレスを書き換えプログラム34に通知することで、書き換えプログラム34は受信した書き換え用の2次元配列を、指定されたROM14のアドレスに書き込むことができる。   Note that the program D may store data other than the two-dimensional array. In such a case, only the data of the two-dimensional array of the program D can be rewritten without rewriting the entire program D. For example, when the rewriting tool 200 notifies the rewriting program 34 of the address of the two-dimensional array, the rewriting program 34 can write the received two-dimensional array for rewriting to the address of the designated ROM 14.

また、ROM14の書き換え可能なブロックの大きさが、各要素のサイズ以下であれば、要素[1][1]、要素[2][3]、要素[3][3]だけを書き換えることもできる。この場合、同様に、書き換えツール200が2次元配列の要素のアドレスを書き換えプログラム34に通知することで、書き換えプログラム34は受信した書き換え用の2次元配列の各要素を、指定されたROM14のアドレスに書き込むことができる。   If the size of the rewritable block in the ROM 14 is smaller than the size of each element, only the element [1] [1], the element [2] [3], and the element [3] [3] may be rewritten. it can. In this case, similarly, the rewriting tool 200 notifies the address of the element of the two-dimensional array to the rewriting program 34, so that the rewriting program 34 converts each element of the received two-dimensional array for rewriting into the address of the designated ROM 14. Can be written on.

以上のように、プログラムDに、処理の有効/無効の組み合わせのパターンをいくつか抽出しておくことで、制御パターンの処理に変更があっても、プログラムDのサイズに変更が生じることを防止できる。書き換えるプログラムのサイズを最小限にできるので、ROM14の全体を書き換えるよりも書き換え時間を短縮することができる。   As described above, by extracting some patterns of valid / invalid combinations of processing in the program D, it is possible to prevent the size of the program D from being changed even if the control pattern processing is changed. it can. Since the size of the program to be rewritten can be minimized, the rewriting time can be shortened compared to rewriting the entire ROM 14.

実施例1では、1つのROM14に4つのプログラムを記憶していたが、本実施例ではプログラムDを、書き換える必要のないプログラムL等とは別のROM14に記憶する書き換え方法を説明する。   In the first embodiment, four programs are stored in one ROM 14, but in this embodiment, a rewriting method for storing the program D in the ROM 14 different from the program L or the like that does not need to be rewritten will be described.

図4は、それぞれのROM14に記憶される各プログラムを模式的に説明する図の一例である。プログラムLのロジック及びプログラムDの2次元配列の設計方法は、実施例1と同様なので説明を省略する。   FIG. 4 is an example of a diagram schematically illustrating each program stored in each ROM 14. Since the logic of the program L and the design method of the two-dimensional array of the program D are the same as those in the first embodiment, description thereof is omitted.

図4では、ROM14とROM21は、物理的に分離されたROMである。したがって、書き換えプログラム34がプログラムDを書き換える際、プログラムD、起動プログラム31又は書き換えプログラム34を破壊するおそれをほぼ無くすことができる。   In FIG. 4, the ROM 14 and the ROM 21 are physically separated ROMs. Therefore, when the rewriting program 34 rewrites the program D, the possibility of destroying the program D, the startup program 31 or the rewriting program 34 can be almost eliminated.

実施例1と同様に、書き換えプログラム34は、プログラムDの全体を書き換えてもよいし、プログラムDのうち2次元配列のデータのみを書き換えてもよいし、2次元配列の所定の要素のみを書き換えてもよい。   Similar to the first embodiment, the rewriting program 34 may rewrite the entire program D, may rewrite only the data of the two-dimensional array in the program D, or rewrite only predetermined elements of the two-dimensional array. May be.

本実施例では、プログラムDの格納方法が適用された診断装置300にについて説明する。
図5は、診断装置300の概略構成図の一例を示す。診断装置300は、専用のECU100、一部のECU100又は各ECU100に搭載されている。
In the present embodiment, a diagnosis apparatus 300 to which the program D storage method is applied will be described.
FIG. 5 shows an example of a schematic configuration diagram of the diagnostic apparatus 300. Diagnostic device 300 is mounted on dedicated ECU 100, some ECUs 100, or each ECU 100.

診断装置300は、診断プログラム35により制御され、起動プログラム31、書き換えプログラム34、及び、診断パラメータ情報36をROM14に記憶している。ROM14は、セグメントに分かれており、セグメントを識別するセグメント識別子に対応づけてセグメント情報を記憶する。本実施例ではセグメントはブロックの集合であるとする。ROM14はブロック毎に消去、書き込みできるので、セグメント毎に消去、書き込みが可能である。
セグメント情報は、具体的には、起動プログラム31、書き換えプログラム34、及び、診断パラメータ情報36であり、どのセグメントにどのセグメント情報が記憶されているかは、設計者にとって既知である。
The diagnostic device 300 is controlled by a diagnostic program 35 and stores a startup program 31, a rewrite program 34, and diagnostic parameter information 36 in the ROM 14. The ROM 14 is divided into segments, and stores segment information in association with segment identifiers for identifying the segments. In this embodiment, the segment is assumed to be a set of blocks. Since the ROM 14 can be erased and written for each block, it can be erased and written for each segment.
Specifically, the segment information is a startup program 31, a rewrite program 34, and diagnostic parameter information 36, and which segment information is stored in which segment is known to the designer.

診断装置300は、コネクタ11を介して外部診断ツール400と接続可能になっている。COM15、起動プログラム31及び書き換えプログラム34については、実施例1,2と同様なので説明を省略する。   The diagnostic apparatus 300 can be connected to the external diagnostic tool 400 via the connector 11. Since the COM 15, the start program 31, and the rewrite program 34 are the same as those in the first and second embodiments, the description thereof is omitted.

〔診断プログラム35〕
本実施例では診断プログラム35がプログラムLに対応し、診断パラメータ情報36がプログラムDに対応する。
[Diagnosis program 35]
In this embodiment, the diagnostic program 35 corresponds to the program L, and the diagnostic parameter information 36 corresponds to the program D.

診断プログラム35について説明する。診断プログラム35は書き換え可能なROM14に記憶されており、例えば、IGオンにより診断プログラム35が起動する。診断プログラム35は、異常の有無を監視しており、異常を検出した場合、診断パラメータ情報36から異常識別子に対応づけられた異常コード、異常詳細識別子、及び、警告手段識別子を読み出す。   The diagnostic program 35 will be described. The diagnostic program 35 is stored in the rewritable ROM 14, and for example, the diagnostic program 35 is activated when the IG is turned on. The diagnostic program 35 monitors the presence or absence of an abnormality, and when an abnormality is detected, reads the abnormality code, abnormality detail identifier, and warning means identifier associated with the abnormality identifier from the diagnostic parameter information 36.

異常識別子は、異常を識別するIDであり、異常コードは例えばダイアグコードであり、異常詳細識別子は異常発生時に格納すべき異常詳細情報番号であり、警告手段識別子は異常発生時に運転者に知らせるべき警告手段番号である。   The abnormality identifier is an ID for identifying an abnormality, the abnormality code is, for example, a diagnostic code, the abnormality detailed identifier is an abnormality detailed information number to be stored when an abnormality occurs, and the warning means identifier should be notified to the driver when the abnormality occurs. Warning means number.

異常を検出した診断プログラム35は、異常詳細識別子に基づき詳細を不揮発メモリに記憶し、警告手段識別子に基づき運転者に異常の発生を通知する。   The diagnostic program 35 that has detected the abnormality stores details in the nonvolatile memory based on the abnormality detail identifier, and notifies the driver of the occurrence of the abnormality based on the warning means identifier.

警告手段番号は、異常識別子と警告手段を対応づける。警告手段には、例えば、メータパネルのランプ点灯、警報音の吹鳴、メータパネルへのメッセージ表示、メッセージの読み上げ等がある。警告手段番号は、このような警告手段を指定する番号である。   The warning means number associates the abnormality identifier with the warning means. The warning means includes, for example, lighting of a lamp on the meter panel, sounding an alarm sound, displaying a message on the meter panel, reading a message, and the like. The warning means number is a number that designates such warning means.

〔診断パラメータ情報36の変更〕
診断パラメータ情報36の警告手段識別子の変更について説明する。警告手段識別子は単なる番号なので、警告手段識別子の警告手段番号を変更することで警告手段を切り替えることができる。しかしながら、番号の種類や1つの番号のビット数が増えるわけではないので、診断パラメータ情報36のサイズや警告手段識別子のサイズに変更は生じない。したがって、診断パラメータ情報36の書き換えが、ROM14に記憶された診断プログラム35、起動プログラム31又は書き換えプログラム34に影響することがない。
[Change of diagnostic parameter information 36]
The change of the warning means identifier of the diagnostic parameter information 36 will be described. Since the warning means identifier is simply a number, the warning means can be switched by changing the warning means number of the warning means identifier. However, since the type of number and the number of bits of one number do not increase, the size of the diagnostic parameter information 36 and the size of the warning means identifier do not change. Therefore, the rewriting of the diagnostic parameter information 36 does not affect the diagnostic program 35, the startup program 31, or the rewriting program 34 stored in the ROM 14.

設計者が、診断パラメータ情報36を変更した場合、外部診断ツール400はセグメント識別子により診断パラメータ情報36が記憶されているセグメントを指定して、診断パラメータ情報36を診断装置300に送信する。書き換えプログラム34は、そのセグメントのセグメント情報(古い診断パラメータ情報36)を、受信した診断パラメータ情報にて書き換えることができる。   When the designer changes the diagnostic parameter information 36, the external diagnostic tool 400 designates the segment in which the diagnostic parameter information 36 is stored by the segment identifier, and transmits the diagnostic parameter information 36 to the diagnostic apparatus 300. The rewriting program 34 can rewrite the segment information (old diagnostic parameter information 36) of the segment with the received diagnostic parameter information.

また、ROM14がセグメントの一部だけを書き換え可能な場合、診断パラメータ情報36のうち警告手段番号が変更されたレコードだけを、書き換えてもよい。また、レコードのうち、変更された警告手段番号だけを書き換えてもよい。   When the ROM 14 can rewrite only a part of the segment, only the record in which the warning means number is changed in the diagnostic parameter information 36 may be rewritten. Further, only the changed warning means number in the record may be rewritten.

したがって、警告手段識別子を変更するだけで異常検出時に警告する警告手段を変更でき、診断パラメータ情報36のサイズにも影響がないので、起動プログラム31、書き換えプログラム34、及び、診断プログラム35に与える影響を最小限にして(破壊の危険なく)、診断パラメータ情報36を書き換えることができる。   Therefore, it is possible to change the warning means that warns when an abnormality is detected simply by changing the warning means identifier, and the size of the diagnostic parameter information 36 is not affected. The diagnostic parameter information 36 can be rewritten with a minimum (without risk of destruction).

また、書き換えるセグメント数を最少にできるので書き換え時間も短縮できる。   In addition, since the number of segments to be rewritten can be minimized, the rewriting time can be shortened.

11 コネクタ
13 マイコン
14 ROM
16 CPU
100 ECU
200 書き換えツール
11 Connector 13 Microcomputer 14 ROM
16 CPU
100 ECU
200 rewriting tool

Claims (1)

プログラムを実行するプログラム実行手段と、
処理を記述した第1のプログラムと、前記第1のプログラムから読み出される第2のプログラムと、外部から取得した前記第2のプログラムと置き換えらえる更新用プログラムを、前記第2のプログラムと置き換える書き換えプログラムと、を一体に記憶した記憶手段と、を有し、
前記第2のプログラムの書き換えを受け付けた場合、前記書き換えプログラムは、外部から前記更新用プログラムを取得して、前記第1のプログラム及び前記書き換え用プログラムを書き換えることなく、前記第2のプログラムのみを書き換える、
ことを特徴とするプログラム書き換え装置。
Program execution means for executing the program;
Rewrite that replaces the second program with a first program that describes processing, a second program that is read from the first program, and an update program that can be replaced with the second program acquired from the outside Storage means for integrally storing the program,
When rewriting of the second program is accepted, the rewriting program acquires the update program from the outside, and rewrites only the second program without rewriting the first program and the rewriting program. rewrite,
The program rewriting apparatus characterized by the above-mentioned.
JP2009290837A 2009-12-22 2009-12-22 Data rewrite device Pending JP2011133974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009290837A JP2011133974A (en) 2009-12-22 2009-12-22 Data rewrite device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009290837A JP2011133974A (en) 2009-12-22 2009-12-22 Data rewrite device

Publications (1)

Publication Number Publication Date
JP2011133974A true JP2011133974A (en) 2011-07-07

Family

ID=44346672

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009290837A Pending JP2011133974A (en) 2009-12-22 2009-12-22 Data rewrite device

Country Status (1)

Country Link
JP (1) JP2011133974A (en)

Similar Documents

Publication Publication Date Title
US6393342B2 (en) Method and device for controlling operating sequences in a vehicle
JP2007126024A (en) Vehicular electronic control device
CN102124447B (en) Control appliance for a vehicle, and method for updating data for a control appliance for a vehicle
CN110162315A (en) The non-transitory storage medium of vehicle control device, method for updating program and storage for the program of more new procedures
JP4135220B2 (en) Electronic control device for vehicle
CN110244958B (en) Method and device for updating calibration data of a vehicle
CN110809755A (en) Electronic control system
JP2009175947A (en) In-vehicle electronic controller and information updating method for the same
JP2007287022A (en) Information storage method for electronic control device
US20010027524A1 (en) Method of detecting manipulation of a programable memory device of a digital controller
JP2007206827A (en) Electronic control unit, and method for generating program for controlling on-vehicle device
JP2004310221A (en) Data rewriting method and electronic control device
JP2009262787A (en) Electronic control unit
JP2002323902A (en) Electronic controller
WO2017033579A1 (en) Electronic control device for vehicles
JP2005338955A (en) Electronic control device
WO2022102385A1 (en) On-vehicle ecu, program, and information processing method
JP2011133974A (en) Data rewrite device
US9501434B2 (en) Microcomputer
EP3961379B1 (en) Software update device, software update method, non-transitory storage medium, and vehicle
JP2009026183A (en) Electronic control apparatus for automobile
JP7327242B2 (en) In-vehicle relay device, information processing method and program
JP2010286897A (en) Electronic control unit, and program rewriting method
JP2007015643A (en) Electronic control device for vehicle
JP7302250B2 (en) electronic controller