JP2002175193A - Device and method for rewriting program - Google Patents

Device and method for rewriting program

Info

Publication number
JP2002175193A
JP2002175193A JP2000373709A JP2000373709A JP2002175193A JP 2002175193 A JP2002175193 A JP 2002175193A JP 2000373709 A JP2000373709 A JP 2000373709A JP 2000373709 A JP2000373709 A JP 2000373709A JP 2002175193 A JP2002175193 A JP 2002175193A
Authority
JP
Japan
Prior art keywords
program
rom
firmware
control firmware
host computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2000373709A
Other languages
Japanese (ja)
Other versions
JP3805195B2 (en
Inventor
Masashi Yashiki
正史 屋鋪
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2000373709A priority Critical patent/JP3805195B2/en
Publication of JP2002175193A publication Critical patent/JP2002175193A/en
Application granted granted Critical
Publication of JP3805195B2 publication Critical patent/JP3805195B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a device and a method for rewriting program capable of reducing the storage capacity of RAM and ROM. SOLUTION: This device includes a first ROM 7 of storing a firmware for activation having an activation program of activating a microcomputer system 1 and a communication program of conducting communication with a host computer 2, a RAM 5 of temporarily storing data down loaded from the host computer 2, and a second ROM 8 of storing a firmware for control of controlling the operation of an electronic appliance. A deletion/writing program for deleting and writing the firmware for control stored in the second ROM 8 and the firmware for control are transmitted from the host computer 2.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、電子機器の動作を
制御するファームウェアを記憶したマイコンシステム
に、通信手段で接続されたホストコンピュータから別の
ファームウェアをダウンロードしてマイコンシステムの
ファームウェアを書き換えるプログラム書き換え装置及
びプログラム書き換え方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program rewriting program for rewriting firmware of a microcomputer system by downloading another firmware from a host computer connected by communication means to a microcomputer system storing firmware for controlling the operation of an electronic device. The present invention relates to an apparatus and a program rewriting method.

【0002】[0002]

【従来の技術】電子機器の動作を制御するマイコンシス
テムは、制御プログラムであるファームウェアを格納し
たROMを有している。ファームウェアを変更するため
にはROMを基板上から取り外し、別のファームウェア
を格納したROMを再度実装する必要があり、工数がか
かる問題があった。このため、特開平10−25469
4号公報には、ROMを基板上から取り外すことなくフ
ァームウェアを変更するプログラム書き換え装置が開示
されている。
2. Description of the Related Art A microcomputer system for controlling the operation of an electronic device has a ROM in which firmware as a control program is stored. In order to change the firmware, it is necessary to remove the ROM from the board and re-install the ROM storing another firmware, which has a problem that the number of steps is increased. For this reason, Japanese Patent Application Laid-Open No. 10-25469
Patent Document 4 discloses a program rewriting device that changes firmware without removing a ROM from a substrate.

【0003】このプログラム書き換え装置を図5に示す
と、マイコンシステム10とホストコンピュータ30と
は通信ケーブル41によって互いに接続されている。マ
イコンシステム10の各部の制御はCPU及び周辺IC
を有するMPU11により行われる。MPU11にはバ
スラインによってフラッシュメモリ12、ドライバ13
及びRAM14が接続されている。ドライバ13はホス
トコンピュータ30とファームウェアのデータや制御情
報の受け渡しを行う。
FIG. 5 shows this program rewriting device. The microcomputer system 10 and the host computer 30 are connected to each other by a communication cable 41. Each part of the microcomputer system 10 is controlled by a CPU and peripheral ICs.
Is performed by the MPU 11 having The flash memory 12 and the driver 13 are connected to the MPU 11 by a bus line.
And a RAM 14 are connected. The driver 13 exchanges firmware data and control information with the host computer 30.

【0004】フラッシュメモリ12は不揮発性メモリか
ら成っており、記憶内容を電気的に書き込み及び消去す
るとともに電源電圧の有無に関わらず記憶内容を保持す
る。フラッシュメモリ12には図6に示すように、スタ
ートアッププログラム12a、予備プログラム12b及
びダウンロードプログラム12cから成るファームウェ
アが記憶されている。
[0004] The flash memory 12 is composed of a non-volatile memory, which electrically writes and erases stored contents and retains stored contents regardless of the presence or absence of a power supply voltage. As shown in FIG. 6, the flash memory 12 stores firmware including a start-up program 12a, a spare program 12b, and a download program 12c.

【0005】スタートアッププログラム12aは、リセ
ットによりマイコンシステム10が新たに起動された際
の一連の手順が記されている。ダウンロードプログラム
12cはRAM14にコピーされ、MPU11がRAM
14に一時記憶されたプログラムを実行してマイコンシ
ステム10の各部及び電子機器を制御する。予備プログ
ラム12bはダウンロードプログラム12cが損傷した
場合の予備のために、ダウンロードプログラム12cと
同一の内容が記述されている。
The startup program 12a describes a series of procedures when the microcomputer system 10 is newly started by reset. The download program 12c is copied to the RAM 14, and the MPU 11
14 to control the components of the microcomputer system 10 and the electronic devices by executing the program temporarily stored in the microcomputer 14. The spare program 12b describes the same contents as the download program 12c for the purpose of reserve in case the download program 12c is damaged.

【0006】図7は、上記構成のデータ書き換え装置の
動作を示すフローチャートである。ステップ#10では
フラッシュメモリ12に記憶されたダウンロードプログ
ラム12cが正常か否かを確認する。正常な場合はステ
ップ#11でダウンロードプログラム12cがRAM1
4にコピーされる。正常でない場合はステップ#12で
予備プログラム12bがRAM14にコピーされる。R
AM14に格納されたプログラムは実行プログラムとな
り、ステップ#13で実行プログラムの先頭アドレスに
ポインタが設定される。
FIG. 7 is a flowchart showing the operation of the data rewriting device having the above configuration. In step # 10, it is confirmed whether the download program 12c stored in the flash memory 12 is normal. If normal, in step # 11, the download program 12c
4 If not, the preliminary program 12b is copied to the RAM 14 in step # 12. R
The program stored in the AM 14 is an execution program, and a pointer is set at the start address of the execution program in step # 13.

【0007】RAM14に記憶された実行プログラムの
実行によりホストコンピュータ30との通信が行われ、
ステップ#14ではホストコンピュータ30からダウン
ロードプログラム12c用のデータをドライバ13で受
信したか否かが判断される。受信しない場合はステップ
#17に移行して通常の電子機器の制御処理がMPU1
1により行われる。受信があった場合はステップ#15
で、RAM14に記憶された実行プログラムにより、フ
ラッシュメモリ12に記憶されたダウンロードプログラ
ム12cを消去する。
[0007] By executing the execution program stored in the RAM 14, communication with the host computer 30 is performed.
In step # 14, it is determined whether the driver 13 has received data for the download program 12c from the host computer 30. If not received, the process proceeds to step # 17 and the control processing of the ordinary electronic device is performed by the MPU1.
1 is performed. If received, step # 15
Then, the download program 12c stored in the flash memory 12 is erased by the execution program stored in the RAM 14.

【0008】そして、ステップ#16でホストコンピュ
ータ30から受信したダウンロードプログラム12c用
のデータをRAM14に記憶された実行プログラムによ
りフラッシュメモリ12に書き込む。そして、スタート
アッププログラム12aを再起動して書き替えられたダ
ウンロードプログラム12cをRAM14にコピーし、
ステップ#17で新たな実行プログラムをMPU11に
より実行して電子機器の制御処理が行われる。このよう
にして、フラッシュメモリ12に記憶されている制御プ
ログラム(12c)をホストコンピュータ30からオン
ラインで書き換えることができるようになっている。
Then, in step # 16, the data for the download program 12c received from the host computer 30 is written in the flash memory 12 by the execution program stored in the RAM 14. Then, the startup program 12a is restarted and the rewritten download program 12c is copied to the RAM 14,
In step # 17, a new execution program is executed by the MPU 11 to perform control processing of the electronic device. Thus, the control program (12c) stored in the flash memory 12 can be rewritten online from the host computer 30.

【0009】[0009]

【発明が解決しようとする課題】しかしながら上記の従
来のプログラム書き換え装置によると、ダウンロードプ
ログラム12cが損傷したときのためにフラッシュメモ
リ12内にダウンロードプログラム12cと同一の予備
プログラム12bが配される。このため、使用頻度の少
ない予備プログラム12bのためにフラッシュメモリ1
2から成るROMが大きな記憶容量を必要とし、プログ
ラム書き換え装置のコストを高くする要因となってい
た。
However, according to the above-described conventional program rewriting device, the same spare program 12b as the download program 12c is arranged in the flash memory 12 in case the download program 12c is damaged. For this reason, the flash memory 1 is used for the spare program 12b which is not frequently used.
The two ROMs require a large storage capacity, which increases the cost of the program rewriting device.

【0010】また、一旦フラッシュメモリ12内のダウ
ンロードプログラム12cをRAM14にコピーし、R
AM14から通信プログラムや書き込みプログラム等を
実行してフラッシュメモリ12内のダウンロードプログ
ラム12cを書き換える必要がある。このため、RAM
14は演算時の変数等の一時記憶だけでなくダウンロー
ドプログラム12cの大きさのデータを全て一時記憶す
るために大きな記憶容量を必要としていた。
Further, the download program 12c in the flash memory 12 is temporarily copied to the RAM 14 and
It is necessary to rewrite the download program 12c in the flash memory 12 by executing a communication program, a write program, and the like from the AM 14. For this reason, RAM
14 requires a large storage capacity to temporarily store not only temporary storage of variables and the like at the time of calculation but also all data of the size of the download program 12c.

【0011】本発明は、RAMやROMの記憶容量を削
減できるプログラム書き換え装置及びプログラム書き換
え方法を提供することを目的とする。
An object of the present invention is to provide a program rewriting device and a program rewriting method capable of reducing the storage capacity of a RAM or a ROM.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するため
に本発明のプログラム書き換え装置は、電子機器の動作
を制御する制御用ファームウェアを記憶したマイコンシ
ステムに、通信手段を介して接続されたホストコンピュ
ータから別の制御用ファームウェアをダウンロードして
前記マイコンシステムの制御用ファームウェアを書き換
えるプログラム書き換え装置において、前記マイコンシ
ステムは、前記マイコンシステムを起動する起動プログ
ラムと前記ホストコンピュータとの通信を行う通信プロ
グラムとを有する起動用ファームウェアを記憶した第1
ROMと、前記ホストコンピュータからダウンロードし
たデータを一時記憶するRAMと、制御用ファームウェ
アを記憶する第2ROMと、を備えたことを特徴として
いる。
In order to achieve the above object, a program rewriting apparatus according to the present invention comprises a host computer connected via communication means to a microcomputer system storing control firmware for controlling the operation of electronic equipment. In a program rewriting device that downloads another control firmware from a computer and rewrites the control firmware of the microcomputer system, the microcomputer system includes a start program that starts the microcomputer system and a communication program that communicates with the host computer. The first storing the boot firmware having
It is characterized by comprising a ROM, a RAM for temporarily storing data downloaded from the host computer, and a second ROM for storing control firmware.

【0013】この構成によると、制御用ファームウェア
の書き換え時に第1ROMに記憶された起動用ファーム
ウェアが実行されてマイコンシステムの立ち上げを行う
とともにホストコンピュータと通信可能になる。これに
より、ホストコンピュータから書き換え用の制御用ファ
ームウェアがダウンロードされてRAMに記憶される。
そして、第2ROM内の制御用ファームウェアが消去さ
れ、RAMから新たな制御用ファームウェアがコピーさ
れる。
According to this configuration, when the control firmware is rewritten, the boot firmware stored in the first ROM is executed to start up the microcomputer system and communicate with the host computer. Thereby, the control firmware for rewriting is downloaded from the host computer and stored in the RAM.
Then, the control firmware in the second ROM is erased, and the new control firmware is copied from the RAM.

【0014】また本発明は、上記構成のプログラム書き
換え装置において、前記RAMへの制御用ファームウェ
アのダウンロードと第2ROMの制御用ファームウェア
の書き込みとを並行して行い、分割してダウンロードさ
れる制御用ファームウェアにより前記RAMを順次上書
きしたことを特徴としている。
Further, according to the present invention, in the program rewriting device having the above structure, the control firmware downloaded to the RAM and the control firmware written in the second ROM are executed in parallel, and the divided control firmware is downloaded. In which the RAM is sequentially overwritten.

【0015】この構成によると、制御用ファームウェア
を分割して一部がRAMにダウンロードされると第2R
OMに該一部が書き込まれ、次の一部がダウンロードし
てRAMに上書きされると第2ROMに該一部が書き込
まれる。この動作が繰り返し行われて第2ROMの制御
用ファームウェアが書き換えられる。
According to this configuration, when the control firmware is divided and partly downloaded to the RAM, the second R
When the part is written in the OM, and the next part is downloaded and overwritten in the RAM, the part is written in the second ROM. This operation is repeatedly performed, and the control firmware of the second ROM is rewritten.

【0016】また本発明は、上記構成のプログラム書き
換え装置において、第2ROMに記憶された制御用ファ
ームウェアを消去するための消去プログラムと、第2R
OMに制御用ファームウェアを書き込むための書き込み
プログラムとを前記ホストコンピュータから送信したこ
とを特徴としている。
According to the present invention, there is also provided a program rewriting device having the above configuration, wherein an erasing program for erasing the control firmware stored in the second ROM;
A writing program for writing the control firmware to the OM is transmitted from the host computer.

【0017】この構成によると、ホストコンピュータか
ら制御用ファームウェアの消去プログラムと書き込みプ
ログラムがダウンロードされてRAMに記憶される。そ
して、第2ROM内の制御用ファームウェアが消去プロ
グラムにより消去され、書き込みプログラムにより第2
ROM内に制御用ファームウェアの書き込みが行われ
る。
According to this configuration, the erase program and the write program of the control firmware are downloaded from the host computer and stored in the RAM. Then, the control firmware in the second ROM is erased by the erase program, and the second firmware is erased by the write program.
The control firmware is written in the ROM.

【0018】また本発明は、上記構成のプログラム書き
換え装置において、第2ROMの消去終了後、前記書き
込みプログラムをダウンロードしたことを特徴としてい
る。
Further, the present invention is characterized in that, in the program rewriting device having the above configuration, the writing program is downloaded after erasing of the second ROM is completed.

【0019】また本発明は、上記構成のプログラム書き
換え装置において、起動用ファームウェア内に第2RO
M内の制御用ファームウェアと同一のプログラムを含ん
だことを特徴としている。この構成によると、第2RO
Mに記憶された新たな制御用ファームウェアを消去する
ことにより、元の制御用ファームウェアの動作を起動用
ファームウェアにより実行することができる。
Further, according to the present invention, in the program rewriting device having the above configuration, the second RO is stored in the boot firmware.
M is characterized by including the same program as the control firmware in M. According to this configuration, the second RO
By erasing the new control firmware stored in M, the operation of the original control firmware can be executed by the boot firmware.

【0020】また本発明は、上記構成のプログラム書き
換え装置において、第1ROMは部分的に消去、書き込
み可能な不揮発性メモリから成り、第2ROMを第1R
OMと兼用したことを特徴としている。この構成による
と、不揮発性メモリから成る第1ROMには起動用ファ
ームウェアと制御用ファームウェアとが記憶され、起動
用ファームウェアを残して制御用ファームウェアの書き
換えが行われる。
According to the present invention, in the program rewriting device having the above configuration, the first ROM is composed of a partially erasable and writable nonvolatile memory, and the second ROM is a first ROM.
It is characterized by being shared with OM. According to this configuration, the first ROM composed of the nonvolatile memory stores the boot firmware and the control firmware, and the control firmware is rewritten while leaving the boot firmware.

【0021】また本発明は、上記構成のプログラム書き
換え装置において、第1ROMはマスクROM、PRO
M、フラッシュメモリのいずれかから成ることことを特
徴としている。
Further, according to the present invention, in the program rewriting apparatus having the above configuration, the first ROM is a mask ROM,
M or a flash memory.

【0022】また本発明のプログラム書き換え方法は、
電子機器の動作を制御する制御用ファームウェアを記憶
したマイコンシステムに、通信手段を介して接続された
ホストコンピュータから別の制御用ファームウェアをダ
ウンロードして前記マイコンシステムの制御用ファーム
ウェアを書き換えるプログラム書き換え方法において、
前記マイコンシステムは、前記マイコンシステムを起動
する起動プログラムと前記ホストコンピュータとの通信
を行う通信プログラムとを有する起動用ファームウェア
を記憶した第1ROMと、前記ホストコンピュータから
ダウンロードしたデータを一時記憶するRAMと、制御
用ファームウェアを記憶する第2ROMと、を備え、第
2ROMに記憶された制御用ファームウェアを消去する
ための消去プログラムと、第2ROMに制御用ファーム
ウェアを書き込むための書き込みプログラムと、新たな
制御用ファームウェアとを前記ホストコンピュータから
送信し、前記消去プログラム及び前記書き込みプログラ
ムを実行して第2ROMの制御用ファームウェアを書き
換えたことを特徴としている。
Also, the program rewriting method of the present invention
In a program rewriting method for downloading another control firmware from a host computer connected via communication means to a microcomputer system storing control firmware for controlling the operation of an electronic device and rewriting the control firmware of the microcomputer system, ,
The microcomputer system includes a first ROM that stores boot firmware having a boot program that starts the microcomputer system and a communication program that communicates with the host computer, and a RAM that temporarily stores data downloaded from the host computer. A second ROM for storing the control firmware, an erasing program for erasing the control firmware stored in the second ROM, a writing program for writing the control firmware in the second ROM, and a new control program. Firmware is transmitted from the host computer, the erase program and the write program are executed, and the control firmware of the second ROM is rewritten.

【0023】また本発明は、上記構成のプログラム書き
換え方法において、前記RAMへの制御用ファームウェ
アのダウンロードと第2ROMの制御用ファームウェア
の書き込みとを並行して行い、分割してダウンロードさ
れる制御用ファームウェアにより前記RAMを順次上書
きしたことを特徴としている。
Further, according to the present invention, in the program rewriting method having the above-described structure, the control firmware downloaded to the RAM and the control firmware written to the second ROM are performed in parallel, and the control firmware divided and downloaded is divided. In which the RAM is sequentially overwritten.

【0024】また本発明は、上記構成のプログラム書き
換え方法において、第2ROMの消去終了後、前記書き
込みプログラムをダウンロードしたことを特徴としてい
る。
Further, the present invention is characterized in that, in the program rewriting method having the above configuration, the writing program is downloaded after erasing of the second ROM is completed.

【0025】[0025]

【発明の実施の形態】以下に本発明の実施形態を図面を
参照して説明する。図1は第1実施形態のプログラム書
き換え装置の構成を示すブロック図である。プログラム
書き換え装置はマイコンシステム1とホストコンピュー
タ2とが通信ケーブル3によって互いに接続されてい
る。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of the program rewriting device of the first embodiment. In the program rewriting device, a microcomputer system 1 and a host computer 2 are connected to each other by a communication cable 3.

【0026】マイコンシステム1は通信インターフェー
ス6を介してホストコンピュータ2とデータの送受信を
行う。マイコンシステム1の各部の制御はCPU4によ
り行われる。CPU4にはバスラインによって第1、第
2ROM7、8、RAM14及び通信インターフェース
6が接続されている。
The microcomputer system 1 transmits and receives data to and from the host computer 2 via the communication interface 6. Control of each part of the microcomputer system 1 is performed by the CPU 4. The first and second ROMs 7 and 8, the RAM 14, and the communication interface 6 are connected to the CPU 4 via a bus line.

【0027】第1、第2ROM7、8はマスクROM、
PROMまたはフラッシュメモリ等の不揮発性メモリか
ら成っており、記憶内容を電気的に書き込み及び消去す
るとともに電源電圧の有無に関わらず記憶内容を保持す
る。第1ROM7には、リセットによりマイコンシステ
ム10が新たに起動された際の一連の手順が記された起
動プログラム及びホストコンピュータ2と通信を行うた
めの通信プログラム等から成る起動用ファームウェアが
記憶されている。起動プログラムには第2ROM8を認
識するための認識プログラムが含まれている。
The first and second ROMs 7 and 8 are mask ROMs,
It is composed of a nonvolatile memory such as a PROM or a flash memory, and electrically writes and erases stored contents and retains stored contents regardless of the presence or absence of a power supply voltage. The first ROM 7 stores a start-up program describing a series of procedures when the microcomputer system 10 is newly started up by reset, and a start-up firmware including a communication program for communicating with the host computer 2 and the like. . The startup program includes a recognition program for recognizing the second ROM 8.

【0028】第2ROM8には、マイコンシステム1に
接続される電子機器を制御する制御プログラムから成る
制御用ファームウェアが記憶されている。RAM14は
制御プログラム等の実行時の演算結果等を一時記憶する
とともに、ホストコンピュータ2から通信インターフェ
ース6を介してダウンロードしたデータを一時記憶する
ようになっている。
The second ROM 8 stores control firmware including a control program for controlling electronic devices connected to the microcomputer system 1. The RAM 14 temporarily stores calculation results and the like at the time of execution of control programs and the like, and also temporarily stores data downloaded from the host computer 2 via the communication interface 6.

【0029】ホストコンピュータ2には、第2ROM8
の記憶内容を消去する消去プログラム21、第2ROM
8にファームウェアの書き込みを行う書き込みプログラ
ム22及び所定の制御プログラムから成るファームウェ
アデータ23が格納されている。
The host computer 2 has a second ROM 8
Erasing program 21 for erasing the storage contents of the second ROM
8 stores a writing program 22 for writing firmware and firmware data 23 including a predetermined control program.

【0030】マイコンシステム1が起動されると、図2
のフローチャートが実行される。まずステップ#61で
第1ROM7の起動用ファームウェアが実行される。こ
れにより、起動プログラム及び通信プログラムが実行さ
れ、マイコンシステム1を立ち上げて、ホストコンピュ
ータ2との通信を可能にするとともに認識プログラムに
より第2ROM8の認識が行われる。
When the microcomputer system 1 is started, FIG.
Is executed. First, in step # 61, the boot firmware of the first ROM 7 is executed. As a result, the startup program and the communication program are executed, the microcomputer system 1 is started, communication with the host computer 2 is enabled, and the recognition of the second ROM 8 is performed by the recognition program.

【0031】次にステップ#62で、第2ROM8内の
制御用ファームウェアが正常か否かが判断される。制御
用ファームウェアが有効に機能する場合は、ステップ#
63に移行して第2ROM8内の制御用ファームウェア
が実行され、マイコンシステム1に接続された電子機器
の制御が行われる。
Next, in step # 62, it is determined whether or not the control firmware in the second ROM 8 is normal. If the control firmware works effectively, step #
In 63, the control firmware in the second ROM 8 is executed, and the electronic devices connected to the microcomputer system 1 are controlled.

【0032】ステップ#62で制御用ファームウェアが
有効に機能していないと判断すると、ステップ#64に
移行して、後述する制御用ファームウェアの書き換え処
理が行われる。第2ROM8内の制御用ファームウェア
の書き換えが終了すると、ステップ#63に移行して第
2ROM8内の書き換えられた制御用ファームウェアが
実行される。
If it is determined in step # 62 that the control firmware is not functioning effectively, the flow shifts to step # 64, where the control firmware is rewritten as described later. When the rewriting of the control firmware in the second ROM 8 is completed, the process proceeds to step # 63, where the rewritten control firmware in the second ROM 8 is executed.

【0033】書き換え処理は、制御用ファームウェアの
機能追加やバグフィックス等によるバージョンアップ時
にホストコンピュータ2からの指示により実行され、第
2ROM8内の制御用ファームウェアの書き換えが行わ
れる。また、上記のように第2ROM8内の制御用ファ
ームウェアが正常に動作していない場合にも実行され
る。
The rewriting process is executed according to an instruction from the host computer 2 at the time of version up due to addition of a function of the control firmware or bug fix or the like, and rewrite of the control firmware in the second ROM 8 is performed. Further, as described above, the process is also executed when the control firmware in the second ROM 8 is not operating normally.

【0034】図3は書き換え処理のフローチャートを示
している。同図において、Aはマイコンシステム1の動
作を示し、Bはホストコンピュータ2の動作を示してい
る。まず、ステップ#51でホストコンピュータ2から
第2ROM8に記憶された制御用プログラムのバージョ
ン番号の送信命令が出され、ステップ#21でマイコン
システム1からバージョン番号が送信される。これによ
り、ホストコンピュータ2は、制御用プログラムのバー
ジョン番号を取得する。
FIG. 3 shows a flowchart of the rewriting process. In the figure, A shows the operation of the microcomputer system 1, and B shows the operation of the host computer 2. First, at step # 51, a command to transmit the version number of the control program stored in the second ROM 8 is issued from the host computer 2, and the version number is transmitted from the microcomputer system 1 at step # 21. Thereby, the host computer 2 acquires the version number of the control program.

【0035】次に、ステップ#52では、ホストコンピ
ュータ2から消去プログラム21が送信され、マイコン
システム1は通信インターフェース6を介してこれを受
信する(ステップ#22)。ステップ#23で消去プロ
グラム21がRAM5にダウンロードされ、ステップ#
24でRAM5から消去プログラム21が実行される。
これにより、第2ROM8内の制御用ファームウェアが
消去される。
Next, in step # 52, the erasure program 21 is transmitted from the host computer 2, and the microcomputer system 1 receives this via the communication interface 6 (step # 22). At step # 23, the erasing program 21 is downloaded to the RAM 5, and at step #
At 24, the erase program 21 is executed from the RAM 5.
As a result, the control firmware in the second ROM 8 is erased.

【0036】ステップ#25では制御用ファームウェア
の消去が正常に行われた否かが判断され、消去の成功ま
たは失敗がホストコンピュータ2に通知される(ステッ
プ#26、#27)。消去に失敗した場合はマイコンシ
ステム1の書き込み処理を終了し、通知を受けたホスト
コンピュータ2もステップ#53で通知内容を判断して
書き込み処理を終了する。
In step # 25, it is determined whether or not the erasure of the control firmware has been normally performed, and the success or failure of the erasure is notified to the host computer 2 (steps # 26 and # 27). If the erasure has failed, the writing process of the microcomputer system 1 ends, and the host computer 2 that has received the notification determines the content of the notification in step # 53 and ends the writing process.

【0037】消去が正常な場合は、ステップ#54でホ
ストコンピュータ2からリセットコードが送信される。
マイコンシステム1はリセットコードを受信するとステ
ップ#28でシステムをリセットし、第1ROM7内の
起動用ファームウェアが実行される。
If the erasure is normal, a reset code is transmitted from the host computer 2 in step # 54.
Upon receiving the reset code, the microcomputer system 1 resets the system in step # 28, and the boot firmware in the first ROM 7 is executed.

【0038】従って、前述の図2のフローチャートが実
行され、ステップ#64(図2参照)で書き込み処理が
呼出される。この時、制御用ファームウェアの消去が終
了しているため、フラグの設定によりホストコンピュー
タ2の処理はステップ#55にジャンプする。
Accordingly, the above-described flowchart of FIG. 2 is executed, and the write process is called in step # 64 (see FIG. 2). At this time, since the erasing of the control firmware has been completed, the processing of the host computer 2 jumps to step # 55 by setting the flag.

【0039】ステップ#55では、ホストコンピュータ
2から書き込みプログラム22及び制御用ファームウェ
アのファームウェアデータ23が送信される。マイコン
システム1はステップ#29で書き込みプログラム22
及び制御用ファームウェアのファームウェアデータ23
を受信し、ステップ#30でRAM5にダウンロードす
る。
In step # 55, the host computer 2 transmits the write program 22 and the firmware data 23 of the control firmware. The microcomputer system 1 executes the writing program 22 in step # 29.
And firmware data 23 of control firmware
Is received and downloaded to the RAM 5 in step # 30.

【0040】ステップ#32では、RAM5から書き込
みプログラム22が実行され、RAM5上の制御用ファ
ームウェアが第2ROM8に書き込まれる。この時、フ
ァームウェアデータ23はホストコンピュータ2から分
割されたブロック毎に送信され、制御用ファームウェア
の一のブロックをRAM5にダウンロードして第2RO
M8に書き込むようになっている。
In step # 32, the write program 22 is executed from the RAM 5, and the control firmware on the RAM 5 is written into the second ROM 8. At this time, the firmware data 23 is transmitted from the host computer 2 for each divided block. One block of the control firmware is downloaded to the RAM 5 and the second RO
M8 is written.

【0041】そして、一のブロックの書き込みが終了す
ると次のブロックがRAM5にダウンロードされ、第2
ROM8に書き込まれる。この動作を順次行って、制御
用ファームウェアの全部が書き込まれる。ダウンロード
を分割して行って並行して第2ROM8に書き込みを行
うことで、ファームウェアデータ23のダウンロードに
必要なRAM5の記憶容量を一ブロック分だけ確保すれ
ばよく、RAM5の記憶容量を削減することができるよ
うになっている。
When the writing of one block is completed, the next block is downloaded to the RAM 5 and the second block is downloaded.
The data is written to the ROM 8. By sequentially performing this operation, the entire control firmware is written. By dividing the download and writing the data in the second ROM 8 in parallel, the storage capacity of the RAM 5 required for downloading the firmware data 23 can be secured by one block, and the storage capacity of the RAM 5 can be reduced. I can do it.

【0042】第2ROM8への新たな制御用ファームウ
ェアの書き込みが終了すると、ステップ#33で書き込
みが正常に行われた否かが判断され、消去の成功または
失敗がホストコンピュータ2に通知される(ステップ#
34、#35)。消去に失敗した場合はマイコンシステ
ム1の書き込み処理を終了し、通知を受けたホストコン
ピュータ2もステップ#56で通知内容を判断して書き
込み処理を終了する。これにより、制御用ファームウェ
アが正しく書き換えられなかったことをホストコンピュ
ータが検知し、書き込み処理の再実行等の対応策を行う
ことができる。
When the writing of the new control firmware to the second ROM 8 is completed, it is determined in step # 33 whether or not the writing has been performed normally, and the success or failure of the erasure is notified to the host computer 2 (step # 33). #
34, # 35). If the erasure has failed, the writing process of the microcomputer system 1 ends, and the host computer 2 that has received the notification determines the content of the notification in step # 56 and ends the writing process. Thus, the host computer can detect that the control firmware has not been correctly rewritten, and can take measures such as re-executing the writing process.

【0043】書き込みが正常な場合は、ステップ#57
でホストコンピュータ2からリセットコードが送信され
る。マイコンシステム1はリセットコードを受信すると
ステップ#36でシステムをリセットし、第1ROM7
内の起動用ファームウェアが実行される。そして、前述
の図2のフローチャートから書き込み処理が呼出され、
フラグの設定によりホストコンピュータ2の処理はステ
ップ#58にジャンプする。
If the writing is normal, step # 57
, A reset code is transmitted from the host computer 2. When receiving the reset code, the microcomputer system 1 resets the system in step # 36,
The boot firmware in is executed. Then, the writing process is called from the flowchart of FIG.
By the setting of the flag, the processing of the host computer 2 jumps to step # 58.

【0044】ステップ#58ではホストコンピュータ2
から第2ROM8に記憶された制御用プログラムのバー
ジョン番号の送信命令が出され、ステップ#37でマイ
コンシステム1からバージョン番号が送信される。これ
により、ホストコンピュータ2は、制御用プログラムの
バージョン番号を取得し、バージョンが更新されたこと
を確認して終了する。
In step # 58, the host computer 2
Sends a command to transmit the version number of the control program stored in the second ROM 8, and the microcomputer system 1 transmits the version number in step # 37. As a result, the host computer 2 acquires the version number of the control program, confirms that the version has been updated, and ends the processing.

【0045】本実施形態のプログラム書き換え装置によ
ると、起動用ファームウェアが通信プログラムを有する
ことによって、マイコンシステム1に接続された電子機
器を制御する制御用ファームウェアに損傷等があっても
ホストコンピュータ2からダウンロードすることにより
修復することができる。このため、従来のような予備プ
ログラム12b(図6参照)をマイコンシステム1内に
設ける必要がなく、第1、第2ROM7、8の記憶容量
を削減することができる。
According to the program rewriting device of the present embodiment, since the boot firmware has the communication program, even if the control firmware for controlling the electronic device connected to the microcomputer system 1 is damaged, the host computer 2 can perform the same. It can be repaired by downloading. Therefore, it is not necessary to provide the conventional spare program 12b (see FIG. 6) in the microcomputer system 1, and the storage capacity of the first and second ROMs 7 and 8 can be reduced.

【0046】また、第1、第2ROM7、8に制御用フ
ァームウェアの消去プログラムや書き込みプログラムを
記憶させずホストコンピュータ2からダウンロードして
実行する。このため、第1、第2ROM7、8の記憶容
量をより削減することができる。更に、第2ROM8に
は制御用ファームウェアのみを記憶して通信プログラム
や起動用プログラムを記憶させないので更に記憶容量削
減を図ることができる。
The first and second ROMs 7 and 8 do not store the erasing program or the writing program of the control firmware but download and execute the program from the host computer 2. Therefore, the storage capacities of the first and second ROMs 7 and 8 can be further reduced. Further, since only the control firmware is stored in the second ROM 8 and the communication program and the startup program are not stored, the storage capacity can be further reduced.

【0047】また、第2ROM8の消去終了後に、書き
込みプログラム22をダウンロードしているので、RA
M5に消去プログラム21と書き込みプログラム22と
が同時に記憶されず、RAM5の記憶容量を削減するこ
とができる。また、制御用ファームウェアのダウンロー
ドとRAM5から第2ROM8への書き込みとが並行し
て行われる。従って、RAM5は分割してダウンロード
されるファームウェアデータ22と書き込みプログラム
23の容量を確保すればよく、RAM5の記憶容量をよ
り削減することができる。
Since the writing program 22 is downloaded after the erasure of the second ROM 8 is completed, the RA
The erase program 21 and the write program 22 are not stored in M5 at the same time, and the storage capacity of the RAM 5 can be reduced. The download of the control firmware and the writing from the RAM 5 to the second ROM 8 are performed in parallel. Therefore, the RAM 5 only needs to secure the capacity of the firmware data 22 and the writing program 23 which are divided and downloaded, and the storage capacity of the RAM 5 can be further reduced.

【0048】尚、予備プログラム12b(図6参照)を
設けていないので、CPU4からアクセスする制御プロ
グラムのアドレスを一定にするために制御プログラムを
RAM5にコピーしなくても、第2ROM8から実行す
ることができる。このため、制御用ファームウェア実行
時には、RAM5は演算結果等の一時記憶ができる容量
があればよく、上記のように分割してファームウェアデ
ータをダウンロードする際に必要な容量で提供可能であ
る。
Since the spare program 12b (see FIG. 6) is not provided, it is necessary to execute the control program from the second ROM 8 without copying the control program to the RAM 5 in order to make the address of the control program accessed from the CPU 4 constant. Can be. For this reason, when the control firmware is executed, the RAM 5 only needs to have a capacity capable of temporarily storing the calculation result and the like, and the RAM 5 can be provided in a capacity necessary for downloading the firmware data by dividing as described above.

【0049】また、第2ROM8として種類の異なる不
揮発性メモリを使用したマイコンシステム1に対して、
第2ROM8を操作する消去プログラム及び書き込みプ
ログラムの変更を要するが、電子機器を制御する制御用
プログラムを変更する必要はない。第2ROM8には制
御プログラムのみから成る制御用ファームウェアが記憶
されているため、ファームウェアデータ23をそのまま
使用して制御用ファームウェアの書き換えを容易に行う
ことができる。
Further, for the microcomputer system 1 using different types of nonvolatile memories as the second ROM 8,
It is necessary to change the erase program and the write program for operating the second ROM 8, but it is not necessary to change the control program for controlling the electronic device. Since the second ROM 8 stores the control firmware including only the control program, the control firmware can be easily rewritten using the firmware data 23 as it is.

【0050】また、制御用ファームウェアの書き換え処
理の最中に、マイコンシステム1及びホストコンピュー
タ2への電源供給が遮断されると、ROM5の記憶内容
が消滅する。この場合に、第2ROM8の内容が消去さ
れていても、第1ROM7の記憶内容は消去されないた
め第1ROM7に記憶された起動用ファームウェアを実
行して制御用ファームウェアをダウンロードすることに
より容易に復旧することができる。
When the power supply to the microcomputer system 1 and the host computer 2 is cut off during the rewriting process of the control firmware, the contents stored in the ROM 5 are lost. In this case, even if the contents of the second ROM 8 are erased, the contents stored in the first ROM 7 are not erased. Therefore, the boot firmware stored in the first ROM 7 is executed and the control firmware is downloaded to easily recover. Can be.

【0051】次に、第2実施形態のプログラム書き換え
装置を図面を参照して説明する。本実施形態のプログラ
ム書き換え装置の構成は前述の図1に示す第1実施形態
と同様である。第1実施形態と異なる点は、第1ROM
7に記憶された起動用ファームウェア内に、第2ROM
8に当初記憶された制御プログラムを有している点であ
る。
Next, a program rewriting device according to a second embodiment will be described with reference to the drawings. The configuration of the program rewriting device of this embodiment is the same as that of the first embodiment shown in FIG. The difference from the first embodiment is that the first ROM
7 in the boot firmware stored in the second ROM.
8 has a control program initially stored.

【0052】図4は本実施形態のプログラム書き換え装
置の動作を示すフローチャートである。マイコンシステ
ム1が起動されると、まずステップ#71で第1ROM
7の起動用ファームウェアが実行される。これにより、
起動プログラム及び通信プログラム実行され、マイコン
システム1を立ち上げて、ホストコンピュータ2との通
信を可能にするとともに認識プログラムにより第2RO
M8の認識が行われる。
FIG. 4 is a flowchart showing the operation of the program rewriting device of this embodiment. When the microcomputer system 1 is started, first in step # 71, the first ROM
7 is executed. This allows
The startup program and the communication program are executed to start up the microcomputer system 1 to enable communication with the host computer 2 and to execute the second RO by the recognition program.
Recognition of M8 is performed.

【0053】次にステップ#72で、第2ROM8が正
常に認識されたか否か及び第2ROM8内の制御用ファ
ームウェアが正常か否かが判断される。第2ROM8が
正常に認識されて制御用ファームウェアが有効に機能す
る場合は、ステップ#73に移行して第2ROM8内の
制御用ファームウェアが実行され、マイコンシステム1
に接続された電子機器の制御が行われる。
Next, at step # 72, it is determined whether or not the second ROM 8 is normally recognized and whether or not the control firmware in the second ROM 8 is normal. If the second ROM 8 is normally recognized and the control firmware functions effectively, the process proceeds to step # 73 where the control firmware in the second ROM 8 is executed and the microcomputer system 1
The control of the electronic device connected to is performed.

【0054】ステップ#72で制御用ファームウェアが
有効に機能していないと判断すると、ステップ#74に
移行して、第1ROM7に記憶された制御プログラムが
実行される。これにより、電子機器の制御が行われる。
If it is determined in step # 72 that the control firmware is not functioning effectively, the flow shifts to step # 74 where the control program stored in the first ROM 7 is executed. Thus, control of the electronic device is performed.

【0055】また、前述の図3と同様の書き換え処理を
行うことによって、ホストコンピュータ2からの指示に
より第2ROM8内の制御用ファームウェアの書き換え
が行われる。この時、ステップ#53で制御用ファーム
ウェアの消去が成功したことを確認して書き換え処理を
終了してもよい。このようにすると、マイコンシステム
1は第1ROM7内の初期バージョンの制御プログラム
によって電子機器を制御し、制御動作を容易に初期状態
に戻すことができる。
Further, by performing the rewriting process similar to that of FIG. 3 described above, the control firmware in the second ROM 8 is rewritten according to an instruction from the host computer 2. At this time, it may be confirmed in step # 53 that the erasing of the control firmware has been successful, and the rewriting process may be ended. By doing so, the microcomputer system 1 controls the electronic device by the control program of the initial version in the first ROM 7, and can easily return the control operation to the initial state.

【0056】本実施形態によると、第1ROM7に制御
プログラムが記憶されるため、第2ROM8を認識でき
ないときにも電子機器の制御を行うことができる。ま
た、制御プログラムの分だけ第1実施形態よりも第1R
OM7の記憶容量を多く必要とするが、消去プログラム
及び書き込みプログラムを記憶しないので従来よりも記
憶容量を削減することができる。
According to the present embodiment, since the control program is stored in the first ROM 7, the electronic device can be controlled even when the second ROM 8 cannot be recognized. In addition, the first R than the first embodiment is equivalent to the control program.
Although a large storage capacity of the OM 7 is required, the storage capacity can be reduced as compared with the related art since the erasing program and the writing program are not stored.

【0057】尚、第1、第2実施形態において、第1、
第2ROM7、8を別の不揮発性メモリにより構成して
いるが、第1ROM7として部分的に消去及び書き込み
が可能な不揮発性メモリを使用する場合には、第1RO
M7の一領域に制御用ファームウェアを記憶して第2R
OM8を第1ROM7と兼用してもよい。
In the first and second embodiments, the first,
Although the second ROMs 7 and 8 are composed of different nonvolatile memories, when a nonvolatile memory that can be partially erased and written is used as the first ROM 7, the first RO
The control firmware is stored in one area of M7 and the second R
The OM 8 may be used also as the first ROM 7.

【0058】[0058]

【発明の効果】本発明によると、第1ROMに記憶され
た起動用ファームウェアが通信プログラムを有するの
で、マイコンシステムに接続された電子機器を制御する
制御用ファームウェアに損傷等があってもホストコンピ
ュータからダウンロードすることによって修復すること
が可能である。このため、従来のような予備プログラム
をマイコンシステム内に設ける必要がなく、第1、第2
ROMの記憶容量を削減することができる。
According to the present invention, since the boot firmware stored in the first ROM has the communication program, even if the control firmware for controlling the electronic device connected to the microcomputer system is damaged, the host computer can execute the firmware. It can be repaired by downloading. Therefore, there is no need to provide a conventional spare program in the microcomputer system.
The storage capacity of the ROM can be reduced.

【0059】また、第1、第2ROMに制御用ファーム
ウェアの消去プログラムや書き込みプログラムを記憶さ
せずホストコンピュータからダウンロードして実行する
ので、第1、第2ROMの記憶容量をより削減すること
ができる。更に、第2ROMには制御用ファームウェア
のみを記憶して通信プログラムや起動用プログラムを記
憶させないので更に記憶容量削減を図ることができる。
Further, since the erase program and the write program of the control firmware are not stored in the first and second ROMs but are downloaded from the host computer and executed, the storage capacity of the first and second ROMs can be further reduced. Furthermore, since only the control firmware is stored in the second ROM and the communication program and the start-up program are not stored, the storage capacity can be further reduced.

【0060】また、第2ROMの消去終了後に、書き込
みプログラムをダウンロードしているので、RAMに消
去プログラムと書き込みプログラムとが同時に記憶され
ず、RAMの記憶容量を削減することができる。また、
制御用ファームウェアのダウンロードとRAMから第2
ROMへの書き込みとが並行して行われるので、RAM
は分割してダウンロードされるファームウェアデータと
書き込みプログラムの容量を確保すればよく、RAMの
記憶容量をより削減することができる。
Further, since the writing program is downloaded after the erasing of the second ROM is completed, the erasing program and the writing program are not stored in the RAM at the same time, and the storage capacity of the RAM can be reduced. Also,
Download of control firmware and second from RAM
Since writing to ROM is performed in parallel, RAM
It is sufficient to secure the capacity of the firmware data and the writing program to be divided and downloaded, and the storage capacity of the RAM can be further reduced.

【0061】また、第2ROMとして異なる不揮発性メ
モリを使用した場合に、第2ROMを操作する消去プロ
グラム及び書き込みプログラムの変更を要するが、電子
機器を制御する制御用プログラムを変更する必要はな
い。第2ROMには制御プログラムのみから成る制御用
ファームウェアを記憶されるので、ファームウェアデー
タをそのまま使用して制御用ファームウェアの書き換え
を容易に行うことができる。
When a different nonvolatile memory is used as the second ROM, it is necessary to change the erase program and the write program for operating the second ROM, but it is not necessary to change the control program for controlling the electronic device. Since the control firmware including only the control program is stored in the second ROM, the control firmware can be easily rewritten using the firmware data as it is.

【0062】また、第1ROMに記憶された起動用ファ
ームウェアがホストコンピュータと通信を行う通信プロ
グラムを有しており第1ROMの記憶内容は消去されな
いので、制御用ファームウェアの書き換え処理の最中に
マイコンシステム及びホストコンピュータへの電源供給
が遮断されても、第1ROMに記憶された起動用ファー
ムウェアを実行して制御用ファームウェアをダウンロー
ドすることにより容易に復旧することができる。
Further, since the boot firmware stored in the first ROM has a communication program for communicating with the host computer, and the stored contents of the first ROM are not erased, the microcomputer system is not rewritten during the control firmware rewriting process. Even if the power supply to the host computer is cut off, the recovery can be easily performed by executing the boot firmware stored in the first ROM and downloading the control firmware.

【0063】また本発明によると、第1ROMに制御プ
ログラムを記憶することにより、電子機器の制御動作を
容易に初期状態に戻すことができるとともに、第2RO
Mを認識できないときにも電子機器の制御を行うことが
できる。また、制御プログラムの分だけ記憶容量を多く
必要とするが、消去プログラム及び書き込みプログラム
を記憶しないので従来よりも記憶容量を削減することが
できる。
According to the present invention, by storing the control program in the first ROM, the control operation of the electronic device can be easily returned to the initial state, and the second RO can be returned.
Even when M cannot be recognized, the electronic device can be controlled. In addition, although a large storage capacity is required for the control program, the storage capacity can be reduced as compared with the related art since the erase program and the write program are not stored.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の第1実施形態のプログラム書き換
え装置の構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a program rewriting device according to a first embodiment of the present invention.

【図2】 本発明の第1実施形態のプログラム書き換
え装置の動作を示すフローチャートである。
FIG. 2 is a flowchart illustrating an operation of the program rewriting device according to the first embodiment of the present invention.

【図3】 本発明の第1実施形態のプログラム書き換
え装置の書き換え処理の動作を示すフローチャートであ
る。
FIG. 3 is a flowchart illustrating an operation of a rewriting process of the program rewriting device according to the first embodiment of the present invention.

【図4】 本発明の第2実施形態のプログラム書き換
え装置の動作を示すフローチャートである。
FIG. 4 is a flowchart illustrating an operation of a program rewriting device according to a second embodiment of the present invention.

【図5】 従来のプログラム書き換え装置の構成を示
すブロック図である。
FIG. 5 is a block diagram showing a configuration of a conventional program rewriting device.

【図6】 従来のプログラム書き換え装置のROMを
示すメモリマップである。
FIG. 6 is a memory map showing a ROM of a conventional program rewriting device.

【図7】 従来のプログラム書き換え装置の動作を示
すフローチャートである。
FIG. 7 is a flowchart showing the operation of a conventional program rewriting device.

【符号の説明】[Explanation of symbols]

1、10 マイコンシステム 2、30 ホストコンピュータ 3、41 通信ケーブル 4 CPU 5、14 RAM 6 通信インターフェース 7 第1ROM 8 第2ROM 11 MPU 12 フラッシュメモリ 13 ドライバ 21 消去プログラム 22 書き込みプログラム 23 ファームウェアデータ 1, 10 Microcomputer system 2, 30 Host computer 3, 41 Communication cable 4 CPU 5, 14 RAM 6 Communication interface 7 First ROM 8 Second ROM 11 MPU 12 Flash memory 13 Driver 21 Erase program 22 Write program 23 Firmware data

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 電子機器の動作を制御する制御用ファー
ムウェアを記憶したマイコンシステムに、通信手段を介
して接続されたホストコンピュータから別の制御用ファ
ームウェアをダウンロードして前記マイコンシステムの
制御用ファームウェアを書き換えるプログラム書き換え
装置において、 前記マイコンシステムは、前記マイコンシステムを起動
する起動プログラムと前記ホストコンピュータとの通信
を行う通信プログラムとを有する起動用ファームウェア
を記憶した第1ROMと、前記ホストコンピュータから
ダウンロードしたデータを一時記憶するRAMと、制御
用ファームウェアを記憶する第2ROMと、を備えたこ
とを特徴とするプログラム書き換え装置。
1. Downloading another control firmware from a host computer connected via communication means to a microcomputer system storing control firmware for controlling the operation of an electronic device, and downloading the control firmware of the microcomputer system. In a program rewriting device for rewriting, the microcomputer system includes: a first ROM storing boot firmware having a boot program for booting the microcomputer system and a communication program for communicating with the host computer; and data downloaded from the host computer. And a second ROM for storing control firmware.
【請求項2】 前記RAMへの制御用ファームウェアの
ダウンロードと第2ROMの制御用ファームウェアの書
き込みとを並行して行い、分割してダウンロードされる
制御用ファームウェアにより前記RAMを順次上書きし
たことを特徴とする請求項1に記載のプログラム書き換
え装置。
2. The method according to claim 1, wherein downloading of the control firmware to the RAM and writing of the control firmware to the second ROM are performed in parallel, and the RAM is sequentially overwritten by the divided and downloaded control firmware. The program rewriting device according to claim 1.
【請求項3】 第2ROMに記憶された制御用ファーム
ウェアを消去するための消去プログラムと、第2ROM
に制御用ファームウェアを書き込むための書き込みプロ
グラムとを前記ホストコンピュータから送信したことを
特徴とする請求項1または請求項2に記載のプログラム
書き換え装置。
3. An erasing program for erasing control firmware stored in a second ROM;
The program rewriting device according to claim 1 or 2, wherein a write program for writing control firmware to the host computer is transmitted from the host computer.
【請求項4】 第2ROMの消去終了後、前記書き込み
プログラムをダウンロードしたことを特徴とする請求項
3に記載のプログラム書き換え装置。
4. The program rewriting device according to claim 3, wherein the writing program is downloaded after erasing of the second ROM is completed.
【請求項5】 起動用ファームウェア内に第2ROM内
の制御用ファームウェアと同一のプログラムを含んだこ
とを特徴とする請求項1〜請求項4のいずれかに記載の
プログラム書き換え装置。
5. The program rewriting apparatus according to claim 1, wherein the boot firmware contains the same program as the control firmware in the second ROM.
【請求項6】 第1ROMは部分的に消去、書き込み可
能な不揮発性メモリから成り、第2ROMを第1ROM
と兼用したことを特徴とする請求項1〜請求項5のいず
れかに記載のプログラム書き換え装置。
6. The first ROM is composed of a partially erasable and writable nonvolatile memory, and the second ROM is replaced with the first ROM.
The program rewriting device according to claim 1, wherein the program rewriting device is also used.
【請求項7】 第1ROMはマスクROM、PROM、
フラッシュメモリのいずれかから成ることことを特徴と
する請求項1〜請求項6のいずれかに記載のプログラム
書き換え装置。
7. The first ROM is a mask ROM, a PROM,
7. The program rewriting device according to claim 1, wherein the program rewriting device is made of any one of flash memories.
【請求項8】 電子機器の動作を制御する制御用ファー
ムウェアを記憶したマイコンシステムに、通信手段を介
して接続されたホストコンピュータから別の制御用ファ
ームウェアをダウンロードして前記マイコンシステムの
制御用ファームウェアを書き換えるプログラム書き換え
方法において、 前記マイコンシステムは、前記マイコンシステムを起動
する起動プログラムと前記ホストコンピュータとの通信
を行う通信プログラムとを有する起動用ファームウェア
を記憶した第1ROMと、前記ホストコンピュータから
ダウンロードしたデータを一時記憶するRAMと、制御
用ファームウェアを記憶する第2ROMと、を備え、 第2ROMに記憶された制御用ファームウェアを消去す
るための消去プログラムと、第2ROMに制御用ファー
ムウェアを書き込むための書き込みプログラムと、新た
な制御用ファームウェアとを前記ホストコンピュータか
ら送信し、前記消去プログラム及び前記書き込みプログ
ラムを実行して第2ROMの制御用ファームウェアを書
き換えたことを特徴とするプログラム書き換え方法。
8. Downloading another control firmware from a host computer connected via communication means to a microcomputer system storing control firmware for controlling the operation of the electronic device, and downloading the control firmware for the microcomputer system. In the method for rewriting a program, the microcomputer system comprises: a first ROM storing boot firmware having a boot program for booting the microcomputer system and a communication program for communicating with the host computer; and data downloaded from the host computer. And a second ROM for storing control firmware. An erasing program for erasing the control firmware stored in the second ROM, and a control firmware stored in the second ROM. A program for writing data and writing new control firmware from the host computer, and executing the erase program and the write program to rewrite the control firmware of the second ROM. Method.
【請求項9】 前記RAMへの制御用ファームウェアの
ダウンロードと第2ROMの制御用ファームウェアの書
き込みとを並行して行い、分割してダウンロードされる
制御用ファームウェアにより前記RAMを順次上書きし
たことを特徴とする請求項8に記載のプログラム書き換
え方法。
9. The control firmware download to the RAM and the control firmware writing to the second ROM are performed in parallel, and the RAM is sequentially overwritten by the divided and downloaded control firmware. 9. The program rewriting method according to claim 8, wherein:
【請求項10】 第2ROMの消去終了後、前記書き込
みプログラムをダウンロードしたことを特徴とする請求
項8または請求項9に記載のプログラム書き換え方法。
10. The program rewriting method according to claim 8, wherein the writing program is downloaded after erasing of the second ROM is completed.
JP2000373709A 2000-12-08 2000-12-08 Program rewriting apparatus and program rewriting method Expired - Fee Related JP3805195B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000373709A JP3805195B2 (en) 2000-12-08 2000-12-08 Program rewriting apparatus and program rewriting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000373709A JP3805195B2 (en) 2000-12-08 2000-12-08 Program rewriting apparatus and program rewriting method

Publications (2)

Publication Number Publication Date
JP2002175193A true JP2002175193A (en) 2002-06-21
JP3805195B2 JP3805195B2 (en) 2006-08-02

Family

ID=18843028

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000373709A Expired - Fee Related JP3805195B2 (en) 2000-12-08 2000-12-08 Program rewriting apparatus and program rewriting method

Country Status (1)

Country Link
JP (1) JP3805195B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007133602A (en) * 2005-11-09 2007-05-31 Fujitsu Ten Ltd Information processing system and onboard equipment
JP2007535182A (en) * 2003-07-17 2007-11-29 エネル ディストリビュズィオーネ ソシエタ ペル アチオニ Method and system for remotely updating a meter for measuring electricity, water or gas usage
JP2008244736A (en) * 2007-03-27 2008-10-09 Nikon Corp Accessory device for camera and camera system
JP2009048584A (en) * 2007-08-23 2009-03-05 Sony Corp Information processing apparatus, information processing method, and computer program
US7650499B2 (en) 2004-07-27 2010-01-19 Canon Kabushiki Kaisha Encryption apparatus and decryption apparatus
CN102790833A (en) * 2012-08-29 2012-11-21 上海酷宇通讯技术有限公司 ROM (Read Only Memory) space saving method for functional mobile phone
JP2013092978A (en) * 2011-10-27 2013-05-16 Denso Corp Electronic control unit and memory rewriting method
JP2021144674A (en) * 2020-03-11 2021-09-24 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド Processing method for audio processing chip, apparatus, electronic device, computer readable storage medium, and computer program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007535182A (en) * 2003-07-17 2007-11-29 エネル ディストリビュズィオーネ ソシエタ ペル アチオニ Method and system for remotely updating a meter for measuring electricity, water or gas usage
US8102277B2 (en) 2003-07-17 2012-01-24 Enel Distribuzione S.P.A. Method and system for remote updates of meters for metering the consumption of electricity, water or gas
US7650499B2 (en) 2004-07-27 2010-01-19 Canon Kabushiki Kaisha Encryption apparatus and decryption apparatus
JP2007133602A (en) * 2005-11-09 2007-05-31 Fujitsu Ten Ltd Information processing system and onboard equipment
JP2008244736A (en) * 2007-03-27 2008-10-09 Nikon Corp Accessory device for camera and camera system
JP2009048584A (en) * 2007-08-23 2009-03-05 Sony Corp Information processing apparatus, information processing method, and computer program
JP4591486B2 (en) * 2007-08-23 2010-12-01 ソニー株式会社 Information processing apparatus, information processing method, and computer program
JP2013092978A (en) * 2011-10-27 2013-05-16 Denso Corp Electronic control unit and memory rewriting method
CN102790833A (en) * 2012-08-29 2012-11-21 上海酷宇通讯技术有限公司 ROM (Read Only Memory) space saving method for functional mobile phone
JP2021144674A (en) * 2020-03-11 2021-09-24 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド Processing method for audio processing chip, apparatus, electronic device, computer readable storage medium, and computer program
US11556333B2 (en) 2020-03-11 2023-01-17 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for processing audio processing chip, and electronic device

Also Published As

Publication number Publication date
JP3805195B2 (en) 2006-08-02

Similar Documents

Publication Publication Date Title
JP3838840B2 (en) Computer
US9164756B2 (en) Software updating process for an embedded device
US7664923B2 (en) Method and system for updating software
WO2022007656A1 (en) Bootloader software updating method and apparatus, embedded controller, and storage medium
US20140325496A1 (en) Apparatus and method for firmware upgrade using usb
WO2017000567A1 (en) Bootrom upgrading method and device
JP2000293367A (en) Nonvolatile-memory built-in microcomputer
JP3830867B2 (en) Single-chip microcomputer and its boot area switching method
JP3805195B2 (en) Program rewriting apparatus and program rewriting method
CN111026417A (en) Embedded equipment upgrading method and embedded equipment
KR101601751B1 (en) Ecu of vehicle and boot software re-programming method thereof
JP2004192329A (en) Program rewriting method and terminal device
JP2019008693A (en) Vehicle-purpose electronic control unit
JP2001344156A (en) Device with flash memory and data rewriting method
US20050068842A1 (en) Electronic device, nonvolatile memory and method of overwriting data in nonvolatile memory
JP2023020590A (en) Information processing apparatus and monitoring method
JPH09305394A (en) Electronic equipment
KR19990077915A (en) Computer system having a distinctive operating system
JPH1091539A (en) Data storage
JPH11184683A (en) Electronic equipment
JP2738611B2 (en) Electronic equipment
JP2000207217A (en) Data processor, and program downloading method
CN115599449A (en) Processor starting system and method
JPH11338690A (en) Flash memory, firmware use system device and firmware rewriting method
CN111679848A (en) Software updating method and terminal

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051219

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060110

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060322

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060405

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060509

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060509

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100519

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110519

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110519

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120519

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120519

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130519

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140519

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees