JP2009053859A - Device and bootloading program - Google Patents
Device and bootloading program Download PDFInfo
- Publication number
- JP2009053859A JP2009053859A JP2007218809A JP2007218809A JP2009053859A JP 2009053859 A JP2009053859 A JP 2009053859A JP 2007218809 A JP2007218809 A JP 2007218809A JP 2007218809 A JP2007218809 A JP 2007218809A JP 2009053859 A JP2009053859 A JP 2009053859A
- Authority
- JP
- Japan
- Prior art keywords
- program
- download
- application program
- stored
- storage area
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、装置およびブートロード用プログラムに関する。 The present invention relates to an apparatus and a bootload program.
従来より、原稿を読み取って画像データを取得する原稿読取部と、その原稿読取部で取得した画像データを入力して画像処理する画像処理部と、その画像処理部で画像処理された画像データに基づいた画像を用紙に記録するプリンタ部とを備えた画像制御装置が知られている。このような画像制御装置には、その画像制御装置を制御する制御プログラムが格納されている。ここで、画像制御装置の機能を高める等の理由により、制御プログラムを更新(バージョンアップ)するということが行なわれている。
Conventionally, a document reading unit that reads a document and acquires image data, an image processing unit that inputs image data acquired by the document reading unit and performs image processing, and image data image-processed by the
例えば、特許文献1には、プリンタ装置の制御プログラムを更新するにあたり、ホストコンピュータから通信手段を用いて制御プログラムをダウンロードしてRAM上に展開し、展開した制御プログラムをフラッシュメモリに書き込む技術が提案されている。
ここで、制御プログラム等のアプリケーションプログラムをダウンロードしている途中で、何らかの理由(例えば接続ケーブルが抜けたり、電源が切断された場合等)でダウンロードに失敗すると、そのダウンロード終了後に電源が投入された時点で装置が立ち上がらない場合が発生する。オペレータは、装置が立ち上がらないことから初めてダウンロードの失敗を認識し、オペレータが再度ダウンロードを実行しなければならないという問題がある。従って、ダウンロードに手間がかかるという問題がある。 Here, if downloading fails for some reason (for example, the connection cable is disconnected or the power is cut off) while downloading an application program such as a control program, the power is turned on after the downloading is completed. There is a case where the device does not start up at the time. There is a problem that the operator recognizes the download failure for the first time because the apparatus does not start up, and the operator must execute the download again. Therefore, there is a problem that it takes time to download.
本発明は、上記事情に鑑み、ダウンロードの手間が軽減された装置およびブートロード用プログラムを提供することを目的とする。 In view of the circumstances described above, an object of the present invention is to provide an apparatus and a bootload program that can reduce the download effort.
上記目的を達成する本発明の装置は、
アプリケーションプログラムを第1の記憶領域に記憶するとともにその第1の記憶領域へのアプリケーションプログラムの格納のためのダウンロード用プログラムを含むブートロード用プログラムを第2の記憶領域に記憶するソフトウェア記憶部と、
上記ソフトウェア記憶部に記憶されているブートロード用プログラムおよびアプリケーションプログラムを実行するソフトウェア実行部と、
上記ソフトウェア実行部における、上記ソフトウェア記憶部に記憶されているダウンロード用プログラムの実行により、アプリケーションプログラムを外部から入力して上記第1の記憶領域に記憶させるアプリケーション格納部と、
上記ソフトウェア実行部における、上記第1の記憶領域に記憶されているアプリケーションプログラムの実行により制御を受ける被制御部とを備え、
上記ダウンロード用プログラムが、上記ソフトウェア実行部におけるそのダウンロード用プログラムの実行により、上記アプリケーション格納部に、上記第1の記憶領域に記憶されるアプリケーションプログラムにユニークなチェックコードをその第1の記憶領域の先頭と末尾との双方に格納させるとともに、その先頭とその末尾の2つのチェックコードに挟まれた領域にアプリケーションプログラムを記憶させるものであることを特徴とする。
The apparatus of the present invention for achieving the above object
A software storage unit that stores an application program in the first storage area and stores a bootload program including a download program for storing the application program in the first storage area in the second storage area;
A software execution unit for executing the boot load program and the application program stored in the software storage unit;
In the software execution unit, by executing the download program stored in the software storage unit, an application storage unit that inputs an application program from the outside and stores it in the first storage area;
A controlled unit that receives control by executing the application program stored in the first storage area in the software execution unit,
When the download program is executed in the software execution unit, a check code unique to the application program stored in the first storage area is stored in the application storage unit in the first storage area. The application program is stored in both the head and the tail, and the application program is stored in an area sandwiched between the two check codes at the head and the tail.
ここで、上記ダウンロード用プログラムは、上記ソフトウェア実行部におけるそのダウンロード用プログラムの実行により、上記アプリケーション格納部に、上記第1の記憶領域に記憶されているアプリケーションプログラムのプログラムコードと同一のプログラムコードのアプリケーションプログラムを再格納させる場合においても、上記第1の記憶領域の先頭と末尾に、今回の格納についてユニークなチェックコードを格納させるものであることが好ましい。 Here, the download program has the same program code as the program code of the application program stored in the first storage area in the application storage unit by execution of the download program in the software execution unit. Even when the application program is re-stored, it is preferable to store a unique check code for the current storage at the beginning and end of the first storage area.
また、上記ブートロード用プログラムが、上記ソフトウェア実行部におけるそのブートロード用プログラムの実行により、上記第1の記憶領域の先頭と末尾の2つのチェックコードを比較し、互いに対応する場合にその第1の記憶領域に記憶されているアプリケーションプログラムを起動し、不対応の場合に、上記ダウンロード用プログラムを起動してそのダウンロード用プログラムを上記ソフトウェア実行部に実行させるものであることも好ましい態様である。 If the boot load program compares the two check codes at the beginning and end of the first storage area by executing the boot load program in the software execution unit and corresponds to each other, the first It is also a preferred aspect that the application program stored in the storage area is started and the download program is started and the software execution unit is executed when the download program is not supported.
さらに、上記被制御部が、画像データの流れを制御するものであることも好ましい。 Furthermore, it is also preferable that the controlled unit controls the flow of image data.
また、上記目的を達成する本発明のブートロード用プログラムは、
アプリケーションプログラムを第1の記憶領域に記憶するとともにその第1の記憶領域へのアプリケーションプログラムの格納のためのダウンロード用プログラムを含むブートロード用プログラムを第2の記憶領域に記憶するソフトウェア記憶部と、
上記ソフトウェア記憶部に記憶されているブートロード用プログラムおよびアプリケーションプログラムを実行するソフトウェア実行部と、
上記ソフトウェア実行部における、上記ソフトウェア記憶部に記憶されているダウンロード用プログラムの実行により、アプリケーションプログラムを外部から入力して上記第1の記憶領域に記憶させるアプリケーション格納部と、
上記ソフトウェア実行部における、上記第1の記憶領域に記憶されているアプリケーションプログラムの実行により制御を受ける被制御部とを備えた装置の、上記第2の記憶領域に記憶されるブートロード用プログラムであって、
上記ソフトウェア実行部における、上記ダウンロード用プログラムの実行により、上記アプリケーション格納部に、上記第1の記憶領域に記憶されるアプリケーションプログラムにユニークなチェックコードをその第1の記憶領域の先頭と末尾との双方に格納させるとともに、その先頭とその末尾の2つのチェックコードに挟まれた領域にアプリケーションプログラムを記憶させるものであることを特徴とする。
In addition, the bootload program of the present invention that achieves the above object is as follows.
A software storage unit that stores an application program in the first storage area and stores a bootload program including a download program for storing the application program in the first storage area in the second storage area;
A software execution unit for executing the boot load program and the application program stored in the software storage unit;
In the software execution unit, by executing the download program stored in the software storage unit, an application storage unit that inputs an application program from the outside and stores it in the first storage area;
A bootload program stored in the second storage area of a device including a controlled unit that is controlled by executing an application program stored in the first storage area in the software execution unit. There,
By executing the download program in the software execution unit, a check code unique to the application program stored in the first storage area is added to the application storage unit between the top and the end of the first storage area. The application program is stored in the both, and the application program is stored in an area sandwiched between two check codes at the head and the tail.
ここで、上記ソフトウェア実行部における上記ダウンロード用プログラムの実行により、上記アプリケーション格納部に、上記第1の記憶領域に記憶されているアプリケーションプログラムのプログラムコードと同一のプログラムコードのアプリケーションプログラムを再格納させる場合においても、上記第1の記憶領域の先頭と末尾に、今回の格納についてユニークなチェックコードを格納させるものであることが好ましい。 Here, execution of the download program in the software execution unit causes the application storage unit to re-store an application program having the same program code as the program code of the application program stored in the first storage area. Even in this case, it is preferable to store a unique check code for the current storage at the beginning and end of the first storage area.
また、上記ソフトウェア実行部における上記ブートロード用プログラムの実行により、上記第1の記憶領域の先頭と末尾の2つのチェックコードを比較し、互いに対応する場合にその第1の記憶領域に記憶されているアプリケーションプログラムを起動し、不対応の場合に、上記ダウンロード用プログラムを起動してそのダウンロード用プログラムを上記ソフトウェア実行部に実行させるものであることも好ましい態様である。 In addition, when the boot execution program is executed in the software execution unit, the two check codes at the beginning and end of the first storage area are compared, and if they correspond to each other, they are stored in the first storage area. It is also a preferred aspect that when the application program is started and the download program is started, the download program is started and the software execution unit is executed.
請求項1記載の装置によれば、ブートロード用プログラムに含まれるダウンロード用プログラムの実行により、アプリケーションプログラムが記憶される第1の記憶領域の先頭と末尾との双方に、そのアプリケーションプログラムにユニークなチェックコードが格納される。このため、ダウンロード終了後に電源が投入された時点でそれらのチェックコードの値を比較し、それらのチェックコードの値が互いに対応していなければダウンロードに失敗したと判定して、ブートロード用プログラムに含まれるダウンロード用プログラムを起動して再度アプリケーションプログラムのダウンロードを行なうことができる。このようにすることにより、オペレータのダウンロードの手間を軽減することができる。 According to the apparatus of the first aspect, by executing the download program included in the boot load program, the application program is unique both at the beginning and the end of the first storage area in which the application program is stored. Stores the check code. Therefore, when the power is turned on after the download is completed, the check code values are compared, and if the check code values do not correspond to each other, it is determined that the download has failed, and the bootload program is set. The application program can be downloaded again by starting the included download program. By doing in this way, the trouble of an operator's download can be reduced.
請求項2記載の装置によれば、アプリケーションプログラムのプログラムコードと同一のプログラムコードのアプリケーションプログラムのダウンロード時にエラーが発生した場合であっても、自動的に再度同一のプログラムコードのアプリケーションプログラムのダウンロードを行なうことができる。
According to the apparatus of
請求項3記載の装置によれば、ダウンロードが成功した場合はアプリケーションプログラムを起動し、ダウンロードが失敗した場合は再度アプリケーションプログラムのダウンロードを行なうことができる。 According to the third aspect of the present invention, the application program can be activated when the download is successful, and the application program can be downloaded again when the download fails.
請求項4記載の装置によれば、スキャナやプリンタを備えた画像制御装置を好適に実現することができる。 According to the apparatus of the fourth aspect, it is possible to preferably realize an image control apparatus including a scanner and a printer.
請求項5記載のブートロード用プログラムによれば、請求項1記載の装置に記憶されるブートロード用プログラムと同じ機能により、オペレータのダウンロードの手間を軽減することができる。
According to the boot load program described in claim 5, it is possible to reduce the trouble of downloading the operator by the same function as the boot load program stored in the apparatus described in
請求項6記載のブートロード用プログラムによれば、請求項2記載の装置に記憶するブートロード用プログラムと同じ機能により、自動的に再度同一のプログラムコードのアプリケーションプログラムのダウンロードを行なうことができる。
According to the boot load program described in claim 6, the application program having the same program code can be automatically downloaded again by the same function as the boot load program stored in the apparatus described in
請求項7記載のブートロード用プログラムによれば、ダウンロードが成功した場合はアプリケーションプログラムを起動し、ダウンロードが失敗した場合は再度アプリケーションプログラムのダウンロードを行なうことができる。
According to the boot load program of
以下、本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described.
図1は、本発明の装置の一実施形態である画像制御装置の概略構成図、図2は、図1に示すフラッシュROM上での各プログラムの配置を示す図である。 FIG. 1 is a schematic configuration diagram of an image control apparatus which is an embodiment of the apparatus of the present invention, and FIG. 2 is a diagram showing the arrangement of each program on the flash ROM shown in FIG.
図1に示す画像制御装置10には、本発明にいうソフトウェア記憶部の一例であるフラッシュROM11が備えられている。このフラッシュROM11は、図2に示すように、アプリケーションプログラム領域11_1(本発明にいう第1の記憶領域に相当)と、ブートロード用プログラム領域11_2(本発明にいう第2の記憶領域に相当)を有する。
The
アプリケーションプログラム領域11_1には、アプリケーションプログラムが格納される。このアプリケーションプログラムには、そのアプリケーションプログラムをダウンロードするためのダウンロード用プログラムが含まれている。また、アプリケーションプログラム領域11_1の先頭11_1a(フラッシュROM11の先頭)には、そのアプリケーションプログラムにユニークに付されたチェックコードが格納される。さらに、アプリケーションプログラム領域11_1の末尾11_1bにも、詳細は後述するが、アプリケーションプログラムのダウンロードが正常に終了した場合には、先頭のチェックコードと同じ値のチェックコードが格納される。また、アプリケーションプログラムは、アプリケーションプログラム領域11_1の、先頭11_1aと末尾11_1bの2つのチェックコードに挟まれた領域部分に格納される。 Application programs are stored in the application program area 11_1. This application program includes a download program for downloading the application program. In addition, a check code uniquely assigned to the application program is stored in the head 11_1a (head of the flash ROM 11) of the application program area 11_1. Further, as will be described in detail later, the end 11_1b of the application program area 11_1 stores a check code having the same value as the top check code when the application program download is normally completed. Further, the application program is stored in an area portion sandwiched between two check codes of the head 11_1a and the tail 11_1b of the application program area 11_1.
一方、ブートロード用プログラム領域11_2には、本発明のブートロード用プログラムの一例であるブートロード用プログラムが格納される。このブートロード用プログラムには、アプリケーションプログラム領域11_1へのアプリケーションプログラムの格納のためのダウンロード用プログラムが含まれている。再び図1に戻って説明を続ける。 On the other hand, the boot load program area 11_2 stores a boot load program which is an example of the boot load program of the present invention. The boot load program includes a download program for storing the application program in the application program area 11_1. Returning to FIG. 1 again, the description will be continued.
図1に示す画像制御装置10には、CPU12(本発明にいうソフトウェア実行部に相当)と、USB(Universal Serial Bus)デバイス13が備えられている。
The
CPU12は、フラッシュROM11に記憶されているブートロード用プログラムやアプリケーションプログラムを実行する。また、USBデバイス13は、CPU12における、詳細は後述するが、フラッシュROM11に記憶されているダウンロード用プログラムの実行により、アプリケーションプログラムを外部のパーソナルコンピュータ(PCと略記する)100から入力してアプリケーションプログラム領域11_1に記憶させる。
The
また、画像制御装置10には、CPU12における、アプリケーションプログラム領域11_1に記憶されているアプリケーションプログラムの実行により制御を受けるスキャナ14およびプリンタ15(本発明にいう被制御部に相当)が備えられている。
In addition, the
さらに、画像制御装置10には、作業領域として使用されるSDRAM16(本発明にいうアプリケーション格納部に相当)が備えられている。
Further, the
ここで、図2に示すブートロード用プログラムに含まれるダウンロード用プログラムは、CPU12におけるそのダウンロード用プログラムの実行により、SDRAM16に、アプリケーションプログラム領域11_1の先頭11_1aと末尾11_1bとの双方について互いに同一であって、かつアプリケーションプログラム領域11_1に記憶されるアプリケーションプログラムにユニークに付されたチェックコードを先頭11_1aと末尾11_1bとの双方に格納させるとともに、先頭11_1aと末尾11_1bの2つのチェックコードに挟まれた領域にアプリケーションプログラムを記憶させるものである。
Here, the download program included in the boot load program shown in FIG. 2 is identical to each other for both the head 11_1a and the tail 11_1b of the application program area 11_1 in the
また、このダウンロード用プログラムは、CPU12におけるこのダウンロード用プログラムの実行により、SDRAM16に、アプリケーションプログラム領域11_1に記憶されているアプリケーションプログラムのプログラムコードと同一のプログラムコードのアプリケーションプログラムを再格納させる場合においても、アプリケーションプログラム領域11_1の先頭11_1aと末尾11_1bに、今回の格納についてユニークなチェックコードを格納させるものである。
In addition, the download program is executed even when the
ブートロード用プログラムは、CPU12におけるこのブートロード用プログラムの実行により、アプリケーションプログラム領域11_1の先頭11_1aと末尾11_1bの2つのチェックコードを比較し、一致する場合にアプリケーションプログラム領域11_1に記憶されているアプリケーションプログラムを起動し、不一致の場合に、ダウンロード用プログラムを起動してこのダウンロード用プログラムをCPU12に実行させるものである。
The boot load program compares the two check codes of the beginning 11_1a and the end 11_1b of the application program area 11_1 by executing this boot loading program in the
スキャナ14およびプリンタ15は、画像データの流れを制御するものである。具体的には、スキャナ14は、このスキャナ14の上に載せられた原稿送込ユニットから送り込まれた原稿の画像をスキャンすることで、その原稿の画像を表わす画像データを得たり、あるいはスキャナ14の上部に嵌め込まれたプラテンガラスに載せられた原稿の画像の読取りを行なって画像データを得たりする。また、プリンタ15は、スキャナ14で得られた画像データに基づいた画像を用紙上に記録する。
The
図3は、各プログラムの関連を示す図である。 FIG. 3 is a diagram showing the relationship between the programs.
ブートロード用プログラムは、フラッシュROM11のアプリケーションプログラム領域11_1の先頭11_1aと末尾11_1bの2つのチェックコードを比較する。比較した結果、一致する場合(OKの場合)は、アプリケーションプログラムが起動される。その後、外部のPC100からのダウンロードの指示を受け、アプリケーションプログラムに含まれるダウンロード用プログラムが起動し、USBデバイス13を介して外部のPC100との通信を行なってダウンロードデータ(アプリケーションプログラムデータ)を受信して、フラッシュROM11のアプリケーションプログラム領域11_1に書き込む。
The boot load program compares the two check codes of the head 11_1a and the tail 11_1b of the application program area 11_1 of the
一方、フラッシュROM11のアプリケーションプログラム領域11_1の先頭11_1aと末尾11_1bの2つのチェックコードを比較した結果、不一致の場合は、ブートロード用プログラムに含まれるダウンロード用プログラムが起動し、USBデバイス13を介して外部のPC100との通信を行なってダウンロードデータ(アプリケーションプログラムデータ)を受信して、フラッシュROM11のアプリケーションプログラム領域11_1に書き込む。
On the other hand, as a result of comparing the two check codes of the head 11_1a and the tail 11_1b of the application program area 11_1 of the
図4は、ブートロード用プログラムの処理フローを示す図である。 FIG. 4 is a diagram showing a processing flow of the bootload program.
図1に示す画像制御装置10の電源がオンすると、ブートロード用プログラムの処理が開始される。先ず、ステップS1において、各種レジスタの初期化(最低限必要なもののみ初期化)を行なう。次に、ステップS2において、外部デバイスや電源の初期化を行なう。さらに、ステップS3において、フラッシュROM11から、先頭と末尾のチェックコードを読み出してステップS4に進む。
When the power of the
ステップS4では、先頭と末尾のチェックコードが同じであるか否かが判定される。先頭と末尾のチェックコードが同じであると判定された場合は、ステップS5に進む。ステップS5では、アプリケーションプログラムコードをSDRAM16に展開する。さらに、ステップS6に進み、アプリケーションプログラムの実行を開始する。一方、先頭と末尾のチェックコードが異なると判定された場合は、ステップS7に進む。ステップS7では、ダウンロード用プログラムコードをSDRAM16に展開する。さらに、ステップS8に進み、ダウンロード用プログラムの実行を開始する。
In step S4, it is determined whether the head and tail check codes are the same. If it is determined that the head and tail check codes are the same, the process proceeds to step S5. In step S5, the application program code is expanded in the
図5は、ブートロード用プログラムに含まれるダウンロード用プログラムの機能を示す図である。 FIG. 5 is a diagram illustrating functions of a download program included in the boot load program.
ブートロード用プログラムが起動すると、このダウンロード用プログラムの実行が開始される。先ず、ステップS11において、USB通信機能を実行する。このUSB通信機能は、USBデバイス13の初期化と、PC100とのパワーオンシーケンス(コンフィギュレーション/アドレス調停等)を行ない、その後、PC100からのダウンロードの指示を受けて、フラッシュROM11へ書き込むためのダウンロードデータを受信する。
When the boot load program is started, execution of the download program is started. First, in step S11, the USB communication function is executed. This USB communication function initializes the
次に、ステップS12において、チェックコード生成機能を実行する。このチェックコード生成機能は、PC100からUSBデバイス13経由で受信したダウンロードデータに含まれるチェックコードと、フラッシュROM11に現在書き込まれているチェックコードとを比較し、適切なデータを生成してダウンロードデータに付加する。
Next, in step S12, a check code generation function is executed. This check code generation function compares the check code included in the download data received from the
さらに、ステップS13において、フラッシュROM書き込み機能を実行する。このフラッシュROM書き込み機能は、チェックコードが付加されたダウンロードデータをフラッシュROM11に書き込む。書き込みの順序は以下の通りである。
1)フラッシュROM11の先頭にチェックコードを書き込む。
2)続く領域にアプリケーションプログラムのコードを書き込む。
3)アプリケーションプログラム領域の末尾にチェックコードを書き込む。
In step S13, a flash ROM writing function is executed. This flash ROM writing function writes the download data with the check code added to the
1) Write a check code at the top of the
2) Write the application program code in the following area.
3) Write a check code at the end of the application program area.
図6は、アプリケーションプログラムに含まれるダウンロード用プログラムの機能を示す図である。 FIG. 6 is a diagram showing functions of a download program included in the application program.
このダウンロード用プログラムでは、PC100との通信はアプリケーションプログラムが行なうため、このダウンロード用プログラムには、図5を参照して説明したUSB通信機能は含まれていない。
In this download program, communication with the
アプリケーションプログラムが起動してPC100との通信がUSBデバイス13を経由して行なわれる。その後、PC100からのダウンロードの指示を受けて、ダウンロード用プログラムの実行が開始され、ダウンロードデータが受信される。
The application program is activated and communication with the
先ず、ステップS21において、チェックコード生成機能を実行する。このチェックコード生成機能は、受信したダウンロードデータに含まれるチェックコードと、フラッシュROM11に現在書き込まれているチェックコードとを比較し、適切なデータを生成してダウンロードデータに付加する。
First, in step S21, a check code generation function is executed. The check code generation function compares the check code included in the received download data with the check code currently written in the
次に、ステップS22において、フラッシュROM書き込み機能を実行する。このフラッシュROM書き込み機能は、チェックコードが付加されたダウンロードデータをフラッシュROM11に書き込む。尚、書き込みの順序は、図5で説明した書き込みの順序と同じであるため、説明は省略する。
Next, in step S22, a flash ROM writing function is executed. This flash ROM writing function writes the download data with the check code added to the
図7は、チェックコードの形式を示す図である。 FIG. 7 is a diagram illustrating a check code format.
チェックコードの形式は、それぞれが8ビットで表わされる、メジャーバージョン,マイナバージョン,リビジョン,D/L(ダウンロード)カウントにより規定される。 The format of the check code is defined by a major version, a minor version, a revision, and a D / L (download) count, each represented by 8 bits.
メジャーバージョンの領域には、アプリケーションプログラムの大きな変更を示す値が格納される。また、マイナバージョンの領域には、アプリケーションプログラムの小さな変更を示す値が格納される。さらに、リビジョンの領域には、アプリケーションプログラムのさらに小さな変更を示す値が格納される。また、D/L(ダウンロード)カウントの領域には、同じバージョンのアプリケーションプログラムをダウンロードした際にカウントアップした値が格納され、別のバージョンのアプリケーションプログラムをダウンロードすると0の値が格納される。これにより、同じバージョンのアプリケーションプログラムをダウンロードしてエラーが発生した場合であっても、D/Lカウントの領域には、カウントアップした値が格納されないため、次に電源が投入された時点でエラーが発生したと判定することができる。 In the major version area, a value indicating a large change in the application program is stored. In the minor version area, a value indicating a small change in the application program is stored. Further, a value indicating a smaller change of the application program is stored in the revision area. The D / L (download) count area stores a value counted up when the same version of the application program is downloaded, and stores a value of 0 when another version of the application program is downloaded. As a result, even if an error occurs when the application program of the same version is downloaded, the counted up value is not stored in the D / L count area, so the error will occur when the power is turned on next time. Can be determined to have occurred.
図8は、フラッシュROM上におけるチェックコードの配置を示す図である。 FIG. 8 is a diagram showing the arrangement of check codes on the flash ROM.
図8に示すように、フラッシュROM11が有するアプリケーションプログラム領域11_1の0ページの先頭11_1aと、そのアプリケーションプログラム領域11_1の最終ページの末尾11_1bに、それぞれ、チェックコードが配置されている。
As shown in FIG. 8, check codes are arranged at the beginning 11_1a of page 0 of the application program area 11_1 of the
ここで、前述したチェックコード生成機能におけるチェックコード生成処理は、以下のようである。
1)フラッシュROM11の先頭ページを読み取り、現在のチェックコードを抽出する。
2)上位モジュール(PC100)から受け取ったデータの先頭から、新チェックコードを取り出す。
3)現在のチェックコードと新チェックコードの先頭の3バイト(図7に示すメジャーバージョン,マイナバージョン,リビジョン)を比較する。同じであった場合は、書き込むチェックコードは、現在のチェックコードのD/Lカウントを+1した値にする。異なっていた場合は、書き込むチェックコードは、新チェックコード(D/Lカウント=0)にする。
Here, the check code generation process in the check code generation function described above is as follows.
1) Read the first page of the
2) A new check code is extracted from the top of the data received from the upper module (PC 100).
3) Compare the first three bytes (major version, minor version, revision shown in FIG. 7) of the current check code and the new check code. If they are the same, the check code to be written is a value obtained by adding 1 to the D / L count of the current check code. If they are different, the check code to be written is the new check code (D / L count = 0).
図9は、図1に示す画像制御装置におけるソフトウェア全体の動作フローを示す図である。 FIG. 9 is a diagram showing an operation flow of the entire software in the image control apparatus shown in FIG.
電源がオンされると、フラッシュROM11上のブートロード用プログラムが起動する。先ず、ステップS31において、フラッシュROM11の先頭と末尾のチェックコードを読み出す。次に、ステップS32において、先頭と末尾のチェックコードが同じであるか否かが判定される。先頭と末尾のチェックコードが同じであると判定された場合は、ステップS33に進む。ステップS33では、アプリケーションプログラムを起動する。一方、先頭と末尾のチェックコードが異なっていると判定された場合は、ステップS34に進む。ステップS34では、ダウンロード用プログラムコードをSDRAM16に展開し実行を開始する。
When the power is turned on, the boot load program on the
次に、ステップS35において、PC100との通信を確立する。さらに、ステップS36において、USBデバイス13を経由してダウンロードデータを受信する。次いで、ステップS37において、現在のバージョンとダウンロードデータのバージョンを比較してステップS38に進む。
Next, in step S35, communication with the
ステップS38では、現在のバージョンとダウンロードデータのバージョンが同じであるか否かが判定される。現在のバージョンとダウンロードデータのバージョンが異なっていると判定された場合は、ステップS39に進む。ステップS39では、書き込むチェックコードを、新バージョン番号(D/Lカウント=0)にしてステップS41に進む。一方、現在のバージョンとダウンロードデータのバージョンが同じであると判定された場合はステップS40に進む。ステップS40では、書き込むチェックコードを、同じバージョン番号(D/Lカウント=現在の値+1)にしてステップS41に進む。 In step S38, it is determined whether or not the current version and the download data version are the same. If it is determined that the current version is different from the version of the download data, the process proceeds to step S39. In step S39, the check code to be written is set to the new version number (D / L count = 0), and the process proceeds to step S41. On the other hand, if it is determined that the current version and the version of the download data are the same, the process proceeds to step S40. In step S40, the check code to be written is set to the same version number (D / L count = current value + 1), and the process proceeds to step S41.
ステップS41では、フラッシュROM11への書き込みを行なう。詳細には、フラッシュROM11の先頭にチェックコードを書き込む。また、フラッシュROM11にアプリケーションプログラムコードを書き込む。さらに、フラッシュROM11の末尾にチェックコードを書き込む。その後、このフローを終了する。
In step S41, writing to the
図10は、ブートロード用プログラムの起動時にフラッシュROMの先頭と末尾のチェックコードが同じであった場合の処理を示す図である。 FIG. 10 is a diagram showing processing when the check code at the head and the tail of the flash ROM are the same when the boot load program is started.
図10に示すように、ブートロード用プログラムの起動時にフラッシュROM11の先頭と末尾のチェックコードがともに同じ値aであった場合は、アプリケーションプログラムが起動され、その後、PC100からのダウンロードの指示を受けて、ダウンロードが開始される。先ず、ステップS51において、現在のバージョンとダウンロードデータのバージョンが同じであるか否かが判定される。現在のバージョンとダウンロードデータのバージョンが異なっていると判定された場合はステップS52に進む。ステップS52で、ダウンロードが成功した場合は、フラッシュROM11の先頭と末尾のチェックコードがともに同じ値bとなる。一方、接続ケーブルが抜けたり、電源が切断された場合でダウンロードが失敗した場合は、フラッシュROM11の先頭のチェックコードが値bとなり、末尾のチェックコードは値aとなる。
As shown in FIG. 10, if the check code at the beginning and the end of the
また、ステップS51において、現在のバージョンとダウンロードデータのバージョンが同じであると判定された場合はステップS53に進む。ステップS53では、先頭のチェックコードに+1して、新しいチェックコードを生成する。次に、ステップS54において、ダウンロードが成功した場合は、フラッシュROM11の先頭と末尾のチェックコードがともに同じ値cとなる。一方、接続ケーブルが抜けたり、電源が切断された場合でダウンロードが失敗した場合は、フラッシュROM11の先頭のチェックコードが値cとなり、末尾のチェックコードは値aとなる。
If it is determined in step S51 that the current version is the same as the download data version, the process proceeds to step S53. In step S53, a new check code is generated by adding +1 to the first check code. Next, if the download is successful in step S54, the check code at the beginning and the end of the
図11は、ブートロード用プログラムの起動時にフラッシュROMの先頭と末尾のチェックコードが異なっていた場合の処理を示す図である。 FIG. 11 is a diagram showing processing when the check code at the beginning and end of the flash ROM are different when the boot load program is started.
図11に示すように、ブートロード用プログラムの起動時にフラッシュROM11の先頭と末尾のチェックコードがそれぞれ値a,値bであった場合は、ブートロード用プログラムでダウンロードが開始される。先ず、ステップS61において、現在のバージョンとダウンロードデータのバージョンが同じであるか否かが判定される。現在のバージョンとダウンロードデータのバージョンが異なっていると判定された場合はステップS62に進む。ステップS62で、ダウンロードが成功した場合は、フラッシュROM11の先頭と末尾のチェックコードがともに同じ値cとなる。一方、接続ケーブルが抜けたり、電源が切断された場合でダウンロードが失敗した場合は、フラッシュROM11の先頭のチェックコードが値cとなり、末尾のチェックコードは値bとなる。
As shown in FIG. 11, if the check code at the beginning and the end of the
また、ステップS61において、現在のバージョンとダウンロードデータのバージョンが同じであると判定された場合はステップS63に進む。ステップS63では、先頭のチェックコードに+1して、新しいチェックコードを生成する。次に、ステップS64において、ダウンロードが成功した場合は、フラッシュROM11の先頭と末尾のチェックコードがともに同じ値dとなる。一方、接続ケーブルが抜けたり、電源が切断された場合でダウンロードが失敗した場合は、フラッシュROM11の先頭のチェックコードが値dとなり、末尾のチェックコードは値bとなる。
If it is determined in step S61 that the current version is the same as the download data version, the process proceeds to step S63. In step S63, a new check code is generated by adding +1 to the first check code. Next, in step S64, if the download is successful, the check code at the beginning and the end of the
尚、ここでは、アプリケーションプログラム領域の先頭と末尾に同一のチェックコードを格納する例について説明したが、例えば先頭に格納するチェックコードには先頭のチェックコードであることを表わすコードが付加され、末尾に格納するチェックコードには末尾のチェックコードであることを表わすコードが付加されているなど、互いに対応しており、互いに対応しているか否かを判定するものであれば、異なるチェックコードを先頭と末尾に格納してもよい。 Here, an example in which the same check code is stored at the beginning and end of the application program area has been described, but for example, a code indicating that it is the first check code is added to the check code stored at the beginning, and the end If the check code stored in is compatible with each other, such as a code indicating that it is the last check code, and if it is determined whether or not they correspond to each other, a different check code is placed at the top And may be stored at the end.
10 画像制御装置
11 フラッシュROM
11_1 アプリケーションプログラム領域
11_1a アプリケーションプログラム領域の先頭
11_1b アプリケーションプログラム領域の末尾
11_2 ブートロード用プログラム領域
12 CPU
13 USBデバイス
14 スキャナ
15 プリンタ
16 SDRAM
100 PC
10
11_1 Application program area 11_1a Top of application program area 11_1b End of application program area 11_2 Program area for
13
100 PC
Claims (7)
前記ソフトウェア記憶部に記憶されているブートロード用プログラムおよびアプリケーションプログラムを実行するソフトウェア実行部と、
前記ソフトウェア実行部における、前記ソフトウェア記憶部に記憶されているダウンロード用プログラムの実行により、アプリケーションプログラムを外部から入力して前記第1の記憶領域に記憶させるアプリケーション格納部と、
前記ソフトウェア実行部における、前記第1の記憶領域に記憶されているアプリケーションプログラムの実行により制御を受ける被制御部とを備え、
前記ダウンロード用プログラムが、前記ソフトウェア実行部における該ダウンロード用プログラムの実行により、前記アプリケーション格納部に、前記第1の記憶領域に記憶されるアプリケーションプログラムにユニークなチェックコードを該第1の記憶領域の先頭と末尾との双方に格納させるとともに、該先頭と該末尾の2つのチェックコードに挟まれた領域にアプリケーションプログラムを記憶させるものであることを特徴とする装置。 A software storage unit that stores an application program in the first storage area and a boot load program including a download program for storing the application program in the first storage area;
A software execution unit for executing a boot load program and an application program stored in the software storage unit;
In the software execution unit, by executing a download program stored in the software storage unit, an application storage unit that inputs an application program from the outside and stores it in the first storage area;
A controlled unit that receives control by executing an application program stored in the first storage area in the software execution unit;
When the download program executes the download program in the software execution unit, a check code unique to the application program stored in the first storage area is stored in the application storage unit in the first storage area. An apparatus characterized in that an application program is stored in both a head and a tail, and an application program is stored in an area sandwiched between the two check codes at the head and the tail.
前記ソフトウェア記憶部に記憶されているブートロード用プログラムおよびアプリケーションプログラムを実行するソフトウェア実行部と、
前記ソフトウェア実行部における、前記ソフトウェア記憶部に記憶されているダウンロード用プログラムの実行により、アプリケーションプログラムを外部から入力して前記第1の記憶領域に記憶させるアプリケーション格納部と、
前記ソフトウェア実行部における、前記第1の記憶領域に記憶されているアプリケーションプログラムの実行により制御を受ける被制御部とを備えた装置の、前記第2の記憶領域に記憶されるブートロード用プログラムであって、
前記ソフトウェア実行部における、前記ダウンロード用プログラムの実行により、前記アプリケーション格納部に、前記第1の記憶領域に記憶されるアプリケーションプログラムにユニークなチェックコードを該第1の記憶領域の先頭と末尾との双方に格納させるとともに、該先頭と該末尾の2つのチェックコードに挟まれた領域にアプリケーションプログラムを記憶させるものであることを特徴とするブートロード用プログラム。 A software storage unit that stores an application program in the first storage area and a boot load program including a download program for storing the application program in the first storage area;
A software execution unit for executing a boot load program and an application program stored in the software storage unit;
In the software execution unit, by executing a download program stored in the software storage unit, an application storage unit that inputs an application program from the outside and stores it in the first storage area;
A bootload program stored in the second storage area of an apparatus comprising: a controlled section that is controlled by executing an application program stored in the first storage area in the software execution section; There,
By executing the download program in the software execution unit, a check code unique to the application program stored in the first storage area is added to the application storage unit between the beginning and end of the first storage area. A bootload program characterized by storing an application program in an area sandwiched between the two check codes at the head and the tail while being stored in both.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007218809A JP2009053859A (en) | 2007-08-24 | 2007-08-24 | Device and bootloading program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007218809A JP2009053859A (en) | 2007-08-24 | 2007-08-24 | Device and bootloading program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009053859A true JP2009053859A (en) | 2009-03-12 |
Family
ID=40504904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007218809A Pending JP2009053859A (en) | 2007-08-24 | 2007-08-24 | Device and bootloading program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009053859A (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1011296A (en) * | 1996-06-26 | 1998-01-16 | Matsushita Graphic Commun Syst Inc | Communication controller |
JPH1115672A (en) * | 1997-06-23 | 1999-01-22 | Brother Ind Ltd | Data storage state judgement method/device |
JPH11259284A (en) * | 1998-03-12 | 1999-09-24 | Fujitsu Ltd | On-line program updating system and computer readable storage medium for recording program for updating program |
JPH11265282A (en) * | 1998-03-17 | 1999-09-28 | Toshiba Corp | Controller for automatic vending machine |
JP2001147814A (en) * | 1999-11-18 | 2001-05-29 | Seiko Epson Corp | Start processing updating device |
JP2001256057A (en) * | 2000-03-14 | 2001-09-21 | Fuji Xerox Co Ltd | Update method of control program for service device and service device |
JP2002175194A (en) * | 2000-12-07 | 2002-06-21 | Ricoh Co Ltd | Program downloading system, program downloading device, image forming device, program downloading method, and computer-readable recording medium with program for executing the method recorded thereon |
JP2002176582A (en) * | 2000-12-06 | 2002-06-21 | Fuji Photo Film Co Ltd | Electronic apparatus |
JP2003263323A (en) * | 2002-03-07 | 2003-09-19 | Fuji Xerox Co Ltd | Downloader and download method |
JP2004086308A (en) * | 2002-08-23 | 2004-03-18 | Canon Inc | Image forming device, data input control method, program, and storage medium |
JP2005063120A (en) * | 2003-08-11 | 2005-03-10 | Ricoh Co Ltd | Program rewriting device |
JP2006331148A (en) * | 2005-05-27 | 2006-12-07 | Teac Corp | Data inspection method and device |
-
2007
- 2007-08-24 JP JP2007218809A patent/JP2009053859A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1011296A (en) * | 1996-06-26 | 1998-01-16 | Matsushita Graphic Commun Syst Inc | Communication controller |
JPH1115672A (en) * | 1997-06-23 | 1999-01-22 | Brother Ind Ltd | Data storage state judgement method/device |
JPH11259284A (en) * | 1998-03-12 | 1999-09-24 | Fujitsu Ltd | On-line program updating system and computer readable storage medium for recording program for updating program |
JPH11265282A (en) * | 1998-03-17 | 1999-09-28 | Toshiba Corp | Controller for automatic vending machine |
JP2001147814A (en) * | 1999-11-18 | 2001-05-29 | Seiko Epson Corp | Start processing updating device |
JP2001256057A (en) * | 2000-03-14 | 2001-09-21 | Fuji Xerox Co Ltd | Update method of control program for service device and service device |
JP2002176582A (en) * | 2000-12-06 | 2002-06-21 | Fuji Photo Film Co Ltd | Electronic apparatus |
JP2002175194A (en) * | 2000-12-07 | 2002-06-21 | Ricoh Co Ltd | Program downloading system, program downloading device, image forming device, program downloading method, and computer-readable recording medium with program for executing the method recorded thereon |
JP2003263323A (en) * | 2002-03-07 | 2003-09-19 | Fuji Xerox Co Ltd | Downloader and download method |
JP2004086308A (en) * | 2002-08-23 | 2004-03-18 | Canon Inc | Image forming device, data input control method, program, and storage medium |
JP2005063120A (en) * | 2003-08-11 | 2005-03-10 | Ricoh Co Ltd | Program rewriting device |
JP2006331148A (en) * | 2005-05-27 | 2006-12-07 | Teac Corp | Data inspection method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6622246B1 (en) | Method and apparatus for booting and upgrading firmware | |
US20080235501A1 (en) | Method For Detecting and Correcting Firmware Corruption | |
US9256744B2 (en) | System-on-chip and booting method thereof | |
JP2005190201A (en) | Information processor and rom image generation device for the same | |
US20080072029A1 (en) | Method for executing power on self test on a computer system and updating SMBIOS information partially | |
CN112947977A (en) | Software online upgrading method and system | |
JP2010140266A (en) | Electronic device system and electronic device | |
US7577766B2 (en) | Method for controlling electronic apparatus, program for controlling electronic apparatus, electronic apparatus, and recording apparatus | |
JP2013218510A (en) | Information processing apparatus, program update method for information processing apparatus, and program | |
JP2006024155A (en) | Peripheral device | |
JP2006202117A (en) | Processor and its firmware download method | |
US7047283B1 (en) | Apparatus and method of upgrading program of firmware board | |
JP2008009799A (en) | Image forming device | |
JP2009053859A (en) | Device and bootloading program | |
JP2008162054A (en) | Printer | |
JP2007133512A (en) | Information processor with flash rom, and data erasing method for flash rom | |
US20130159692A1 (en) | Electronic apparatus and bios updating apparatus thereof | |
JP2010117944A (en) | Software update system, software update method, mobile phone terminal, and program | |
JP2007069514A (en) | Ink-jet recording device | |
JP2009123134A (en) | Usb host device and method for manufacturing usb host device | |
JP2009020697A (en) | Image forming apparatus | |
JP2005115440A (en) | Computer program for making computer perform uninstallation | |
JPH07281986A (en) | Extended board, information processor using the same and control method for peripheral device | |
JP2006154988A (en) | Updating method and device thereof | |
JP2008117404A (en) | Memory rewriting control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100713 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120411 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120508 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120606 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20121009 |