JP2004110220A - Method for updating program - Google Patents

Method for updating program Download PDF

Info

Publication number
JP2004110220A
JP2004110220A JP2002269380A JP2002269380A JP2004110220A JP 2004110220 A JP2004110220 A JP 2004110220A JP 2002269380 A JP2002269380 A JP 2002269380A JP 2002269380 A JP2002269380 A JP 2002269380A JP 2004110220 A JP2004110220 A JP 2004110220A
Authority
JP
Japan
Prior art keywords
program
memory
stored
copied
holding memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002269380A
Other languages
Japanese (ja)
Inventor
Miya Ikegami
池上 美也
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.)
Canon I Tech Inc
Original Assignee
Canon I Tech Inc
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 Canon I Tech Inc filed Critical Canon I Tech Inc
Priority to JP2002269380A priority Critical patent/JP2004110220A/en
Publication of JP2004110220A publication Critical patent/JP2004110220A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent troubles resulting from the updating of a program. <P>SOLUTION: A copy (b) of a yet-to-be-updated program (a) in a program memory 22 is made into an external storage medium 5. When the normality of the copy is verified, start settings are set in the external storage medium 5 and a copy (c) of an updated program in the external storage medium 5 is made into a program memory 22 to restart electronic equipment. After the restart, when the start settings are for the external storage medium 5, the yet-to-be-updated program copied in the external storage medium 5 is started. Under these conditions, when a user selects the start of the updated program, the updated program in the program memory 22 is started. When the user selects the updating of the start settings, the start settings are restored to the program memory 22. Thus, the updated program in the program memory 22 is started at each subsequent restart. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、各種電子機器に組み込まれるファームウエアプログラムなどのプログラムを、バージョンアップなどのために更新する技術に関するものであり、特に、当該更新による障害の発生を抑止する技術に関するものである。
【0002】
【従来の技術】
各種電子機器には、ROMなどの可書換型の不揮発性メモリに格納された形態で組み込まれるファームウエアプログラムを、バージョンアップのために適時更新する機能が予め組み込まれていることが多い。
そして、従来は、このようなファームウエアプログラムの更新は、単に、ROM上のファームウエアプログラムを、新しいファームウエアプログラムに書き換えることにより行われてきた。
【0003】
【発明が解決しようとする課題】
従来のファームウエアプログラム更新の技術によれば、更新作業途中で電源のオフ等の障害が発生した場合、ROM上のファームウエアプログラムが不完全な形で書き換えられてしまい、その後、ファームウエアプログラムを正常に実行できないために、その電子機器を正常に起動することができなくなったり、正常なファームウエアプログラムの更新を行えなくなってしまうことがある。
【0004】
そこで、本発明は、プログラムの更新の際に、当該更新による障害の発生を抑止することを課題とする。
【0005】
【課題を解決するための手段】
前記課題達成のために、本発明は、電子機器の不揮発性のプログラム保持用メモリに格納されたプログラムを当該電子機器が更新するプログラムの更新方法を、前記プログラム保持用メモリに格納されているプログラムを、前記プログラム保持用メモリ以外の不揮発性のメモリであるバックアップ用メモリにコピーするステップと、前記バックアップ用メモリにコピーしたプログラムと前記プログラム保持用メモリに格納されているプログラムの同一性を確認するステップと、前記同一性が確認できた場合に、前記電子機器の起動後に、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定するステップと、前記プログラム保持用メモリに格納されているプログラムを新たなプログラムに更新するステップと、前記電子機器の起動時に、前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている場合に、当該電子機器が、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するステップと、前記バックアップ用メモリにコピーしたプログラムが稼働した後に、ユーザの指示に応じて、当該電子機器が、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するステップと、前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、ユーザの指示に応じて、前記電子機器の起動後に、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するよう設定するステップと、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、当該電子機器が、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するステップとより構成したものである。
【0006】
このようなプログラムの更新方法によれば、前記プログラム保持用メモリに格納されているプログラムを前記バックアップ用メモリにコピーし、そのコピーの正常性が確認された後に、前記プログラム保持用メモリに格納されているプログラムを新たなプログラムに更新するので、前記プログラム保持用メモリに格納されているプログラムの更新が失敗した場合、または、前記プログラム保持用メモリに格納されているプログラムを更新する新たなプログラム自体に問題がある場合には、コピーしたプログラムを用いて、前記プログラム保持用メモリに格納されているプログラムを元のプログラムに復帰することができるようになる。
【0007】
また、前記プログラム保持用メモリに格納されているプログラムを更新した後は、ユーザの指示があるまで、電子機器の起動後には、前記プログラム保持用メモリに格納されている更新後のプログラムではなく、前記バックアップ用メモリにコピーした更新前のプログラムが稼働するようになるので、プログラム保持用メモリのプログラム更新後の最初の起動後等に、プログラム保持用メモリの更新後のプログラムに問題があるために、電子機器が正常に動作しなくなってしまい、これにより更新後のプログラムに生じた問題に対処するための所要の処理を電子機器が行えなくなってしまうことを避けることができる。
【0008】
また、本更新方法によれば、このように起動後に前記バックアップ用メモリにコピーした更新前のプログラムが稼働するように設定されている状態のまま、前記プログラム保持用メモリに格納されている更新後のプログラムを稼働させ、その動作の正常性を確認することができる。すなわち、もし、前記プログラム保持用メモリに格納されている更新後のプログラムが正常に動作しなった場合には、電子機器の再起動により、前記バックアップ用メモリにコピーした更新前のプログラムを稼働するので、上述のように電子機器が正常に動作しなくなってしまい、これにより更新後のプログラムに生じた問題に対処するための所要の処理を電子機器が行えなくなってしまうことを避けることができる。
【0009】
そして、前記プログラム保持用メモリに格納されている更新後のプログラムの正常性が確認できた場合には、ユーザは所定の指示を行って、起動後に前記プログラム保持用メモリに格納されている更新後のプログラムが稼働するように設定することにより、プログラムの更新を完了することができる。
【0010】
ここで、このようなプログラムの更新方法においては、さらに、前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、ユーザの指示に応じて、前記プログラム保持用メモリに格納されているプログラムを新たなプログラムに更新するステップを設けるようにしても良い。
【0011】
このようにすることにより、前記プログラム保持用メモリに格納されている更新後のプログラムに問題が生じた場合には、問題を修正したプログラムに再度前記プログラム保持用メモリに格納されているプログラムを更新し、以上説明した、プログラム保持用メモリのプログラム更新後の動作を行うことができるようになる。
【0012】
また、以上のプログラムの更新方法においては、前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、ユーザの指示に応じて、前記バックアップ用メモリにコピーしたプログラムで、前記プログラム保持用メモリに格納されているプログラムを更新するステップをさらに設けるようにしてもよい。
【0013】
このようにすることにより、前記プログラム保持用メモリに格納されている更新後のプログラムに問題が生じた場合には、前記プログラム保持用メモリに格納されているプログラムを更新前のプログラムに復することができるようになる。ここで、以上のプログラムの更新方法においては、前記バックアップ用メモリは過般型の記憶媒体とし、前記プログラム保持用メモリに格納されているプログラムの新たなプログラムへの更新は、前記過般型の記憶媒体に記憶しておいた前記新たなプログラムで前記プログラム保持用メモリに格納されているプログラムを更新することにより行うようにするようにすることも、特段、そのような過般型の記憶媒体を備えた電子機器のプログラムの更新への適用においては、更新作業の容易性や更新のために要する資源の節減の上などから好ましい。
【0014】
【発明の実施の形態】
以下、本発明の実施形態について電子機器のファームウエアプログラムの更新への適用を例にとり説明する。
図1に、本実施形態においてファームウエアプログラム更新の対象とする電子機器の構成例を示す。
図示するように、この電子機器は、CPU1、フラッシュメモリなどの書き換え可能な可書換型のROM2、CPU1の主記憶として使用されるRAM3、過般型のメモリカードなどの外部記憶媒体5を装着可能な外部記憶媒体インタフェース4、入力インタフェース6を介して接続された、キースイッチなどの入力装置7、表示インタフェース8を介して接続されたLCDなどの表示装置9、不揮発性のメモリである起動設定レジスタ10、当該電子機器の機能を提供する機能部11とを有する。ここで電子機器はたとえばプリンタなどであり、この場合、機能部11は印刷機能を提供するものとなる。
【0015】
さて、本実施形態の説明においては、便宜上、ROM2の記憶領域を二つに分割した一方の記憶領域を起動プログラムメモリ21と呼び、他方の記憶領域をプログラムメモリ22と呼ぶ。プログラムメモリ22はバーションアップなどのために更新されるファームウエアのプログラムが格納されるものであり、起動プログラムメモリ21はプログラムメモリ22のプログラムの起動処理を行う、通常は更新しないファームウエアの起動処理プログラムが格納されるものである。
【0016】
以下、このような電子機器における、プログラムメモリ22に格納されたプログラムの更新処理について説明する。
図2に、起動プログラムメモリ21に格納された起動処理プログラムが行う起動処理の手順を示す。
本起動処理プログラムは、電子機器の起動時に起動プログラムからRAM3にロードされCPU1によって実行される。
図示するように、本起動処理では、まず、電子機器各部の所定の初期化処理を行う(ステップ200)。そして、次に、起動設定レジスタ10に格納されている起動設定がプログラムメモリ22となっているか、それとも外部記憶媒体5となっているかを調べる(ステップ202)。ここで、この起動設定は、通常時はプログラムメモリ22となっている。
【0017】
起動設定がプログラムメモリ22である場合、起動処理は、プログラムメモリ22のプログラムを起動する(ステップ204)。すなわち、CPU1にプログラムメモリ22からプログラムをRAM3にロードさせて実行させる。そして、以降は入力装置7を介したユーザからの更新指示を待つ(ステップ206)。
【0018】
ここで、ユーザは現在のプログラムメモリ22のプログラム(以下、便宜上「更新前プログラム」と記す)の更新を行う場合、新しいプログラム(以下、便宜上「更新後プログラム」と記す)を格納した外部記憶媒体5を、外部記憶媒体インタフェース4に装着し、入力装置7から更新指示を行う。
【0019】
起動処理では、更新指示があった場合(ステップ206)、まず、その時点で図3aに示すようにプログラムメモリ22に格納されている更新前プログラムを、図3bに示すように外部記憶媒体5にコピー(バックアップ)する(ステップ208)。次に、外部記憶媒体5にコピーした更新前プログラムと、プログラムメモリ22上のコピー元の更新前のプログラムの同一性をチェックする(ステップ210)。そして、正常にコピーされたことが確認できなかった場合には、表示装置にコピーエラーを通知するメッセージを表示する(ステップ218)。ここで、この表示からエラーを確認したユーザは、電子機器を再起動することにより、初めから起動処理を開始させることができ、また、この時点で、図3bに示すようにプログラムメモリ22、設定起動レジスタの内容は変更されていないので、再起動された電子機器は従前通り動作することになる。
【0020】
一方、正常にコピーされたことを確認できた場合には、起動レジスタの起動設定を外部記憶媒体5に変更し(ステップ214)、図3cに示すように、外部記憶媒体5に格納されている更新後プログラムで、プログラムメモリ22の更新前プログラムを書き換える(ステップ216)。そして、電子機器を再起動する(ステップ234)。
【0021】
さて、この後、電子機器が再起動されると、起動処理が実行され上述のように動作するが、今度は、図3dに示すように起動設定が外部記憶媒体5となっているので、ステップ202の判定によりステップ220に進み、プログラムメモリ22上のプログラムではなく、外部記憶媒体5にコピーされた更新前プログラムを起動する(ステップ220)。そして、ユーザより入力装置7を介して、再コピー、更新後プログラム起動、起動設定更新のいづれかの動作選択を受け付ける(ステップ222)。なお、ステップ214で起動レジスタの起動設定を外部記憶媒体5に変更した後に、ステップ216でプログラムメモリ22の更新前プログラムを書き換えているので、もしステップ216の書き換え中に障害が発生した場合であっても、再起動後には外部記憶媒体5にコピーされ正常性が確認された更新前プログラムが支障なく起動することになる。
【0022】
さて、通常、ユーザは、更新指示後の最初の動作選択としては、ROM2にコピーした更新後プログラムの正常性を確認するために、更新後プログラム起動を選択する。
起動処理では、更新後プログラム起動を受け付けた場合には(ステップ226)、プログラムメモリ22上の更新後プログラムを起動する(ステップ228)。そして、ユーザは起動された更新後プログラムの動作の正常性を確認し、更新後プログラムの動作の正常性、または、異常を確認したならば、電子機器を再起動する。
【0023】
そして、電子機器が再起動されると、起動処理が実行され上述のように動作して外部記憶媒体5にコピーされた更新前プログラムを稼働し、再度、ユーザより入力装置7を介して、再コピー、更新後プログラム起動、起動設定更新のいづれかの動作選択を受け付ける(ステップ222)。すなわち、先に稼働させてみたプログラムメモリ22上の更新後プログラムに問題があった場合でも、再起動によって外部記憶媒体5にコピーされた更新前プログラムが稼働する状態に戻り、以下の再コピーなどの、更新後プログラムの問題に対処する処理を行うことができる。
【0024】
さて、ユーザは、先に更新後プログラムの動作の異常を確認している場合には、再起動後に再コピーを選択する。
再コピーが選択された場合(ステップ224)、起動処理では、ステップ208に進み、外部記憶媒体5の更新後プログラムを再度ROM2に書き込み、以降のステップに進み前述のように処理を行う。これにより、何らかの事情により外部記憶媒体5の更新後プログラムのROM2へのコピーが正しく行われなかった場合には、再度、外部記憶媒体5の更新後プログラムのROM2へのコピーから更新の処理を行うことができるようになる。また、外部記憶媒体5に、先にROM2へコピーした更新後プログラムの不具合を修正したプログラムを格納し、この修正後のプログラムに、更新後のプログラムとするプログラムを切り替えることもできる。
【0025】
一方、ユーザは、先に更新後プログラムの動作の正常性を確認している場合には、起動設定更新を選択する。そして、起動設定更新が選択された場合(ステップ230)、起動処理では、ステップ232に進み、図3eに示すように起動設定レジスタ10の起動設定をプログラムメモリ22に設定し(ステップ232)、電子機器を再起動する(ステップ234)。
【0026】
すると、以降は、起動設定がプログラムメモリ22であることより、ステップ202の判定に従って、起動処理ではステップ204でプログラムメモリ22の更新後プログラムを起動するようになる。
ところで、以上では、通常、更新しない起動プログラムメモリ21に格納した起動プログラムに、プログラムメモリ22のプログラムの更新機能を設けたが、この更新機能は、プログラムメモリ22に格納されるプログラム自体に備えるようにしても良い。
【0027】
すなわち、図4aに示すように、起動プログラムによる起動処理は、前述したステップ200〜203、220の初期化処理と起動設定に応じたプログラムの起動処理のみを行うように構成し、起動処理により起動される更新前プログラムと更新後プログラムの双方に、図4bに示すように起動設定に応じて(ステップ401)、前述したステップ206〜218、234か、ステップ224〜234のいずれかを行うプログラムを含めるようにしてもよい。
【0028】
または、このような更新機能を提供するプログラムは、外部記憶媒体5に別途格納しておき、起動設定が外部記憶媒体5である場合や、ユーザより所定の入力があった場合に、起動処理より起動するようにすることもできる。
また、以上の実施形態のステップ222においては、動作選択として、さらにプログラム復帰の選択を可能とし、プログラム復帰が選択された場合には、外部記憶媒体5に格納されている更新前プログラムをプログラムメモリ22に復帰すると共に、起動設定をプログラムメモリ22に設定するようにしても良い。このようにすることにより、更新後プログラムの動作に異常があった場合などに、状態を、以上のような更新動作開始前の状態に元に復することができる。
【0029】
また、以上の実施形態において、ステップ228でプログラムメモリ22の更新後プログラムを起動した後に、再起動することなく起動設定更新の動作選択を受付、起動設定をプログラムメモリ22に変更できるようにしてもよい。
また、ステップ208で行うプログラムメモリ22の更新前プログラムのコピーのコピー先は、ROM2に充分な容量を確保できる場合には、予め定めて置いたROM2のバックアップ用領域とするようにしても良い。
また、電子機器に所要のネットワーク通信機能を備えることにより、以上の外部記憶媒体5に代えて、ネットワーク上の記憶装置を用いるようにすることもできる。
以上、本発明の実施形態について説明した。
このように本実施形態によれば、プログラムの更新処理を行っている際に、電源オフや、更新後プログラムの不具合や、外部記憶媒体5の抜き取りなどの影響により、プログラムメモリ22に書き込んだプログラムに問題が生じた場合でも、支障なく、その問題を克服するための処理を継続することができる。
【0030】
なお、本実施形態はファームウエアプログラムの更新に限らず、任意のプログラムの更新に適用可能である。
【0031】
【発明の効果】
以上のように、本発明によれば、プログラムの更新の際に、当該更新による障害の発生を抑止することができる。
【図面の簡単な説明】
【図1】本発明の実施形態に係るプログラム更新の対象となる電子機器の構成例を示すブロック図である。
【図2】本発明の実施形態に係る起動処理を示すフローチャートである。
【図3】本発明の実施形態に係るプログラムの更新の手順を示す図である。
【図4】本発明の実施形態に係るプログラム更新のための他の処理構成例を示すフローチャートである。
【符号の説明】
1:CPU、2:ROM、3:RAM、4:外部記憶媒体インタフェース、5:外部記憶媒体、6:入力インタフェース、7:入力装置、8:表示インタフェース、10:起動設定レジスタ、11:機能部、21:起動プログラムメモリ、22:プログラムメモリ。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technology for updating a program such as a firmware program incorporated in various electronic devices for version upgrade, and more particularly to a technology for suppressing occurrence of a failure due to the update.
[0002]
[Prior art]
Various electronic devices often have a function of updating a firmware program incorporated in a form stored in a rewritable nonvolatile memory such as a ROM in a timely manner in order to upgrade the firmware.
Conventionally, such a firmware program has been updated simply by rewriting the firmware program on the ROM with a new firmware program.
[0003]
[Problems to be solved by the invention]
According to the conventional firmware program update technology, if a failure such as power-off occurs during the update work, the firmware program in the ROM is rewritten in an incomplete form. Since the electronic device cannot be executed normally, the electronic device may not be able to be started normally or the firmware program may not be updated normally.
[0004]
Accordingly, an object of the present invention is to suppress occurrence of a failure due to the update when updating the program.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a method for updating a program stored in a non-volatile program holding memory of an electronic device by the electronic device. To a backup memory, which is a non-volatile memory other than the program holding memory, and confirming the identity of the program copied to the backup memory and the program stored in the program holding memory And setting, after the start of the electronic device, to operate the program copied to the backup memory in place of the program stored in the program holding memory when the identity is confirmed. The program stored in the program holding memory. Updating the program to a new program, and, when starting up the electronic device, if the program copied to the backup memory is set to operate, the electronic device is stored in the program holding memory. Operating the program copied to the backup memory in place of the program being executed, and after the program copied to the backup memory is operated, the electronic device is operated by the user according to a user instruction. Operating the new program stored in the backup memory, and activating the electronic device in a state where the program copied to the backup memory is set to operate, and then, in accordance with a user instruction, the electronic device After starting, the program holding memory Setting the new program stored to operate, and starting the electronic device in a state where the new program stored in the program holding memory is set to operate, and Is a step of operating a new program stored in the program holding memory.
[0006]
According to such a program updating method, a program stored in the program holding memory is copied to the backup memory, and after the normality of the copy is confirmed, the program is stored in the program holding memory. Is updated to a new program, the update of the program stored in the program holding memory fails, or the new program itself for updating the program stored in the program holding memory When there is a problem, the program stored in the program holding memory can be returned to the original program by using the copied program.
[0007]
Further, after updating the program stored in the program holding memory, after the start of the electronic device, not after the update of the program stored in the program holding memory, until the user's instruction, Since the pre-update program copied to the backup memory will be operated, such as after the first startup after the program update of the program storage memory, there is a problem in the program after the update of the program storage memory. Thus, it is possible to avoid that the electronic device does not operate normally and the electronic device cannot perform required processing for dealing with a problem occurring in the updated program.
[0008]
Further, according to the update method, the program before the update stored in the program holding memory is kept in a state in which the program before the update copied to the backup memory after the start-up is set to operate. Can be run to check the normality of its operation. That is, if the updated program stored in the program holding memory does not operate normally, the electronic device is restarted to operate the program before updating copied to the backup memory. Therefore, it is possible to avoid that the electronic device does not operate normally as described above, thereby preventing the electronic device from being able to perform required processing for dealing with a problem occurring in the updated program.
[0009]
Then, when the normality of the updated program stored in the program holding memory can be confirmed, the user issues a predetermined instruction, and after the start-up, the updated program stored in the program holding memory is stored. Updating the program can be completed by setting the program to operate.
[0010]
Here, in such a method for updating a program, further, after starting the electronic device in a state where the program copied to the backup memory is set to operate, the program is updated in accordance with a user instruction. A step of updating the program stored in the holding memory with a new program may be provided.
[0011]
By doing so, if a problem occurs in the updated program stored in the program holding memory, the program stored in the program holding memory is updated again with the program having the corrected problem. Then, the above-described operation after updating the program in the program holding memory can be performed.
[0012]
Further, in the above-described program updating method, after the electronic device is started in a state where the program copied to the backup memory is set to operate, the electronic device is copied to the backup memory according to a user instruction. The program may further include a step of updating the program stored in the program holding memory.
[0013]
By doing so, when a problem occurs in the updated program stored in the program holding memory, the program stored in the program holding memory is restored to the program before the update. Will be able to Here, in the above-described program updating method, the backup memory is a general-purpose storage medium, and updating of a program stored in the program holding memory to a new program is performed by using the general-purpose storage medium. The update may be performed by updating the program stored in the program holding memory with the new program stored in the storage device. The application to the update of the program of the electronic device is preferable from the viewpoint of easiness of the update operation and saving of resources required for the update.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described by taking an example of application to a firmware program update of an electronic device.
FIG. 1 illustrates a configuration example of an electronic device to be updated with a firmware program in the present embodiment.
As shown in the figure, this electronic apparatus can mount an external storage medium 5 such as a CPU 1, a rewritable ROM 2 such as a flash memory, a RAM 3 used as a main memory of the CPU 1, and a general-purpose memory card. An input device 7 such as a key switch connected via an external storage medium interface 4 and an input interface 6, a display device 9 such as an LCD connected via a display interface 8, a boot setting register 10 which is a nonvolatile memory And a functional unit 11 that provides the function of the electronic device. Here, the electronic device is, for example, a printer, and in this case, the function unit 11 provides a printing function.
[0015]
In the description of the present embodiment, one storage area obtained by dividing the storage area of the ROM 2 into two is referred to as a startup program memory 21 and the other storage area is referred to as a program memory 22 for convenience. The program memory 22 stores a firmware program to be updated for version-up or the like, and the startup program memory 21 performs startup processing of the program in the program memory 22, and activates firmware that is not normally updated. The processing program is stored.
[0016]
Hereinafter, a process of updating a program stored in the program memory 22 in such an electronic device will be described.
FIG. 2 shows a procedure of a boot process performed by a boot process program stored in the boot program memory 21.
The activation processing program is loaded from the activation program into the RAM 3 when the electronic device is activated, and is executed by the CPU 1.
As shown in the figure, in the activation process, first, a predetermined initialization process of each section of the electronic device is performed (step 200). Then, it is checked whether the boot setting stored in the boot setting register 10 is the program memory 22 or the external storage medium 5 (step 202). Here, this startup setting is normally the program memory 22.
[0017]
If the start setting is the program memory 22, the start process starts the program in the program memory 22 (step 204). That is, the CPU 1 loads the program from the program memory 22 to the RAM 3 and executes the program. Then, it waits for an update instruction from the user via the input device 7 (step 206).
[0018]
Here, when the user updates the current program (hereinafter referred to as “pre-update program” for convenience) in the program memory 22, the external storage medium storing the new program (hereinafter referred to as “post-update program” for convenience) 5 is attached to the external storage medium interface 4, and an update instruction is issued from the input device 7.
[0019]
In the start-up process, when an update instruction is given (step 206), first, the pre-update program stored in the program memory 22 as shown in FIG. 3A is stored in the external storage medium 5 as shown in FIG. 3B. Copy (backup) is performed (step 208). Next, it checks whether the pre-update program copied to the external storage medium 5 is identical to the copy-source pre-update program on the program memory 22 (step 210). If it is not confirmed that the copying has been performed normally, a message notifying of a copy error is displayed on the display device (step 218). Here, the user who has confirmed the error from this display can start the boot process from the beginning by restarting the electronic device, and at this time, the program memory 22 is set as shown in FIG. Since the contents of the start register have not been changed, the restarted electronic device operates as before.
[0020]
On the other hand, if it is confirmed that the copying has been normally performed, the startup setting of the startup register is changed to the external storage medium 5 (step 214), and the startup setting is stored in the external storage medium 5 as shown in FIG. The pre-update program in the program memory 22 is rewritten with the post-update program (step 216). Then, the electronic device is restarted (step 234).
[0021]
When the electronic device is restarted thereafter, the boot process is executed and operates as described above. This time, however, since the boot setting is the external storage medium 5 as shown in FIG. The process proceeds to step 220 according to the determination in 202, and the pre-update program copied to the external storage medium 5 is started instead of the program on the program memory 22 (step 220). Then, the user receives an operation selection from the user via the input device 7 for one of the following: recopying, starting the updated program, and updating the startup setting (step 222). After the start setting of the start register is changed to the external storage medium 5 in step 214, the pre-update program in the program memory 22 is rewritten in step 216. Therefore, if a failure occurs during rewriting in step 216, However, after the restart, the pre-update program copied to the external storage medium 5 and checked for normality starts without any trouble.
[0022]
By the way, usually, as the first operation selection after the update instruction, the user selects the start of the updated program in order to confirm the normality of the updated program copied to the ROM 2.
In the start-up process, when the start of the updated program is received (step 226), the updated program on the program memory 22 is started (step 228). Then, the user checks the normality of the operation of the activated post-update program, and restarts the electronic device if the normality of the operation of the post-update program or the abnormality is confirmed.
[0023]
Then, when the electronic device is restarted, the startup process is executed and the above-described operation is performed to operate the pre-update program copied to the external storage medium 5. An operation selection of either copy, program start after update, or start setting update is accepted (step 222). That is, even if there is a problem with the post-update program on the program memory 22 that has been operated earlier, the pre-update program copied to the external storage medium 5 returns to the operating state by the restart, and the following re-copying is performed. However, it is possible to perform a process for addressing the problem of the updated program.
[0024]
By the way, if the user has previously confirmed that the operation of the post-update program is abnormal, the user selects the re-copy after the restart.
If re-copying is selected (step 224), in the startup process, the process proceeds to step 208, where the updated program of the external storage medium 5 is written into the ROM 2 again, and the process proceeds to subsequent steps to perform the above-described process. Thus, if the updated program of the external storage medium 5 is not correctly copied to the ROM 2 due to some reason, the update process is performed again from the copy of the updated program of the external storage medium 5 to the ROM 2. Will be able to do it. Further, a program in which a defect of the updated program previously copied to the ROM 2 is corrected is stored in the external storage medium 5, and the program to be the updated program can be switched to the corrected program.
[0025]
On the other hand, if the user has previously confirmed the normality of the operation of the post-update program, the user selects the update of the startup setting. Then, when the startup setting update is selected (step 230), the startup processing proceeds to step 232, where the startup setting of the startup setting register 10 is set in the program memory 22 as shown in FIG. The device is restarted (step 234).
[0026]
Then, after that, since the start setting is the program memory 22, the updated program in the program memory 22 is started in step 204 in the start process according to the determination in step 202.
By the way, in the above description, the boot program stored in the boot program memory 21 which is not normally updated is provided with the function of updating the program in the program memory 22. This updating function is provided in the program itself stored in the program memory 22. You may do it.
[0027]
That is, as shown in FIG. 4A, the startup process by the startup program is configured to perform only the initialization process of steps 200 to 203 and 220 and the startup process of the program according to the startup setting, and the startup process is performed by the startup process. As shown in FIG. 4B, both the pre-update program and the post-update program include a program that performs one of the above-described steps 206 to 218 and 234 or steps 224 to 234 according to the startup setting (step 401). It may be included.
[0028]
Alternatively, a program that provides such an update function is separately stored in the external storage medium 5, and the startup processing is performed when the startup setting is the external storage medium 5 or when a predetermined input is made by the user. It can also be activated.
Further, in step 222 of the above embodiment, program return can be further selected as an operation selection, and when program return is selected, the pre-update program stored in the external storage medium 5 is stored in the program memory. 22, the startup setting may be set in the program memory 22. By doing so, the state can be returned to the state before the start of the update operation as described above, for example, when there is an abnormality in the operation of the post-update program.
[0029]
Further, in the above embodiment, after the update program of the program memory 22 is started in step 228, the operation selection of the start setting update can be accepted without restarting, and the start setting can be changed to the program memory 22. Good.
In addition, the copy destination of the copy of the pre-update program in the program memory 22 performed in step 208 may be a predetermined backup area of the ROM 2 if a sufficient capacity can be secured in the ROM 2.
In addition, by providing the electronic device with a required network communication function, a storage device on a network can be used instead of the external storage medium 5 described above.
The embodiments of the present invention have been described above.
As described above, according to the present embodiment, when the program update process is being performed, the program written in the program memory 22 due to the power-off, a defect in the post-update program, or the removal of the external storage medium 5. Even if a problem occurs, the process for overcoming the problem can be continued without any problem.
[0030]
The present embodiment is not limited to updating a firmware program, but is applicable to updating an arbitrary program.
[0031]
【The invention's effect】
As described above, according to the present invention, when a program is updated, occurrence of a failure due to the update can be suppressed.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an electronic device to be updated according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating a startup process according to the embodiment of the present invention.
FIG. 3 is a diagram showing a procedure for updating a program according to the embodiment of the present invention.
FIG. 4 is a flowchart illustrating another example of a processing configuration for updating a program according to the embodiment of the present invention.
[Explanation of symbols]
1: CPU, 2: ROM, 3: RAM, 4: external storage medium interface, 5: external storage medium, 6: input interface, 7: input device, 8: display interface, 10: start setting register, 11: functional unit , 21: start program memory, 22: program memory.

Claims (5)

電子機器の不揮発性のプログラム保持用メモリに格納されたプログラムを更新するプログラムの更新方法であって、
前記プログラム保持用メモリに格納されているプログラムを、前記プログラム保持用メモリ以外の不揮発性のメモリであるバックアップ用メモリにコピーするステップと、
前記バックアップ用メモリにコピーしたプログラムと前記プログラム保持用メモリに格納されているプログラムの同一性を確認するステップと、
前記同一性が確認できた場合に、前記電子機器の起動後に、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定するステップと、
前記プログラム保持用メモリに格納されているプログラムを新たなプログラムに更新するステップと、
前記電子機器の起動時に、前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている場合に、当該電子機器が、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するステップと、
前記バックアップ用メモリにコピーしたプログラムが稼働した後に、ユーザの指示に応じて、当該電子機器が、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するステップと、
前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、ユーザの指示に応じて、前記電子機器の起動後に、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するよう設定するステップと、
前記プログラム保持用メモリに格納されている新たなプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、当該電子機器が、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するステップとを有することを特徴とするプログラムの更新方法。
A program updating method for updating a program stored in a nonvolatile program holding memory of an electronic device,
Copying the program stored in the program holding memory to a backup memory that is a non-volatile memory other than the program holding memory;
Confirming the identity of the program copied to the backup memory and the program stored in the program holding memory;
If the identity can be confirmed, after starting the electronic device, setting to run the program copied to the backup memory instead of the program stored in the program holding memory,
Updating a program stored in the program holding memory to a new program;
When the electronic device is started, when the program copied to the backup memory is set to operate, the electronic device is stored in the backup memory instead of the program stored in the program holding memory. Running the copied program;
After the program copied to the backup memory is operated, in response to a user's instruction, the electronic device operates a new program stored in the program holding memory;
After the electronic device is started in a state where the program copied to the backup memory is set to operate, the electronic device is stored in the program holding memory after the start of the electronic device in response to a user instruction. Setting up a new program to run;
After activating the electronic device in a state where the new program stored in the program holding memory is set to operate, the electronic device executes the new program stored in the program holding memory. Operating the program.
請求項1記載のプログラムの更新方法であって、
前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、ユーザの指示に応じて、前記プログラム保持用メモリに格納されているプログラムを新たなプログラムに更新するステップを有することを特徴とするプログラムの更新方法。
The method for updating a program according to claim 1, wherein
After starting the electronic device in a state where the program copied to the backup memory is set to operate, the program stored in the program holding memory is updated to a new program in response to a user instruction. A method for updating a program, comprising the steps of:
請求項1または2記載のプログラムの更新方法であって、
前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記電子機器を起動した後に、ユーザの指示に応じて、前記バックアップ用メモリにコピーしたプログラムで、前記プログラム保持用メモリに格納されているプログラムを更新するステップを有することを特徴とするプログラムの更新方法。
A method for updating a program according to claim 1 or 2,
After starting the electronic device in a state where the program copied to the backup memory is set to operate, the program copied to the backup memory is stored in the program holding memory in response to a user instruction. Updating a program that has been executed.
請求項1、2または3記載のプログラムの更新方法であって、
前記バックアップ用メモリは過般型の記憶媒体であって、前記プログラム保持用メモリに格納されているプログラムの新たなプログラムへの更新は、前記過般型の記憶媒体に記憶されている前記新たなプログラムで前記プログラム保持用メモリに格納されているプログラムを更新することにより行われることを特徴とするプログラムの更新方法。
The method for updating a program according to claim 1, 2, or 3,
The backup memory is a general-purpose storage medium, and updating of a program stored in the program holding memory to a new program is performed by the new program stored in the general-type storage medium. A program updating method performed by updating a program stored in the program holding memory.
コンピュータによって読み取られ実行されるコンピュータプログラムであって、
当該コンピュータプログラムは前記コンピュータに、前記プログラム保持用メモリに格納されているプログラムを、前記プログラム保持用メモリ以外の不揮発性のメモリであるバックアップ用メモリにコピーするステップと、
前記バックアップ用メモリにコピーしたプログラムと前記プログラム保持用メモリに格納されているプログラムの同一性を確認するステップと、
前記同一性が確認できた場合に、前記コンピュータの起動後に、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定するステップと、
前記プログラム保持用メモリに格納されているプログラムを新たなプログラムに更新するステップと、
前記コンピュータの起動後に、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定するステップと、
前記コンピュータの起動時に、前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている場合に、前記プログラム保持用メモリに格納されているプログラムに代えて前記バックアップ用メモリにコピーしたプログラムを稼働するステップと、
前記バックアップ用メモリにコピーしたプログラムが稼働した後に、ユーザの指示に応じて、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するステップと、
前記バックアップ用メモリにコピーしたプログラムを稼働するよう設定されている状態において前記コンピュータを起動した後に、ユーザの指示に応じて、前記コンピュータの起動後に、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するよう設定するステップと、
前記プログラム保持用メモリに格納されている新たなプログラムを稼働するよう設定されている状態において前記コンピュータが起動した後に、前記プログラム保持用メモリに格納されている新たなプログラムを稼働するステップとを実行させることを特徴とするコンピュータプログラム。
A computer program read and executed by a computer,
The computer program, in the computer, a program stored in the program holding memory, a step of copying to a backup memory which is a non-volatile memory other than the program holding memory,
Confirming the identity of the program copied to the backup memory and the program stored in the program holding memory;
If the identity can be confirmed, after starting the computer, setting to run the program copied to the backup memory instead of the program stored in the program holding memory,
Updating a program stored in the program holding memory to a new program;
After starting the computer, setting to operate the program copied to the backup memory instead of the program stored in the program holding memory,
When the computer is started, if the program copied to the backup memory is set to operate, the program copied to the backup memory is operated instead of the program stored in the program holding memory. Steps and
After the program copied to the backup memory is operated, in response to a user instruction, a step of operating a new program stored in the program holding memory;
After starting the computer in a state where the program copied to the backup memory is set to operate, a new instruction stored in the program holding memory is stored after the computer is started according to a user instruction. Setting up the program to run;
Running the new program stored in the program holding memory after the computer is started in a state where the new program stored in the program holding memory is set to run. A computer program characterized by causing
JP2002269380A 2002-09-17 2002-09-17 Method for updating program Pending JP2004110220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002269380A JP2004110220A (en) 2002-09-17 2002-09-17 Method for updating program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002269380A JP2004110220A (en) 2002-09-17 2002-09-17 Method for updating program

Publications (1)

Publication Number Publication Date
JP2004110220A true JP2004110220A (en) 2004-04-08

Family

ID=32267311

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002269380A Pending JP2004110220A (en) 2002-09-17 2002-09-17 Method for updating program

Country Status (1)

Country Link
JP (1) JP2004110220A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006060345A (en) * 2004-08-18 2006-03-02 Sony Corp Signal-receiving device and method, recording medium, and program
JP2006139665A (en) * 2004-11-15 2006-06-01 Murata Mach Ltd Electronic equipment
JP2008192048A (en) * 2007-02-07 2008-08-21 Canon Inc Information processing system, information processing method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006060345A (en) * 2004-08-18 2006-03-02 Sony Corp Signal-receiving device and method, recording medium, and program
JP2006139665A (en) * 2004-11-15 2006-06-01 Murata Mach Ltd Electronic equipment
JP2008192048A (en) * 2007-02-07 2008-08-21 Canon Inc Information processing system, information processing method, and program

Similar Documents

Publication Publication Date Title
EP1899814B1 (en) Firmware update for consumer electronic device
JP5431111B2 (en) Information processing apparatus and system setting method
JP2001331327A (en) Electronic equipment
JP6482211B2 (en) Information processing apparatus, control method thereof, and program
JPH04167139A (en) Program down loading system
JPH10307726A (en) System for firmware recovery at time of start error
JP2004110220A (en) Method for updating program
JP2002189609A (en) System and method for updating software adapted to accident
JP2007087269A (en) Software update system, update method and program
JP2004192329A (en) Program rewriting method and terminal device
JP2003228490A (en) Terminal equipment connected to network, and network system using the same
JPH10187454A (en) Bios reloading system
JP2005128613A (en) Image forming device
JP6149624B2 (en) Firmware execution apparatus, firmware execution method, computer program, and computer apparatus
JP6457756B2 (en) Information processing apparatus, control method thereof, and program
JP2003259000A (en) Version update system and method for ip telephone set service function in ip-pbx
JP2003122575A (en) Information processing unit
JP2005032014A (en) Data processor, starting program for data processor, and starting method for data processor
JP2005078336A (en) Image forming apparatus and program rewriting method for image forming apparatus
JP2004355389A (en) Remote update system
JP2001053891A (en) Method and device for updating program of portable terminal equipment
JP7298352B2 (en) processor and program
JP2004038716A (en) Firmware updating method provided with automatic restoring function in occurrence of failure
JP2003330655A (en) Image forming device and method for controlling the same device and computer readable storage medium and its program
JP2009159383A (en) Communication terminal