JP2008040924A - Firmware rewriting method and firmware reading method - Google Patents

Firmware rewriting method and firmware reading method Download PDF

Info

Publication number
JP2008040924A
JP2008040924A JP2006216397A JP2006216397A JP2008040924A JP 2008040924 A JP2008040924 A JP 2008040924A JP 2006216397 A JP2006216397 A JP 2006216397A JP 2006216397 A JP2006216397 A JP 2006216397A JP 2008040924 A JP2008040924 A JP 2008040924A
Authority
JP
Japan
Prior art keywords
area
kernel
data
program
firmware
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
JP2006216397A
Other languages
Japanese (ja)
Inventor
Hidenori Kaname
秀紀 要
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.)
Murata Machinery Ltd
Original Assignee
Murata Machinery Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Murata Machinery Ltd filed Critical Murata Machinery Ltd
Priority to JP2006216397A priority Critical patent/JP2008040924A/en
Publication of JP2008040924A publication Critical patent/JP2008040924A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a firmware rewriting method and firmware reading method for enabling its own device to normally function even when firmware is damaged, which is divided and stored in individual storage areas of a storage device in each different data type. <P>SOLUTION: A kernel program included in rewrite data rewrites a first kernel area F-K1 and a second kernel area F-K2 of a FlashROM 8, sum-checking is performed while a kernel program stored in the first kernel area F-K1 is read into a first kernel area SD-K1 of an SDRAM 9, and when the kernel program is not normal, a kernel program stored in the second kernel area F-K2 is read into the first kernel area SD-K1. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ファームウェアの書き換え方法、及び、ファームウェアの読み込み方法に関し、詳しくは、記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの書き換え方法、及び、読み込み方法に関するものである。   The present invention relates to a method for rewriting firmware and a method for reading firmware, and more particularly to a method for rewriting and reading firmware stored in individual storage areas of a storage device according to the type of data. It is.

自装置のファームウェアを、ファームウェアのデータの種類別に分割してFlashROMの個々の記憶領域にそれぞれ記憶し、ファームウェアのデータの種類の単位で、FlashROMに記憶されているファームウェアを書き換えてバージョンアップするデータ処理装置が発明されている(例えば、特許文献1)。特許文献1に係るデータ処理装置では、データの種類別に分割されたファームウェアのそれぞれに誤り検出データを埋め込み、この誤り検出データを使用してサムチェックを行うことにより、書き換えたファームウェアの誤り検出をファームウェアのデータの種類の単位で行うことができる。
特開2005−275843号公報
Data processing that divides the firmware of its own device according to the type of firmware data, stores it in each flash ROM storage area, and rewrites the firmware stored in the Flash ROM in units of the type of firmware data. An apparatus has been invented (for example, Patent Document 1). In the data processing apparatus according to Patent Document 1, error detection data is embedded in each of the firmware divided for each data type, and a sum check is performed using the error detection data, whereby error detection of the rewritten firmware is performed by the firmware. This can be done in units of data types.
JP 2005-275843 A

しかし、特許文献1に記載のデータ処理装置は、書き換えたファームウェアの誤りを検出するのみであり、ファームウェアの誤りに対処することができなかった。したがって、例えば、特許文献1に記載のデータ処理装置を備えた複合機において、データ処理装置のファームウェアの書き換え中の電源断などによってファームウェアのカーネルプログラムに破損(誤り)が起こった場合には、当該データ処理装置を使用する複合機の機能は動作不能となり、機能の復旧のためには複合機のサービスマンに頼るほかなかった。   However, the data processing apparatus described in Patent Document 1 only detects an error in the rewritten firmware and cannot deal with the firmware error. Therefore, for example, in a multi-function peripheral equipped with the data processing device described in Patent Document 1, if the firmware kernel program is damaged (error) due to a power interruption during rewriting of the firmware of the data processing device, The functions of the multifunction device using the data processing device became inoperable, and it was necessary to rely on the service personnel of the multifunction device to restore the function.

本発明は、かかる課題に鑑みてなされたものであり、記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアに破損が起こった場合でも、自装置を正常に機能させることが可能な、ファームウェアの書き換え方法、及び、ファームウェアの読み込み方法を提供することを目的とする。   The present invention has been made in view of such a problem, and allows the device itself to function normally even when the firmware stored by dividing the data into the individual storage areas of the storage device has been damaged. It is an object of the present invention to provide a method for rewriting firmware and a method for reading firmware.

上記目的を達成するために、請求項1のファームウェアの書き換え方法は、記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの書き換えデータによる書き換え方法であって、前記書き換えデータに含まれるカーネルプログラムを前記記憶装置の記憶領域の第1カーネル領域に書き込むステップ(A)と、前記書き換えデータに含まれるカーネルプログラムを前記記憶装置の記憶領域の第2カーネル領域に書き込むステップ(B)とを含むことを特徴としている。   In order to achieve the above object, a firmware rewriting method according to claim 1 is a rewriting method using firmware rewriting data stored in each storage area of a storage device in a divided manner according to the type of data. A step (A) of writing a kernel program included in the data in a first kernel area of the storage area of the storage device, and a step of writing a kernel program included in the rewrite data in a second kernel area of the storage area of the storage device ( B).

このファームウェアの書き換え方法においては、記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの書き換えデータによる書き換え方法であって、ステップ(A)で、書き換えデータに含まれるカーネルプログラムを記憶装置の記憶領域の第1カーネル領域に書き込み、ステップ(B)で、書き換えデータに含まれるカーネルプログラムを記憶装置の記憶領域の第2カーネル領域に書き込む。   This firmware rewriting method is a rewriting method using firmware rewriting data that is stored separately for each data type in each storage area of the storage device, and includes a kernel included in the rewriting data in step (A). The program is written in the first kernel area of the storage area of the storage device, and in step (B), the kernel program included in the rewrite data is written in the second kernel area of the storage area of the storage device.

このようなファームウェアの書き換え方法によれば、記憶装置の記憶領域の第1カーネル領域と第2カーネル領域が個別に書き換えられるので、書き換えデータによるカーネルプログラムの書き換え中に停電などが起こり、当該ファームウェア(カーネルプログラム)によって機能する装置に電源断が発生してカーネルプログラムが破損した場合でも、第1カーネル領域のカーネルプログラムと第2カーネル領域のカーネルプログラムとが一度に破損することがないので、当該ファームウェア(カーネルプログラム)によって機能する装置を、第1カーネル領域に記憶されているカーネルプログラムと第2カーネル領域に記憶されているプログラムとのうちの正常なカーネルプログラムによって正常に機能させることができる。   According to such a firmware rewriting method, since the first kernel area and the second kernel area of the storage area of the storage device are individually rewritten, a power failure or the like occurs during rewriting of the kernel program by the rewrite data, and the firmware ( Even when a power failure occurs in a device functioning by a kernel program) and the kernel program is damaged, the kernel program in the first kernel area and the kernel program in the second kernel area are not damaged at one time. A device functioning by (kernel program) can be normally functioned by a normal kernel program out of the kernel program stored in the first kernel area and the program stored in the second kernel area.

また、記憶装置の記憶領域に重複して書き込まれるのは、カーネルプログラムのみである。したがって、ファームウェアの全体を一括して書き込まねばならず、電源断に対処するために、ファームウェアの全体を重複して記憶装置の記憶領域に書き込む方法に比べて、書込みに要する時間を短縮し、記憶装置の記憶資源を節約することができる。   Only the kernel program is written in the storage area of the storage device in an overlapping manner. Therefore, the entire firmware must be written in a lump, and in order to cope with the power interruption, the time required for writing is shortened compared to the method of writing the entire firmware in the storage area of the storage device in an overlapping manner. The storage resources of the device can be saved.

請求項2に記載のファームウェアの書き換え方法は、請求項1に記載のファームウェアの書き換え方法であって、前記記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常であるか否かを判断するステップ(C)と、前記記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムが正常であるか否かを判断するステップ(D)とをさらに含み、前記記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常でない場合に、前記ステップ(B)に先立って前記ステップ(A)を実行し、前記記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムが正常でない場合に、前記ステップ(A)に先立って前記ステップ(B)を実行することを特徴としている。   The firmware rewriting method according to claim 2 is the firmware rewriting method according to claim 1, wherein the kernel program stored in the first kernel area of the storage area of the storage device is normal. A step (C) of determining whether or not a kernel program stored in a second kernel area of the storage area of the storage device is normal, and a step (D) of determining whether or not the kernel program is normal. If the kernel program stored in the first kernel area of the storage area is not normal, the step (A) is executed prior to the step (B), and the second kernel area of the storage area of the storage device is executed. The step (B) is executed prior to the step (A) when the stored kernel program is not normal. To have.

このファームウェアの書き換え方法においては、ステップ(C)で記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常であるか否かを判断し、ステップ(D)で記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムが正常であるか否かを判断する。そして、記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常でない場合に、ステップ(B)に先立ってステップ(A)を実行し、記憶装置の記憶領域の第2カーネルプログラムに記憶されているカーネルプログラムが正常でない場合に、ステップ(A)に先立ってステップ(B)を実行する。   In this firmware rewriting method, it is determined in step (C) whether or not the kernel program stored in the first kernel area of the storage area of the storage device is normal, and in step (D) the storage of the storage device is determined. It is determined whether or not the kernel program stored in the second kernel area of the area is normal. When the kernel program stored in the first kernel area of the storage area of the storage device is not normal, step (A) is executed prior to step (B), and the second kernel program in the storage area of the storage device is executed. Step (B) is executed prior to Step (A) when the kernel program stored in is not normal.

このようなファームウェアの書き換え方法によれば、第1カーネル領域に記憶されているカーネルプログラムが電源断による破損などにより正常でない場合には、第2カーネル領域に記憶されているカーネルプログラムに先立って第1カーネル領域に記憶されているカーネルプログラムの書き換えを行い、第2カーネル領域に記憶されているカーネルプログラムが正常でない場合には、第1カーネル領域に記憶されているカーネルプログラムに先立って第2カーネル領域に記憶されているカーネルプログラムの書き換えを行う。したがって、第1カーネル領域のカーネルプログラムと第2カーネル領域のカーネルプログラムとのどちらかが正常でない状態で、第1カーネル領域のカーネルプログラム及び第2カーネル領域のカーネルプログラムの書き換えを行う場合に電源断などが再び発生した場合でも、第1カーネル領域又は第2カーネル領域のどちらかに正常なカーネルプログラムが存在することになるので、当該正常なカーネルプログラムを実行することによって当該ファームウェア(カーネルプログラム)によって機能する装置を正常に機能させることができる。   According to such a firmware rewriting method, if the kernel program stored in the first kernel area is not normal due to damage caused by power interruption or the like, the first program is executed prior to the kernel program stored in the second kernel area. If the kernel program stored in the first kernel area is rewritten and if the kernel program stored in the second kernel area is not normal, the second kernel is prior to the kernel program stored in the first kernel area. Rewrite the kernel program stored in the area. Accordingly, when the kernel program in the first kernel area and the kernel program in the second kernel area are rewritten while either the kernel program in the first kernel area or the kernel program in the second kernel area is not normal, the power is cut off. Even if the error occurs again, a normal kernel program exists in either the first kernel area or the second kernel area. Therefore, by executing the normal kernel program, the firmware (kernel program) A functioning device can function normally.

請求項3に記載のファームウェアの書き換え方法は、請求項2に記載のファームウェアの書き換え方法であって、前記ステップ(C)及び前記ステップ(D)において、カーネルプログラムに含まれる誤り検出データに基づいてカーネルプログラムが正常であるか否かを判断することを特徴としている。   The firmware rewriting method according to claim 3 is the firmware rewriting method according to claim 2, wherein in step (C) and step (D), based on error detection data included in the kernel program. It is characterized by determining whether or not the kernel program is normal.

このファームウェアの書き換え方法においては、ステップ(C)及びステップ(D)において、カーネルプログラムに含まれる誤り検出データに基づいてカーネルプログラムが正常であるか否かが判断される。したがって、カーネルプログラムのデータのみを用いて簡便にカーネルプログラムが正常であるか否かを判断することができる。   In this firmware rewriting method, in step (C) and step (D), it is determined whether or not the kernel program is normal based on error detection data included in the kernel program. Therefore, it is possible to easily determine whether or not the kernel program is normal using only the kernel program data.

上記課題を達成するために、請求項4に記載のファームウェアの読み込み方法は、副記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの主記憶装置への読み込み方法であって、前記副記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムを前記主記憶装置に読み込みつつ、当該カーネルプログラムに含まれる誤り検出データに基づいて当該カーネルプログラムが正常であるか否かを判断するステップ(A)と、前記ステップ(A)において、前記副記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常でないと判断した場合に、前記副記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムを前記主記憶装置に読み込むステップ(B)とを備えることを特徴としている。   In order to achieve the above object, the firmware reading method according to claim 4 is a method for reading the firmware stored in the individual storage areas of the secondary storage device according to the type of data into the main storage device. The kernel program is normal based on error detection data included in the kernel program while reading the kernel program stored in the first kernel area of the storage area of the secondary storage device into the main storage device In the step (A), and in the step (A), if it is determined that the kernel program stored in the first kernel area of the storage area of the secondary storage device is not normal, the secondary storage A step of reading the kernel program stored in the second kernel area of the storage area of the apparatus into the main storage apparatus. It is characterized in that it comprises a (B).

このファームウェアの読み込み方法においては、ステップ(A)で、FlashROMなどの副記憶装置の記憶領域の第1カーネル領域に記載されているカーネルプログラムをSDRAMなどの主記憶装置に読み込みつつ、当該カーネルプログラムに含まれる誤り検出データに基づいて当該カーネルプログラムが正常であるか否かを判断し、ステップ(B)で、ステップ(A)において、副記憶装置の記憶領域の第1カーネル領域に記載されているカーネルプログラムが正常でないと判断した場合に、副記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムを主記憶装置に読み込む。   In this firmware reading method, in step (A), the kernel program described in the first kernel area of the storage area of the secondary storage device such as FlashROM is read into the main storage device such as SDRAM, and the kernel program is loaded. Based on the error detection data included, it is determined whether or not the kernel program is normal. In step (B), it is described in the first kernel area of the storage area of the secondary storage device in step (A). When it is determined that the kernel program is not normal, the kernel program stored in the second kernel area of the storage area of the secondary storage device is read into the main storage device.

このようなファームウェアの読み込み方法によれば、副記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムと第2カーネル領域に記憶されているカーネルプログラムとのうち、正常なカーネルプログラムが主記憶装置に読み込まれる。したがって、ファームウェアの書き換え中に、当該ファームウェアによって機能する装置に電源断などが起こり、副記憶装置の記憶領域の第1カーネル領域のカーネルプログラム又は第2カーネル領域のカーネルプログラムのどちらかが破損などして正常でない場合でも、当該ファームウェア(カーネルプログラム)によって機能する装置を正常に機能させることができる。   According to such a firmware reading method, a normal kernel program among the kernel programs stored in the first kernel area and the second kernel area of the storage area of the secondary storage device is Read into main memory. Therefore, during rewriting of the firmware, a power failure or the like occurs in a device functioning with the firmware, and either the kernel program in the first kernel area or the kernel program in the second kernel area in the storage area of the secondary storage device is damaged. Even if it is not normal, the device functioning by the firmware (kernel program) can be functioned normally.

また、副記憶装置の記憶領域の第1カーネル領域及び第2カーネル領域に記憶されているカーネルプログラムを読み出して、主記憶装置の記憶領域の第1カーネル領域又は第2カーネル領域に書き込みつつ、順次にサムチェックのための演算を行うので、カーネルプログラムの読み込みにかかる時間を短縮することができる。   In addition, the kernel program stored in the first kernel area and the second kernel area of the storage area of the secondary storage device is read and written in the first kernel area or the second kernel area of the storage area of the main storage device, sequentially Therefore, the time required for reading the kernel program can be shortened.

以下、本発明のファームウェアの書き換え方法、及び、ファームウェアの読み込み方法を実行するデータ処理装置を例として、本発明の実施の形態について説明する。図1に示すように、データ処理装置1は、コピー機能、スキャナ機能、PCプリント機能などを備える複合機2の本体に組み込まれており、複合機2の本体、及び、ネットワークインターフェースコントローラ3と通信可能に接続されている。データ処理装置1は、LAN4上のクライアントPC5(Personal Computer)から送信された印刷用のPDL(Page Description Language)データを、ネットワークインターフェースコントローラ3を介して受信し、受信したPDLデータに所定のデータ処理を行って複合機2の本体に転送する。   Embodiments of the present invention will be described below by taking as an example a data processing apparatus that executes a firmware rewriting method and a firmware reading method of the present invention. As shown in FIG. 1, the data processing device 1 is incorporated in the main body of the multifunction device 2 having a copy function, a scanner function, a PC print function, and the like, and communicates with the main body of the multifunction device 2 and the network interface controller 3. Connected as possible. The data processing apparatus 1 receives PDL (Page Description Language) data for printing transmitted from a client PC 5 (Personal Computer) on the LAN 4 via the network interface controller 3, and performs predetermined data processing on the received PDL data. To transfer to the main body of the multifunction device 2.

クライアントPC5は、一般的な機能を備えたPCであり、ユーザが作成した文書などのデータをPDLデータに変換し、当該PDLデータを、LAN4を介して複合機2のネットワークインターフェースコントローラ3に送信する。なお、ここで使用されるPDL(ページ記述言語)は特に限定されるものではないが、例えばPCL(Printer Control Language)などを用いることができる。また、後述するが、データ処理装置1が自装置1のファームウェアをアップデートするための書き換えデータもこのクライアントPC5から送信される。   The client PC 5 is a PC having a general function, converts data such as a document created by the user into PDL data, and transmits the PDL data to the network interface controller 3 of the MFP 2 via the LAN 4. . The PDL (page description language) used here is not particularly limited. For example, PCL (Printer Control Language) can be used. Further, as will be described later, rewrite data for the data processing device 1 to update the firmware of the device 1 is also transmitted from the client PC 5.

ネットワークインターフェースコントローラ3は、複合機2の本体がLAN4上のクライアントPC5との間で各種データを送受信する際に、そのデータの送受信を制御するものである。具体的には、クライアントPC5から受信したPDLデータや書き換えデータをデータ処理装置1に転送し、複合機2で読取られた原稿の画像データなどをLAN4上のクライアントPC5に送信する。   The network interface controller 3 controls transmission / reception of data when the main body of the multifunction device 2 transmits / receives various data to / from the client PC 5 on the LAN 4. Specifically, the PDL data and rewrite data received from the client PC 5 are transferred to the data processing apparatus 1, and the image data of the original read by the multifunction machine 2 is transmitted to the client PC 5 on the LAN 4.

一方、ネットワークインターフェースコントローラ3から転送されたPDLデータに所定のデータ処理を行って複合機2の本体に転送するデータ処理装置1は、図示するように、制御部(MPU:Microprocessing Unit)6、インターフェース回路7、FlashROM(Read Only Memory)8、SDRAM(Synchronous Dynamic Random Access Memory)9、及び、データ処理回路10を備えたものであって、各部6乃至10は、バス11によって通信可能に接続されている。   On the other hand, the data processing device 1 that performs predetermined data processing on the PDL data transferred from the network interface controller 3 and transfers the PDL data to the main body of the multifunction device 2 includes a control unit (MPU: Microprocessing Unit) 6, an interface as shown A circuit 7, a flash ROM (Read Only Memory) 8, an SDRAM (Synchronous Dynamic Random Access Memory) 9, and a data processing circuit 10 are provided, and the units 6 to 10 are communicably connected by a bus 11. Yes.

制御部6は、FlashROM8に記憶されているファームウェアの各種プログラムに従って、このデータ処理装置1を構成する各部を制御する。インターフェース回路7は、ネットワークインターフェースコントローラ3から転送されたPDLデータや書き換えデータを受信するものである。また、インターフェース回路7が受信したPDLデータは、データ処理回路10において所定のデータ処理が施された後に複合機2の本体に転送される。   The control unit 6 controls each unit constituting the data processing device 1 according to various programs of firmware stored in the FlashROM 8. The interface circuit 7 receives the PDL data and rewrite data transferred from the network interface controller 3. The PDL data received by the interface circuit 7 is subjected to predetermined data processing in the data processing circuit 10 and then transferred to the main body of the multifunction device 2.

FlashROM8は、制御部6によってデータ処理装置1の各部が制御されるためのファームウェアを記憶するフラッシュメモリであり、図2に示すようにブート領域F−B、第1カーネル領域F−K1、第2カーネル領域F−K2、一般プログラム領域F−P、及び、フォント領域F−Fの5つの記憶領域に論理的に分割されている。SDRAM9は、制御部6の主メモリ、ワークエリアなどとして機能し、プログラム領域SD−P及び、データ領域SD−Dの2つの記憶領域に論理的に分割されている。   The flash ROM 8 is a flash memory that stores firmware for controlling the respective units of the data processing device 1 by the control unit 6, and as shown in FIG. 2, the boot area FB, the first kernel area F-K1, the second It is logically divided into five storage areas: a kernel area F-K2, a general program area FP, and a font area FF. The SDRAM 9 functions as a main memory, a work area, and the like of the control unit 6, and is logically divided into two storage areas, a program area SD-P and a data area SD-D.

FlashROM8のブート領域F−Bは、システム起動時に実行されるブートプログラムを記憶している記憶領域である。第1カーネル領域F−K1及び、第2カーネル領域F−K2は、カーネルプログラムを記憶している記憶領域である。カーネルプログラムには、自装置1と複合機2の本体との間の通信の初期化、自己書き換え(バージョンアップ)、ジョブ管理、データ管理、タスク管理などを行うための制御プログラムや初期パラメータ、受信した書き換えデータによりFlashROM8のファームウェアをアップデート(書き換え)するための書き換えコード、ファームウェアをアップデートした後に書き換えが正常に行われたか否かを検査するためのデータチェックコードなどが含まれる。一般プログラム領域F−Pは、データ処理装置1が各種処理動作を行うための一般プログラムを記憶している記憶領域であり、例えば、インターフェース回路7が受信したPDLデータに所定のデータ処理を行うためのデータ処理プログラムなどを記憶している。フォント領域F−Fは、フォントデータを記憶している記憶領域である。   The boot area FB of the FlashROM 8 is a storage area that stores a boot program executed when the system is started. The first kernel area F-K1 and the second kernel area F-K2 are storage areas that store kernel programs. The kernel program includes a control program and initial parameters for receiving initialization, self-rewriting (version upgrade), job management, data management, task management, etc. between the device 1 and the MFP 2 A rewrite code for updating (rewriting) the firmware of the FlashROM 8 with the rewritten data, a data check code for checking whether or not the rewrite has been normally performed after the firmware is updated, and the like are included. The general program area FP is a storage area that stores general programs for the data processing apparatus 1 to perform various processing operations. For example, the general program area FP is for performing predetermined data processing on PDL data received by the interface circuit 7. The data processing program is stored. The font area FF is a storage area that stores font data.

また、FlashROM8のこれらの各記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fのサイズは、それぞれ常に一定の値となるように設定されており、ここではブート領域F−Bが8kB(キロバイト)、第1カーネル領域F−K1、及び、第2カーネル領域F−K2がそれぞれ248kB、一般プログラム領域F−Pが2816kB、フォント領域F−Fが5120kBに設定されている。このように、データ処理装置1のファームウェアは、データの種類別に分割されて異なるサイズの記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fにそれぞれ記憶されているが、これらの各記憶領域の全体にプログラムやフォントデータが記憶されているわけではなく、プログラムやフォントデータに適当なデータサイズの空きデータ、すなわち16進数で「00」又は「FF」の値を持つ空きデータが付加されたデータがそれぞれ対応する記憶領域に記憶されている。例えば、2816kBの一般プログラム領域F−Pの場合、実際に使用する一般プログラム全体のデータサイズが2600kBであれば、これに216kBの空きデータが付加された一般プログラム領域F−Pのサイズと等しい2816kBのデータが該一般プログラム領域F−Pに記憶されている。なお、これらの各記憶領域に記憶されているデータは、各記憶領域毎に個別に外部から受信した書き換えデータによって書き換えることが可能である。FlashROM8に記憶されているファームウェアは、書き換えデータによって、例えば、第1カーネル領域F−K1及び、第2カーネル領域F−K2のデータのみを書き換えたり、一般プログラム領域F−Pとフォント領域F−Fのデータのみを書き換えたりすることが可能である。   In addition, the size of each of the storage areas FB, F-K1, F-K2, FP, and FF of the FlashROM 8 is always set to a constant value. The boot area F-B is set to 8 kB (kilobytes), the first kernel area F-K1 and the second kernel area F-K2 are set to 248 kB, the general program area FP is set to 2816 kB, and the font area FF is set to 5120 kB. Has been. Thus, the firmware of the data processing device 1 is divided according to the type of data and stored in the storage areas FB, F-K1, F-K2, FP, and FF of different sizes. However, the program and font data are not stored in all of these storage areas, and empty data having an appropriate data size for the program and font data, that is, a value of “00” or “FF” in hexadecimal. The data to which the empty data having is added is stored in the corresponding storage area. For example, in the case of the general program area FP of 2816 kB, if the data size of the entire general program actually used is 2600 kB, it is equal to the size of the general program area FP to which 216 kB of free data is added. Are stored in the general program area FP. Note that the data stored in each of these storage areas can be rewritten by rewrite data received from the outside individually for each storage area. For example, the firmware stored in the FlashROM 8 can rewrite only the data in the first kernel area F-K1 and the second kernel area F-K2 with the rewrite data, or the general program area FP and the font area FF. It is possible to rewrite only the data.

一方、SDRAM9のプログラム領域SD−Pは、制御部6によってFlashROM8に記憶されている各種データを制御部6で実行するために一時的に読み込む領域である。SDRAM9のプログラム領域SD−Pのうち、FlashROM8のブート領域F−Bに記憶されているブートプログラムを読み込む領域をブート領域SD−B、第1カーネル領域F−K1に記憶されているカーネルプログラム、又は、第2カーネル領域F−K2に記憶されているカーネルプログラムを読み込む領域を第1カーネル領域SD−K1、第2カーネル領域F−K2に記憶されているカーネルプログラムを読み込む領域を第2カーネル領域SD−K2、一般プログラム領域F−Pに記憶されている一般プログラムを読み込む領域を一般プログラム領域SD−P、フォント領域F−Fに記憶されているフォントデータを読み込む領域をフォント領域SD−Fとそれぞれ呼ぶ。   On the other hand, the program area SD-P of the SDRAM 9 is an area for temporarily reading various data stored in the flash ROM 8 by the control section 6 in order to be executed by the control section 6. Of the program area SD-P of the SDRAM 9, an area for reading a boot program stored in the boot area FB of the FlashROM 8 is a kernel program stored in the boot area SD-B, the first kernel area F-K1, or An area for reading a kernel program stored in the second kernel area F-K2 is a first kernel area SD-K1, and an area for reading a kernel program stored in the second kernel area F-K2 is a second kernel area SD. -K2, an area for reading a general program stored in the general program area FP is a general program area SD-P, and an area for reading font data stored in the font area FF is a font area SD-F. Call.

制御部6は、システム起動時にFlashROM8のブート領域F−BのブートプログラムをSDRAM9のプログラム領域SD−Pに読み込み、プログラム領域SD−Pに読み込まれたブートプログラムに基づいて、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラム、第2カーネル領域F−K2に記憶されているカーネルプログラム、一般プログラム領域F−Pに記憶されている一般プログラム、フォント領域F−Fに記憶されているフォントデータをそれぞれSDRAM9のプログラム領域SD−Pに読み込む。制御部6は、このようにしてFlashROM8の各記憶領域のデータをSDRAM9のプログラム領域SD−Pにロードし、ロードしたプログラムを必要に応じて実行することにより、例えば、外部から受信したPDLデータに所定のデータ処理を行って複合機2の本体に転送したり、外部から受信した書き換えデータにより自身のファームウェアをアップデートしたりすることができる。SDRAM9のデータ領域SD−Dは、各種データを一時的に格納する領域であり、ネットワークインターフェースコントローラ3によって転送されたPDLデータや書き換えデータ、複合機2の本体から受信した画像データなどを一時的に格納する。   The control unit 6 reads the boot program of the boot area FB of the FlashROM 8 into the program area SD-P of the SDRAM 9 at the time of system startup, and based on the boot program read into the program area SD-P, the first kernel area of the FlashROM 8 Kernel program stored in F-K1, kernel program stored in second kernel area F-K2, general program stored in general program area FP, stored in font area FF Each font data is read into the program area SD-P of the SDRAM 9. The control unit 6 loads the data in each storage area of the flash ROM 8 into the program area SD-P of the SDRAM 9 in this way, and executes the loaded program as necessary, for example, to PDL data received from the outside. It is possible to perform predetermined data processing and transfer it to the main body of the multifunction device 2 or update its own firmware with rewritten data received from the outside. The data area SD-D of the SDRAM 9 is an area for temporarily storing various data, and temporarily stores PDL data and rewrite data transferred by the network interface controller 3, image data received from the main body of the multifunction device 2, and the like. Store.

データ処理回路10は、インターフェース回路7が受信したPDLデータに所定のデータ処理を施すものであり、具体的にはインターフェース回路7が受信したPDLデータを解析して複合機2の本体で処理可能な画像データに展開した後、その画像データをMMR(Modified Modified Read)方式で符号化(エンコード)する。このようにしてデータ処理回路10において所定のデータ処理が施された画像データは、インターフェース回路7によって複合機2の本体へと転送される。なお、ここで使用する符号化方式は、複合機2の本体において復号が可能な方式であればMMR方式に限定されるものではなく、例えば、MH(Modified Huffman)、MR(Modified Read)、JBIG(Joint Bi-level Image Group)方式などの他の符号化方式を使用してもよい。また、ここでは、画像データの転送速度などを考慮して展開した画像データをMMR方式で符号化して転送しているが、展開した画像データを符号化することなくそのまま複合機2の本体に転送するようにしてもよい。   The data processing circuit 10 performs predetermined data processing on the PDL data received by the interface circuit 7. Specifically, the data processing circuit 10 can analyze the PDL data received by the interface circuit 7 and process it by the main body of the multifunction device 2. After the image data is expanded, the image data is encoded (encoded) by the MMR (Modified Modified Read) method. The image data that has been subjected to predetermined data processing in the data processing circuit 10 in this way is transferred to the main body of the multifunction device 2 by the interface circuit 7. Note that the encoding method used here is not limited to the MMR method as long as it can be decoded in the main body of the multi-function device 2, and for example, MH (Modified Huffman), MR (Modified Read), JBIG Other encoding schemes such as (Joint Bi-level Image Group) scheme may be used. In this example, the developed image data is transferred in accordance with the MMR method in consideration of the transfer speed of the image data. However, the developed image data is transferred to the main body of the MFP 2 without being encoded. You may make it do.

一方、データ処理装置1から転送された画像データの印刷処理を行う複合機2の本体は、制御部(MPU)21、ROM(Read Only Memory)22、RAM(Random Access Memory)23、原稿読取部24、コーデック(CODEC:Coder and Decoder)25、画像メモリ26、記録部27、操作部28、及び、表示部29を備えており、各部21乃至29は、バス30によって通信可能に接続されている。   On the other hand, the main body of the MFP 2 that performs the printing process of the image data transferred from the data processing device 1 includes a control unit (MPU) 21, a ROM (Read Only Memory) 22, a RAM (Random Access Memory) 23, and a document reading unit. 24, a codec (CODEC: Coder and Decoder) 25, an image memory 26, a recording unit 27, an operation unit 28, and a display unit 29. The units 21 to 29 are communicably connected via a bus 30. .

制御部21は、ROM22に記憶されているプログラムに従って、この複合機2を構成する各部を制御する。ROM22は、前記プログラムを記憶している。RAM23は、制御部21の主メモリ、ワークエリアなどとして機能し、予め登録された各種設定情報などを記憶している。原稿読取部24は、例えば、CCD(Charge Coupled Device)などのイメージセンサによって原稿の画像データを読取る。   The control unit 21 controls each unit constituting the multifunction device 2 according to a program stored in the ROM 22. The ROM 22 stores the program. The RAM 23 functions as a main memory, work area, and the like of the control unit 21 and stores various setting information registered in advance. The document reading unit 24 reads image data of a document with an image sensor such as a CCD (Charge Coupled Device).

コーデック25は、画像データの符号化及び、復号(デコード)を行うものであり、原稿読取部24で読取られた原稿の画像データをMH、MR、MMR、JBIG方式などにより符号化し、符号化されている画像データを復号する。なお、データ処理装置1から転送された画像データは、このコーデック25において復号される。画像メモリ26は、コーデック25によって符号化された原稿の画像データ、データ処理装置1から転送された画像データなどを格納する。   The codec 25 encodes and decodes image data. The image data of the document read by the document reading unit 24 is encoded by the MH, MR, MMR, JBIG method, and the like. The image data that is stored is decoded. The image data transferred from the data processing device 1 is decoded by the codec 25. The image memory 26 stores document image data encoded by the codec 25, image data transferred from the data processing apparatus 1, and the like.

記録部27は、原稿読取部24において読取られた原稿の画像データ、データ処理装置1から転送された画像データなどの画像を用紙に記録するものであり、この記録部27における記録方式としては、例えば、電子写真方式を用いることができる。データ処理装置1から転送された画像データは、画像メモリ26に一旦格納された後、コーデック25によって復号され、この記録部27においてその画像が用紙に記録される。   The recording unit 27 records the image such as the image data of the document read by the document reading unit 24 and the image data transferred from the data processing apparatus 1 on a sheet. The recording method in the recording unit 27 is as follows. For example, an electrophotographic method can be used. The image data transferred from the data processing apparatus 1 is temporarily stored in the image memory 26, and then decoded by the codec 25. The recording unit 27 records the image on paper.

操作部28は、図示しないが原稿読取部24に原稿の読取開始を指示するためのスタートキー、コピー部数などを入力するためのテンキー、各種設定を行うためのカーソルキーなど、表示部29と連動した各種操作キーを備えている。表示部29は、各種の設定状態や複合機2の動作状態などを文字や図形などで表示する液晶表示装置(LCD:Liquid Crystal Display)や、点灯又は消灯で表示するLEDランプなどを備えている。   Although not shown, the operation unit 28 is linked with the display unit 29, such as a start key for instructing the document reading unit 24 to start reading a document, a numeric keypad for inputting the number of copies, and a cursor key for performing various settings. Various operation keys are provided. The display unit 29 includes a liquid crystal display (LCD) that displays various setting states and the operation state of the multifunction device 2 with characters, graphics, and the like, an LED lamp that is turned on or off, and the like. .

以上に説明したように構成された複合機2に対して、LAN4上のクライアントPC5からPDLデータが送信されると、当該PDLデータはネットワークインターフェースコントローラ3によってデータ処理装置1に転送される。そして、PDLデータは、データ処理装置1において展開されて所定の符号化方式で符号化された後、複合機2の本体へと転送されて当該複合機2の本体においてその画像が用紙に記録される。また、クライアントPC5は、複合機2において印刷すべきPDLデータの他に、データ処理装置1のFlashROM8に記憶されているファームウェアの全体又は一部をアップデートするための書き換えデータを複合機2に対して送信する。   When PDL data is transmitted from the client PC 5 on the LAN 4 to the MFP 2 configured as described above, the PDL data is transferred to the data processing apparatus 1 by the network interface controller 3. The PDL data is expanded in the data processing apparatus 1 and encoded by a predetermined encoding method, and then transferred to the main body of the multifunction device 2, and the image is recorded on the paper in the main body of the multifunction device 2. The In addition to the PDL data to be printed in the multifunction device 2, the client PC 5 provides rewrite data for updating all or part of the firmware stored in the flash ROM 8 of the data processing device 1 to the multifunction device 2. Send.

データ処理装置1は、FlashROM8の各記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fに記憶されているファームウェアの全体、すなわち、記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fのデータの全てをアップデートすることは当然に可能であるが、一部の記憶領域のデータのみをアップデートすることも可能である。FlashROM8の各記憶領域の一部のみのアップデートを行う場合には、クライアントPC5から、FlashROM8の記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fのうち、書き換えが必要な記憶領域に対応する書き換えデータのみを送信する。   The data processing apparatus 1 includes the entire firmware stored in the storage areas FB, F-K1, F-K2, FP, and FF of the flash ROM 8, that is, the storage areas FB, F Naturally, it is possible to update all of the data of -K1, F-K2, FP, and FF, but it is also possible to update only data in a part of the storage area. When updating only a part of each storage area of the FlashROM 8, the client PC 5 rewrites the storage areas FB, F-K1, F-K2, FP, and FF of the FlashROM 8. Only rewrite data corresponding to the storage area that requires is transmitted.

以下、FlashROM8の第1カーネル領域F−K1及び第2カーネル領域F−K2のデータのみをアップデートするための書き換えデータ(以下、「K領域用書き換えデータ」という。)を例としてクライアントPC5から送信される書き換えデータについて、図3に基づいて説明する。このK領域用書き換えデータは、図3に示すようにFlashROM8の第1カーネル領域F−K1及び第2カーネル領域F−K2に記憶されているデータと同様に、カーネルプログラムのデータに適当なデータサイズの空きデータとから構成されており、そのデータサイズは第1カーネル領域F−K1又は第2カーネル領域F−K2のサイズと等しい248kBである。このように、書き換え用のカーネルプログラムに適当なサイズの空きデータを付加することにより、カーネルプログラムのデータサイズが変動したとしても、常に第1カーネル領域F−K1又は第2カーネル領域F−K2のサイズと同じデータサイズのK領域用書き換えデータをデータ処理装置1に送信することができる。   Hereinafter, rewrite data for updating only the data in the first kernel area F-K1 and the second kernel area F-K2 of the FlashROM 8 (hereinafter referred to as “K area rewrite data”) is transmitted from the client PC 5 as an example. The rewritten data will be described with reference to FIG. As shown in FIG. 3, the rewrite data for the K area has an appropriate data size for the kernel program data, similarly to the data stored in the first kernel area F-K1 and the second kernel area F-K2 of the FlashROM 8. The data size is 248 kB which is equal to the size of the first kernel area F-K1 or the second kernel area F-K2. Thus, even if the data size of the kernel program is changed by adding free data of an appropriate size to the rewriting kernel program, the first kernel area F-K1 or the second kernel area F-K2 is always changed. The rewrite data for the K area having the same data size as the size can be transmitted to the data processing device 1.

このようにして作成されたK領域用書き換えデータがデータ処理装置1に送信された場合、データ処理装置1は、K領域用書き換えデータを受信した後、一旦SDRAM9のデータ領域SD−Dに格納する。そして、FlashROM8の第1カーネル領域F−K1及び第2カーネル領域2のカーネルプログラムをデータ領域SD−Dに格納したK領域用書き換えデータで書き換える。この書き換えに際して、書き換えを行う前に書き換えデータが正常であるか否かを判断し、書き換えを行った後に書き換えられたデータが正常であるか否かを判断する。このデータが正常であるか否かの判断では、所定の誤り検出データ作成手順に基づいて演算処理を行ってデータ検査を実行する。具体的には、データ処理装置1の制御部6は、チェックサム(Check Sum)によるデータ検査(サムチェック)を行う。そのため、クライアントPC5から送信される書き換えデータには、書き換えデータを構成する各データを数値として加算し、その総和の値から一定の計算をして求めた誤り検出データ(以下、「チェッカ」という。)が埋め込まれている。   When the K area rewrite data created in this way is transmitted to the data processing apparatus 1, the data processing apparatus 1 receives the K area rewrite data and then temporarily stores it in the data area SD-D of the SDRAM 9. . Then, the kernel programs in the first kernel area F-K1 and the second kernel area 2 of the Flash ROM 8 are rewritten with the K area rewrite data stored in the data area SD-D. At the time of this rewriting, it is determined whether or not the rewritten data is normal before rewriting, and it is determined whether or not the rewritten data is normal after rewriting. In determining whether or not the data is normal, a data check is performed by performing arithmetic processing based on a predetermined error detection data creation procedure. Specifically, the control unit 6 of the data processing apparatus 1 performs a data check (sum check) using a check sum. Therefore, the error detection data (hereinafter referred to as “checker”) obtained by adding each data constituting the rewrite data as a numerical value to the rewrite data transmitted from the client PC 5 and performing a certain calculation from the total value. ) Is embedded.

この書き換えデータに埋め込まれる1個のチェッカで表すことのできるデータの領域サイズをNとすると、領域サイズNは任意に設定することができるが、領域サイズNを無限大に設定した場合、いかなるデータサイズの書き換えデータであっても埋め込まれるチェッカの個数は1個である。しかし、データ処理装置1においてサムチェックを行う場合に、書き換えデータのどの部分において書き換えエラーが発生したかを特定できるようにするため、ここでは一例としてNの値は1024kBに設定されている。そして、書き換えデータのデータサイズをMとすると、書き換えデータのデータサイズMが領域サイズN以下である場合にはその書き換えデータに1個のチェッカを埋め込み、データサイズMが領域サイズNを越える場合には領域サイズNに基づいてその書き換えデータを複数の部分領域に分割し、各部分領域毎にチェッカの値を算出し、書き換えデータの後端に算出した複数のチェッカを埋め込む。   If the area size of data that can be represented by one checker embedded in the rewrite data is N, the area size N can be set arbitrarily, but if the area size N is set to infinity, any data The number of checkers to be embedded is one even for rewritten data of size. However, when performing a sum check in the data processing apparatus 1, the value of N is set to 1024 kB as an example in order to be able to specify in which part of the rewrite data the rewrite error has occurred. When the data size of the rewrite data is M, if the data size M of the rewrite data is equal to or smaller than the area size N, one checker is embedded in the rewrite data, and the data size M exceeds the area size N. Divides the rewrite data into a plurality of partial areas based on the area size N, calculates a checker value for each partial area, and embeds the calculated checkers at the rear end of the rewrite data.

そこで、書き換えデータにチェッカを埋め込む場合、まず予め設定されている領域サイズNと送信すべき書き換えデータのデータサイズMから埋め込むチェッカの個数でもある部分領域数cを算出する。図3に示すように、書き換えデータがK領域用書き換えデータである場合には、書き換えデータのデータサイズMが248kBであり、領域サイズNの値である1024kB以下であるため、部分領域数cは「1」でありこの書き換えデータには1個のチェッカが埋め込まれる。   Therefore, when the checker is embedded in the rewrite data, first, the number of partial areas c which is also the number of checkers to be embedded is calculated from the preset area size N and the data size M of the rewrite data to be transmitted. As shown in FIG. 3, when the rewrite data is K area rewrite data, the data size M of the rewrite data is 248 kB, and the area size N is 1024 kB or less. “1”, and one checker is embedded in the rewritten data.

次に、算出した部分領域数cに基づいて各部分領域のデータを加算してサム値を算出する。なお、ここでは、部分領域数cは1であるため、書き換えデータを複数の部分領域に分割することなく248kBのデータサイズの書き換えデータを部分領域としてデータに対してサム値Sを算出する。具体的には、248kBのK領域用書き換えデータを構成する全データを数値として先頭部分から加算してその総和を算出する。このようにして全てのデータの総和からサム値Sを算出することができるが、ここでは1個のチェッカのデータサイズbが2バイトであり、書き換えデータの最後の2バイトにチェッカを埋め込むため、最後の2バイトに元々あった値vをサム値Sから差引く。そして、このようにして求めたS−vを反転させた値−(S−v)をチェッカの値として書き換えデータの最後の2バイトに埋め込む。なお、ここでは、K領域用書き換えデータの最後の2バイトに元々あった値vを−(S−v)の値のチェッカに書き換えているが、チェッカに書き換える部分のvの値は空きデータの値であるため、チェッカを埋め込んだとしても書き換えデータの内容(ここでは、カーネルプログラム)が変化することはない。すなわち、書き換えデータの内容に影響を与えることなくチェッカを埋め込むことができる。 Next, the sum value is calculated by adding the data of each partial area based on the calculated number of partial areas c. Here, since the number of partial areas c is 1, the sum value S 1 is calculated for the data with the rewritten data having a data size of 248 kB as a partial area without dividing the rewritten data into a plurality of partial areas. Specifically, all the data constituting the 248 kB K area rewrite data is added as a numerical value from the top and the sum is calculated. In this way, the sum value S 1 can be calculated from the sum of all data, but here the data size b of one checker is 2 bytes, and the checker is embedded in the last 2 bytes of the rewritten data. Subtract the value v 1 originally in the last 2 bytes from the sum value S 1 . Then, the value-(S 1 -v 1 ) obtained by inverting S 1 -v 1 obtained in this way is embedded as the checker value in the last two bytes of the rewrite data. Note that here, the value v 1 originally in the last two bytes of the rewrite data for the K area is rewritten to a checker having a value of − (S 1 −v 1 ), but the value of v 1 of the portion to be rewritten to the checker Is a value of empty data, so even if the checker is embedded, the content of the rewritten data (here, the kernel program) does not change. That is, the checker can be embedded without affecting the contents of the rewritten data.

以上に説明したように、書き換えデータのデータサイズMが1個のチェッカで表すことのできる領域サイズN以下である場合には、書き換えデータには1個のチェッカが埋め込まれる。一方、データサイズMが領域サイズNを越える場合には、書き換えデータには複数のチェッカが埋め込まれる。例えば、図4に例示するように書き換えデータが、FlashROM8の一般プログラム領域のデータを書き換えるためのP領域用書き換えデータである場合、そのデータサイズMは2816kBであり、領域サイズNの値である1024kBを越えており、部分領域数cは3となる。そして、算出した部分領域数cに対応する部分領域を図4に示すように、部分領域X、部分領域Y、及び、部分領域Zのように設定する。ここでは、複数の部分領域のうち、最初の部分領域である部分領域Xが端数を受け持つように部分領域Xのデータサイズを768kBに設定し、部分領域Y、及び、部分領域Zのデータサイズを領域サイズNと等しい1024kBに設定する。   As described above, when the data size M of the rewrite data is equal to or smaller than the area size N that can be represented by one checker, one checker is embedded in the rewrite data. On the other hand, when the data size M exceeds the region size N, a plurality of checkers are embedded in the rewritten data. For example, as shown in FIG. 4, when the rewrite data is rewrite data for P area for rewriting data in the general program area of the FlashROM 8, the data size M is 2816 kB and the area size N is 1024 kB. And the number of partial areas c is 3. Then, the partial areas corresponding to the calculated number c of partial areas are set as a partial area X, a partial area Y, and a partial area Z as shown in FIG. Here, among the plurality of partial areas, the data size of the partial area X is set to 768 kB so that the partial area X which is the first partial area is responsible for fractions, and the data sizes of the partial area Y and the partial area Z are set to It is set to 1024 kB which is equal to the area size N.

このようにして、部分領域X乃至Zを設定した後、まず部分領域Xについてサム値を算出するが、サム値を算出して各部分領域毎にチェッカを埋め込むと、各部分領域、ここでは部分領域X、及び、部分領域Yのデータの内容が変化してしまう。そこで、部分領域X乃至Zのチェッカは、空きデータが付加されている最後の部分領域Zの後端に埋め込む。具体的には、部分領域Xと部分領域Yについて、それぞれ算出した各領域のサム値をそのまま反転させてチェッカとして埋め込む。すなわち、図4に示すように、768kBの部分領域Xの全データの総和であるサム値Sを算出し、これを反転させた−Sの値を部分領域Xのチェッカとして部分領域Zにおけるチェッカ領域の先頭に埋め込む。ここで、チェッカ領域の先頭は、1個のチェッカのデータサイズbと、書き換えデータのデータサイズMと、部分領域数(チェッカの個数)cとに基づいて、M−c×bの関係式から算出することができる。 After setting the partial areas X to Z in this way, first, the sum value is calculated for the partial area X. When the sum value is calculated and the checker is embedded for each partial area, The contents of the data in the area X and the partial area Y change. Therefore, the checkers of the partial areas X to Z are embedded at the rear end of the last partial area Z to which empty data is added. Specifically, for the partial areas X and Y, the calculated sum values of the respective areas are inverted as they are and embedded as checkers. That is, as shown in FIG. 4, the sum value S 2 that is the sum of all the data in the partial area X of 768 kB is calculated, and the inverted value −S 2 is used as a checker for the partial area X. Embed at the beginning of the checker area. Here, the head of the checker area is based on a relational expression of M−c × b based on the data size b of one checker, the data size M of rewrite data, and the number of partial areas (number of checkers) c. Can be calculated.

このようにして部分領域Xのチェッカを埋め込んだ後、部分領域Yについても同様にサム値Sを算出し、算出したサム値をそのまま反転させた値−Sを部分領域Yのチェッカとして部分領域Zにおける部分領域Xのチェッカの次の2バイトに埋め込む。そして、最後の部分領域である部分領域Zのサム値Sから求めたチェッカを部分領域Zの最後の2バイトに埋め込むが、この部分領域Zには、前記部分領域X及び、Yのチェッカと部分領域Zのチェッカの3個のチェッカを埋め込むためのチェッカ領域が存在するため、部分領域Zの全データの総和であるサム値Sからチェッカ領域に元々存在したデータ、すなわち、書き換えデータの最後の6バイト分のデータの総和であるvを部分領域を設定した段階で算出しておき、サム値Sから差引く。そして、これを反転させた値−(S−v)を部分領域Zのチェッカとして部分領域Zの最後の2バイトに埋め込む。 After embedding the checker of the thus partial region X, part similarly calculates a sum value S 3 also partial region Y, as the value -S 3 obtained by inverting the calculated sum value as a checker subregion Y It is embedded in the next 2 bytes of the checker of the partial area X in the area Z. And while embedding the checker determined from sum value S 4 of the partial region Z is the last partial area in the last two bytes of the partial region Z, in this portion region Z, the partial region X and a Y checker since the checker area for embedding the three checker checker partial region Z is present, the partial region Z of the entire data of the sum is a sum value S 4 originally present data to the checker area from, i.e., the last rewrite data the v 2 which is the sum of the data of 6 bytes previously calculated at the stage of setting the partial region is subtracted from the sum value S 4. Then, the inverted value-(S 4 -v 2 ) is embedded in the last two bytes of the partial area Z as a checker for the partial area Z.

以上に説明したように、実データに適当なデータサイズの空きデータが付加された書き換えデータに、該書き換えデータのデータサイズMに基づいて1又は複数のチェッカが埋め込まれるが、ブート領域F−Bのデータを書き換えるためのB領域用書き換えデータ及び、フォント領域F−Fのデータを書き換えるためのF領域用書き換えデータについても同様に書き換えデータを作成してチェッカを埋め込むことができる。そして、このようにチェッカが埋め込まれた後、書き換えが必要な記憶領域の書き換えデータのみがクライアントPC5から送信される。例えば、一般プログラム領域F−Pのデータのみ書き換えが必要な場合には、P領域用書き換えデータのみからなる2816kBの書き換えデータが送信され、第1カーネル領域F−K1及び第2カーネル領域F−K2、並びに、一般プログラム領域F−Pのデータについて書き換えが必要な場合には、K領域用書き換えデータとP領域用書き換えデータとからなる3064kBの書き換えデータがクライアントPC5から送信される。   As described above, one or a plurality of checkers are embedded in the rewrite data in which empty data of an appropriate data size is added to the actual data based on the data size M of the rewrite data, but the boot area FB Similarly, the rewrite data can be created and the checker can be embedded with respect to the rewrite data for the B area for rewriting the data of F and the rewrite data for the F area for rewriting the data of the font area FF. After the checker is embedded in this way, only rewrite data in a storage area that needs to be rewritten is transmitted from the client PC 5. For example, when only the data in the general program area FP needs to be rewritten, 2816 kB of rewrite data consisting only of the P area rewrite data is transmitted, and the first kernel area F-K1 and the second kernel area F-K2 are transmitted. In addition, when the data in the general program area FP needs to be rewritten, 3064 kB rewrite data including the K area rewrite data and the P area rewrite data is transmitted from the client PC 5.

次に、以上に説明したようにチェッカを用いて書き換えデータが正常であるか否かを判断するデータ検査の方法について説明する。以下においては、書き換えデータによって書き換えられた後のFlashROM8の記憶領域のデータが正常であるか否かを判断するデータ検査の場合について説明するが、書き換え前に一旦SDRAM9のデータ領域SD−Dに記憶されている書き換えデータが正常であるか否かを判断するデータ検査の場合も同様にして実行できる。   Next, a data inspection method for determining whether or not rewritten data is normal using a checker as described above will be described. In the following, a case of data inspection for determining whether or not the data in the storage area of the FlashROM 8 after being rewritten by the rewrite data is normal will be described, but once stored in the data area SD-D of the SDRAM 9 before rewriting. The same can be performed in the case of data inspection for determining whether or not the rewritten data being normal is normal.

まず、書き換えデータによる自装置1のファームウェアの書き換え処理が終了した後、書き換えた記憶領域のサイズM及び、1個のチェッカで表すことができる領域サイズNからサムチェックを行う対象領域の部分領域数cを算出し、部分領域を設定する。ここで、対象領域は、FlashROM8の記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fのうちの書き換えデータに書き換えた記憶領域であり、複数の記憶領域に対して書き換えを行った場合には、まず、その複数の記憶領域のうちのいずれか1つの記憶領域を対象領域してサムチェックを行う。上述したように、対象領域のデータ(書き換えデータ)には、サムチェックを行う部分領域の数と等しい数のチェッカが埋め込まれている。書き換えたFlashROM8の記憶領域のサイズMと該記憶領域のデータを書き換えた書き換えデータのデータサイズは等しいため、対象領域のデータを書き換えた書き換えデータのデータサイズについてもMで表すことができる。   First, after the rewriting process of the firmware of the own device 1 by the rewriting data is completed, the number of partial areas of the target area to be sum-checked from the rewritten storage area size M and the area size N that can be represented by one checker c is calculated and a partial region is set. Here, the target area is a storage area that has been rewritten to rewritten data among the storage areas FB, F-K1, F-K2, FP, and FF of the flash ROM 8, and includes a plurality of storage areas. When rewriting is performed, first, a sum check is performed on any one of the plurality of storage areas as a target area. As described above, the number of checkers equal to the number of partial areas to be sum-checked is embedded in the target area data (rewrite data). Since the size M of the storage area of the rewritten FlashROM 8 is equal to the data size of the rewrite data obtained by rewriting the data in the storage area, the data size of the rewrite data obtained by rewriting the data in the target area can be represented by M.

例えば、図5に示すように対象領域が2816kBの一般プログラム領域F−Pである場合には、対象領域のサイズ、すなわち一般プログラム領域F−Pを書き換えたP領域用書き換えデータのデータサイズMが1個のチェッカで表すことができる領域サイズN(1024kB)を越えており、部分領域数cは3である。そして、図4と同様に一般プログラム領域F−Pを768kBの部分領域X、1024kBの部分領域Y、1024kBの部分領域Zの3つの部分領域を設定する。なお、ここでも複数の部分領域のうち、先頭の部分領域が端数を受け持つように各部分領域のサイズが設定される。   For example, as shown in FIG. 5, when the target area is a general program area FP of 2816 kB, the size of the target area, that is, the data size M of the P area rewrite data obtained by rewriting the general program area FP is set. The area size N (1024 kB) that can be represented by one checker is exceeded, and the number of partial areas c is 3. Then, in the same way as in FIG. 4, the general program area FP is set with three partial areas, a partial area X of 768 kB, a partial area Y of 1024 kB, and a partial area Z of 1024 kB. Here, the size of each partial area is set so that the top partial area of the plurality of partial areas is responsible for fractions.

そして、対象領域におけるチェッカ領域からチェッカを読み出す。対象領域におけるチェッカ領域の先頭アドレスDは、対象領域の先頭アドレスをA、対象領域(書き換えた記憶領域)のサイズM、チェッカの個数(部分領域数)c、1個のチェッカのデータサイズbに基づいて、D=A+M−c×bの関係式から算出することができる。この関係式からチェッカ領域の先頭アドレスDを算出してチェッカの位置を特定し、その先頭アドレスD以降のデータをチェッカの値として読み出す。ここで、図5に示す一般プログラム領域F−Pの場合には、部分領域Xのチェッカと部分領域Yのチェッカと部分領域Zのチェッカの3つのチェッカの値を読み出すことができる。なお、1個のチェッカで表すことができる領域サイズNと1個のチェッカのデータサイズbは、第1カーネル領域F−K1又は第2カーネル領域F−K2に記憶されているデータチェックコードによって予め設定されている。1個のチェッカで表すことができる領域サイズNと1個のチェッカのデータサイズbは、書き換えデータにチェッカを埋め込む際の領域サイズとデータサイズに等しい値がそれぞれ設定されており、例えば、領域サイズNが1024kB、データサイズbが2バイトである。   Then, the checker is read from the checker area in the target area. The start address D of the checker area in the target area is set such that the start address of the target area is A, the size M of the target area (rewritten storage area), the number of checkers (number of partial areas) c, and the data size b of one checker. Based on the relational expression, D = A + M−c × b. From this relational expression, the head address D of the checker area is calculated, the position of the checker is specified, and data after the head address D is read as the value of the checker. Here, in the case of the general program area FP shown in FIG. 5, the values of the three checkers of the checker of the partial area X, the checker of the partial area Y, and the checker of the partial area Z can be read. Note that the area size N that can be represented by one checker and the data size b of one checker are determined in advance by the data check code stored in the first kernel area F-K1 or the second kernel area F-K2. Is set. The area size N that can be represented by one checker and the data size b of one checker are respectively set to values equal to the area size and data size when the checker is embedded in the rewrite data. N is 1024 kB and the data size b is 2 bytes.

次に、部分領域の先頭アドレスとサイズに基づいてサム値を計算する。例えば、一般プログラム領域F−Pのように、3つの部分領域が設定されている場合、まず、部分領域Xの先頭アドレス、すなわち、対象領域の先頭アドレスAから768kBの部分領域Xの全データを数値として加算してサム値を計算する。そして、計算したサム値とチェッカの値の和がゼロになるか否かを判断する。サム値とチェッカの値の和がゼロである場合には、部分領域に誤りはないと判断し、ゼロでない場合には部分領域に誤りがあると判断する。すべての部分領域(部分領域X,Y,Z)についてサムチェックを行い、すべての部分領域に誤りがない場合に、当該対象領域のデータが正常であると判断する。   Next, the sum value is calculated based on the start address and size of the partial area. For example, when three partial areas are set as in the general program area FP, first, the top address of the partial area X, that is, all data in the partial area X from the start address A of the target area to 768 kB Add the numbers and calculate the sum value. Then, it is determined whether or not the sum of the calculated sum value and the checker value becomes zero. When the sum of the sum value and the checker value is zero, it is determined that there is no error in the partial area, and when it is not zero, it is determined that there is an error in the partial area. Sum check is performed on all partial areas (partial areas X, Y, and Z), and if all partial areas have no error, it is determined that the data in the target area is normal.

以下に、図6及び図7を用いて、クライアントPC5から送信された書き換えデータに基づいてデータ処理装置1のFlashROM8に記憶されているファームウェアをアップデート(書き換え)する場合に、データ処理装置1の制御部6が実行する処理(ファームウェアの書き換え方法)について説明する。データ処理装置1の制御部6は、FlashROM8の第1カーネル領域F−K1又は第2カーネル領域F−K2からSDRAM9の第1カーネル領域SD−K1に読み込まれたカーネルプログラムに従って処理を実行する。FlashROM8に記憶されているファームウェアは、ブート領域F−B、第1カーネル領域F−K1、第2カーネル領域F−K2、一般プログラム領域F−P、フォント領域F−F毎にそれぞれ単独でアップデート(書き換え)可能であるが、以下には、第1カーネル領域F−K1、第2カーネル領域F−K2、一般プログラム領域F−P、フォント領域F−Fをアップデート(書き換え)する場合について説明する。なお、図6及び図7に示す各処理の実行順序は図示するものに限定されるものではなく、処理の実行順序を変更しても本発明を実現できる場合には適宜に変更してもよい。   Hereinafter, the control of the data processing apparatus 1 when updating (rewriting) the firmware stored in the flash ROM 8 of the data processing apparatus 1 based on the rewriting data transmitted from the client PC 5 with reference to FIGS. 6 and 7. A process (firmware rewriting method) executed by the unit 6 will be described. The control unit 6 of the data processing device 1 executes processing according to the kernel program read from the first kernel area F-K1 or the second kernel area F-K2 of the FlashROM 8 to the first kernel area SD-K1 of the SDRAM 9. The firmware stored in the flash ROM 8 is updated independently for each of the boot area F-B, the first kernel area F-K1, the second kernel area F-K2, the general program area FP, and the font area FF ( In the following, a case where the first kernel area F-K1, the second kernel area F-K2, the general program area FP, and the font area FF are updated (rewritten) will be described. 6 and FIG. 7 are not limited to those shown in the drawings, and may be changed as appropriate when the present invention can be realized even if the execution order of the processes is changed. .

まず、制御部6は、クライアントPC5から送信され、一時的にSDRAM9のデータ領域SD−Dに記憶されている書き換えデータの正当性のチェックを行う(S101)。この正当性のチェックでは、SDRAM9のデータ領域SD−Dに記憶されているデータが書き換えデータであるか否かのチェックと書き換えデータが正常であるか否かのチェックを行う。FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラム、及び、第2カーネル領域F−K2に記憶されているカーネルプログラムには、図8に示すような、書き換えデータのデータサイズとFlashROM8の各記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fとを対応付けたテーブルが含まれている。したがって、制御部6は、受信してSDRAM9のデータ領域SD−Dに記憶されているデータのデータサイズが図8に示すデータサイズのいずれかであるか否かによって、受信したデータが書き換えデータであるか否かを判断することができる。例えば、受信した書き換えデータのデータサイズが248kBであれば、書き換えデータは第1カーネル領域F−K1及び第2カーネル領域F−K2のデータを書き換えるためのK領域用書き換えデータであると判断し、また、受信した書き換えデータのデータサイズが7936kBであれば、書き換えデータは一般プログラム領域F−Pのデータを書き換えるためのP領域用書き換えデータとフォント領域F−Fのデータを書き換えるためのF領域用書き換えデータであると判断する。受信した書き換えデータが正常であるか否かは、上述したチェッカを用いたサムチェックによってチェックする。   First, the control unit 6 checks the validity of the rewrite data transmitted from the client PC 5 and temporarily stored in the data area SD-D of the SDRAM 9 (S101). In this validity check, whether or not the data stored in the data area SD-D of the SDRAM 9 is rewrite data and whether or not the rewrite data is normal are checked. The kernel program stored in the first kernel area F-K1 of the flash ROM 8 and the kernel program stored in the second kernel area F-K2 include the data size of the rewrite data and the flash ROM 8 as shown in FIG. A table in which each storage area FB, F-K1, F-K2, FP, and FF is associated with each other is included. Therefore, the control unit 6 determines that the received data is rewritten data depending on whether the data size of the data received and stored in the data area SD-D of the SDRAM 9 is one of the data sizes shown in FIG. It can be determined whether or not there is. For example, if the data size of the received rewrite data is 248 kB, it is determined that the rewrite data is rewrite data for the K area for rewriting the data in the first kernel area F-K1 and the second kernel area F-K2. If the data size of the received rewrite data is 7936 kB, the rewrite data is for the P area rewrite data for rewriting the data in the general program area FP and for the F area for rewriting the data in the font area FF. Judged as rewritten data. Whether the received rewrite data is normal or not is checked by the sum check using the checker described above.

そして、書き換えデータが正当であるか否かを判断する(S102)。受信したデータが書き換えデータであり、かつ、書き換えデータが正常である場合に書き換えデータが正当であると判断する。書き換えデータが正当でないと判断すると(S102:NO)、所定のエラー処理を行う(S129)。一方、書き換えデータが正当であると判断すると(S102:YES)、FlashROM8の第1カーネル領域F−K1に現時点で記憶されているカーネルプログラムが正常であるか(破損しているか)否かのチェックを行い(S103)、チェックの結果に基づいて当該カーネルプログラムが正常であるか否かを判断する(S104)。カーネルプログラムが正常であるか否かのチェックは、上述したチェッカを用いたサムチェックによって行う。   Then, it is determined whether the rewritten data is valid (S102). When the received data is rewrite data and the rewrite data is normal, it is determined that the rewrite data is valid. If it is determined that the rewritten data is not valid (S102: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the rewritten data is valid (S102: YES), whether or not the kernel program currently stored in the first kernel area F-K1 of the FlashROM 8 is normal (is damaged) is checked. (S103), and based on the check result, it is determined whether or not the kernel program is normal (S104). Whether the kernel program is normal is checked by a sum check using the checker described above.

第1カーネル領域F−K1に記憶されているカーネルプログラムが正常でないと判断すると(S104:NO)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータからカーネルプログラムの書き換えデータを読み出し、FlashROM8の第1カーネル領域F−K1を書き換える(S105)。そして、チェッカを用いたサムチェックによりFlashROM8の第1カーネル領域F−K1に書き込まれたカーネルプログラムが正常であるか否かをチェックし(S106)、当該カーネルプログラムが正常であるか否かを判断する(S107)。   If it is determined that the kernel program stored in the first kernel area F-K1 is not normal (S104: NO), the rewrite data of the kernel program is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the FlashROM 8 The first kernel area F-K1 is rewritten (S105). Then, it is checked whether the kernel program written in the first kernel area F-K1 of the FlashROM 8 is normal by a sum check using a checker (S106), and it is determined whether the kernel program is normal. (S107).

FlashROM8の第1カーネル領域F−K1に書き込まれたカーネルプログラムが正常でないと判断すると(S107:NO)、所定のエラー処理を行う(S129)。一方、当該カーネルプログラムが正常であると判断すると(S107:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータから一般プログラムの書き換えデータを読み出し、FlashROM8の一般プログラム領域F−Pを書き換える(S108)。そして、チェッカを用いたチェックサムによりFlashROM8の一般プログラム領域F−Pに書き込まれた一般プログラムが正常であるか否かをチェックし(S109)、当該一般プログラムが正常であるか否かを判断する(S110)。   If it is determined that the kernel program written in the first kernel area F-K1 of the FlashROM 8 is not normal (S107: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the kernel program is normal (S107: YES), the rewrite data of the general program is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the general program area FP of the FlashROM 8 is read. Rewrite (S108). Then, it is checked whether or not the general program written in the general program area FP of the FlashROM 8 is normal by a checksum using a checker (S109), and it is determined whether or not the general program is normal. (S110).

FlashROM8の一般プログラム領域F−Pに書き込まれた一般プログラムが正常でないと判断すると(S110:NO)、所定のエラー処理を行う(S129)。一方、当該一般プログラムが正常であると判断すると(S110:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータからフォントデータの書き換えデータを読み出し、FlashROM8のフォント領域F−Fを書き換える(S111)。そして、チェッカを用いたサムチェックによりFlashROM8のフォント領域F−Fに書き込まれたフォントデータが正常であるか否かをチェックし(S112)、当該フォントデータが正常であるか否かを判断する(S113)。   If it is determined that the general program written in the general program area FP of the FlashROM 8 is not normal (S110: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the general program is normal (S110: YES), the rewrite data of the font data is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the font area FF of the FlashROM 8 is rewritten. (S111). Then, it is checked whether or not the font data written in the font area FF of the FlashROM 8 is normal by a sum check using a checker (S112), and it is determined whether or not the font data is normal (S112). S113).

FlashROM8のフォント領域F−Fに書き込まれたフォントデータが正常でないと判断すると(S113:NO)、所定のエラー処理を行う(S129)。一方、当該フォントデータが正常であると判断すると(S113:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータからカーネルプログラムの書き換えデータを読み出し、FlashROM8の第2カーネル領域F−K2を書き換える(S114)。そして、チェッカを用いたサムチェックによりFlashROM8の第2カーネル領域F−K2に書き込まれたカーネルプログラムが正常であるか否かをチェックし(S115)、当該カーネルプログラムが正常であるか否かを判断する(S116)。当該カーネルプログラムが正常でないと判断すると(S116:NO)、所定のエラー処理を行う(S129)。一方、当該カーネルプログラムが正常であると判断すると(S116:YES)、ファームウェアの書き換え処理を終了する。   If it is determined that the font data written in the font area FF of the FlashROM 8 is not normal (S113: NO), predetermined error processing is performed (S129). On the other hand, when it is determined that the font data is normal (S113: YES), the rewrite data of the kernel program is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the second kernel area F-K2 of the FlashROM 8 is read. Is rewritten (S114). Then, it is checked whether or not the kernel program written in the second kernel area F-K2 of the FlashROM 8 is normal by a sum check using a checker (S115), and it is determined whether or not the kernel program is normal. (S116). If it is determined that the kernel program is not normal (S116: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the kernel program is normal (S116: YES), the firmware rewriting process is terminated.

ステップS104において、FlashROM8の第1カーネル領域F−K1に現時点で記憶されているカーネルプログラムが正常であると判断すると(S104:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータから一般プログラムの書き換えデータを読み出し、FlashROM8の一般プログラム領域F−Pを書き換える(S117)。そして、チェッカを用いたサムチェックによりFlashROM8の一般プログラム領域F−Pに書き込まれた一般プログラムが正常であるか否かをチェックし(S118)、当該一般プログラムが正常であるか否かを判断する(S119)。   If it is determined in step S104 that the kernel program currently stored in the first kernel area F-K1 of the FlashROM 8 is normal (S104: YES), the rewrite data stored in the data area SD-D of the SDRAM 9 is used. The rewrite data of the general program is read, and the general program area FP of the FlashROM 8 is rewritten (S117). Then, it is checked whether or not the general program written in the general program area FP of the FlashROM 8 is normal by a sum check using a checker (S118), and it is determined whether or not the general program is normal. (S119).

FlashROM8の一般プログラム領域F−Pに書き込まれた一般プログラムが正常でないと判断すると(S119:NO)、所定のエラー処理を行う(S129)。一方、当該一般プログラムが正常であると判断すると(S119:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータからフォントデータの書き換えデータを読み出し、FlashROM8のフォント領域F−Fを書き換える(S120)。そして、チェッカを用いたサムチェックによりFlashROM8のフォント領域F−Fに書き込まれたフォントデータが正常であるか否かをチェックし(S121)、当該フォントデータが正常であるか否かを判断する(S122)。   If it is determined that the general program written in the general program area FP of the FlashROM 8 is not normal (S119: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the general program is normal (S119: YES), the rewrite data of the font data is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the font area FF of the FlashROM 8 is rewritten. (S120). Then, it is checked whether the font data written in the font area FF of the FlashROM 8 is normal by a sum check using a checker (S121), and it is determined whether the font data is normal (S121). S122).

FlashROM8のフォント領域F−Fに書き込まれたフォントデータが正常でないと判断すると(S122:NO)、所定のエラー処理を行う(S129)。一方、当該フォントデータが正常であると判断すると(S112:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータからカーネルプログラムの書き換えデータを読み出し、FlashROM8の第2カーネル領域F−K2を書き換える(S123)。そして、チェッカを用いたサムチェックによりFlashROM8の第2カーネル領域F−K2に書き込まれたカーネルプログラムが正常であるか否かをチェックし(S124)、当該カーネルプログラムが正常であるか否かを判断する(S125)。   If it is determined that the font data written in the font area FF of the FlashROM 8 is not normal (S122: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the font data is normal (S112: YES), the kernel program rewrite data is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the second kernel area F-K2 of the FlashROM 8 is read. Is rewritten (S123). Then, it is checked whether the kernel program written in the second kernel area F-K2 of the FlashROM 8 is normal by a sum check using a checker (S124), and it is determined whether the kernel program is normal. (S125).

FlashROM8の第2カーネル領域F−K2に書き込まれたカーネルプログラムが正常でないと判断すると(S125:NO)、所定のエラー処理を行う(S129)。一方、当該カーネルデータが正常であると判断すると(S125:YES)、SDRAM9のデータ領域SD−Dに記憶されている書き換えデータからカーネルプログラムの書き換えデータを読み出し、FlashROM8の第1カーネル領域F−K1を書き換える(S126)。そして、チェッカを用いたサムチェックによりFlashROM8の第1カーネル領域F−K1に書き込まれたカーネルプログラムが正常であるか否かをチェックし(S127)、当該カーネルプログラムが正常であるか否かを判断する(S128)。当該カーネルプログラムが正常でないと判断すると(S128:NO)、所定のエラー処理を行う(S129)。一方、当該カーネルプログラムが正常であると判断すると(S128:YES)、ファームウェアの書き換え処理を終了する。   If it is determined that the kernel program written in the second kernel area F-K2 of the FlashROM 8 is not normal (S125: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the kernel data is normal (S125: YES), the rewrite data of the kernel program is read from the rewrite data stored in the data area SD-D of the SDRAM 9, and the first kernel area F-K1 of the FlashROM 8 is read. Is rewritten (S126). Then, it is checked whether or not the kernel program written in the first kernel area F-K1 of the FlashROM 8 is normal by a sum check using a checker (S127), and it is determined whether or not the kernel program is normal. (S128). If it is determined that the kernel program is not normal (S128: NO), predetermined error processing is performed (S129). On the other hand, if it is determined that the kernel program is normal (S128: YES), the firmware rewriting process is terminated.

このように、データ処理装置1では、ファームウェアを、データの種類別に分割してFlashROM8の各記憶領域F−B、F−K1、F−K2、F−P、及び、F−Fに記憶し、書き換えデータによってファームウェアをアップデートする際には、FlashROM8の各記憶領域F−B、F−K1、F−K2、F−P、及び、F−F毎にデータの書き換えを行う。そして、書き換えデータに含まれるカーネルプログラムを、FlashROM8の第1カーネル領域F−K1と第2カーネル領域F−K2との2箇所に書き込む。このような方法によってファームウェアのアップデート(書き換え)を行うと、アップデート中の停電などによりデータ処理装置1に電源断が発生した場合でも、第1カーネル領域F−K1のカーネルプログラムと第2カーネル領域F−K2のカーネルプログラムとが一度に破損することを防止することができる。つまり、例えば、第1カーネル領域F−K1のカーネルプログラムの書き換えを行った後に、第2カーネル領域F−K2のカーネルプログラムの書き換えを行う場合において、第1カーネル領域F−K1のカーネルプログラムの書き換え中に電源断が発生して当該カーネルプログラムが破損した際には、第2カーネル領域F−K2にアップデート前の古いカーネルプログラムが記憶されているので当該カーネルプログラムを実行することによってデータ処理装置1を正常に機能させることができる。また、第2カーネル領域F−K2のカーネルプログラムの書き換え中に電源断が発生して当該カーネルプログラムが破損した際には、第1カーネル領域F−K1にアップデートされた新たなカーネルプログラムが記憶されているので当該カーネルプログラムを実行することによってデータ処理装置1を正常に機能させることができる。   Thus, in the data processing device 1, the firmware is divided according to the type of data and stored in the storage areas FB, F-K1, F-K2, FP, and FF of the Flash ROM 8, When the firmware is updated with the rewrite data, the data is rewritten for each of the storage areas FB, F-K1, F-K2, FP, and FF of the FlashROM 8. Then, the kernel program included in the rewrite data is written in two locations of the first kernel area F-K1 and the second kernel area F-K2 of the FlashROM 8. When the firmware is updated (rewritten) by such a method, even when the data processing device 1 is powered off due to a power failure or the like during the update, the kernel program in the first kernel area F-K1 and the second kernel area F -K2 kernel program can be prevented from being damaged at once. That is, for example, when the kernel program in the second kernel area F-K1 is rewritten after the kernel program in the first kernel area F-K1 is rewritten, the kernel program in the first kernel area F-K1 is rewritten. When the kernel program is damaged due to power failure, the old kernel program before update is stored in the second kernel area F-K2, and therefore the data processor 1 is executed by executing the kernel program. Can function normally. In addition, when a power interruption occurs during rewriting of the kernel program in the second kernel area F-K2 and the kernel program is damaged, a new kernel program updated in the first kernel area F-K1 is stored. Therefore, the data processing apparatus 1 can function normally by executing the kernel program.

また、FlashROM8の第1カーネル領域F−K1のカーネルプログラム及び第2カーネル領域F−K2のカーネルプログラムの書き換えを行う際に、第1カーネル領域F−K1のカーネルプログラムが破損しているか(正常であるか)否かを判断し、破損している場合には、第2カーネル領域F−K2のカーネルプログラムの書き換えに先立って第1カーネル領域F−K1のカーネルプログラムの書き換えを行う。また、第2カーネル領域F−K2のカーネルプログラムが損傷している場合(図6のステップ104の判断におけるYESの場合に含まれる)には、第1カーネル領域F−K1のカーネルプログラムの書き換えに先立って第2カーネル領域F−K2のカーネルプログラムの書き換えを行う。したがって、第1カーネル領域F−K1のカーネルプログラムと第2カーネル領域F−K2のカーネルプログラムとのどちらかが破損している状態で、第1カーネル領域F−K1のカーネルプログラム及び第2カーネル領域F−K2のカーネルプログラムの書き換えを行う場合に電源断が再び発生した場合でも、第1カーネル領域F−K1又は第2カーネル領域F−K2のどちらかに正常なカーネルプログラムが存在することとなるので、当該正常なカーネルプログラムを実行することによってデータ処理装置1を正常に機能させることができる。   In addition, when the kernel program in the first kernel area F-K1 and the kernel program in the second kernel area F-K2 of the flash ROM 8 are rewritten, the kernel program in the first kernel area F-K1 is damaged (normally If it is damaged, the kernel program in the first kernel area F-K1 is rewritten prior to rewriting the kernel program in the second kernel area F-K2. Further, when the kernel program in the second kernel area F-K2 is damaged (included in the case of YES in the determination of step 104 in FIG. 6), the kernel program in the first kernel area F-K1 is rewritten. First, the kernel program in the second kernel area F-K2 is rewritten. Therefore, the kernel program and the second kernel area in the first kernel area F-K1 are in a state where either the kernel program in the first kernel area F-K1 or the kernel program in the second kernel area F-K2 is damaged. Even when the power interruption occurs again when the F-K2 kernel program is rewritten, a normal kernel program exists in either the first kernel area F-K1 or the second kernel area F-K2. Therefore, the data processing apparatus 1 can function normally by executing the normal kernel program.

次に、図9を用いて、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラム、及び、第2カーネル領域F−K1に記憶されているカーネルプログラムを実行するためにSDRAM9の第1カーネル領域SD−K1及び第2カーネル領域SD−K2に読み込む場合に、データ処理装置1の制御部6が実行する処理(ファームウェアの読み込み方法)について説明する。データ処理装置1の制御部6は、FlashROM8のブート領域F−BからSDRAM9のブート領域SD−Bに読み込まれたブートプログラムに従って処理を実行する。なお、図9に示す各処理の実行順序は図示するものに限定されるものではなく、処理の実行順序を変更しても本発明を実現できる場合には適宜に変更してもよい。   Next, referring to FIG. 9, in order to execute the kernel program stored in the first kernel area F-K1 of the flash ROM 8 and the kernel program stored in the second kernel area F-K1, A process (firmware reading method) executed by the control unit 6 of the data processing apparatus 1 when reading into the 1 kernel area SD-K1 and the second kernel area SD-K2 will be described. The control unit 6 of the data processing apparatus 1 executes processing in accordance with the boot program read from the boot area FB of the FlashROM 8 into the boot area SD-B of the SDRAM 9. Note that the execution order of the processes shown in FIG. 9 is not limited to that shown in the drawing, and may be changed as appropriate when the present invention can be realized even if the execution order of the processes is changed.

まず、データ処理装置1に電源が投入されると、FlashROM8のブート領域F−Bに記憶されているブートプログラムがSDRAM9のブート領域SD−Bに読み込まれ、実行される(S201)。次に、制御部6は、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラムをSDRAM9の第1カーネル領域SD−K1に読み込みつつ、当該カーネルプログラムが正常であるか否かをチェックする(S202)。このカーネルプログラムが正常であるか否かのチェックは、FlashROM8の第1カーネル領域F−K1のチェッカ領域に記憶されているチェッカに基づくサムチェックによって行われる。つまり、制御部6は、FlashROM8の第1カーネル領域F−K1からカーネルプログラムのデータを順次に読み出して第1カーネル領域SD−K1に書き込みつつ、第1カーネル領域F−K1から読み出した各データを数値として加算し、サムチェックのための総和を求める。そして、サムチェックの結果に基づいて、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラム、すなわち、SDRAM9の第1カーネル領域SD−K1に読み込まれたカーネルプログラムが正常であるか否かを判断する(S203)。   First, when the data processing apparatus 1 is powered on, the boot program stored in the boot area FB of the FlashROM 8 is read into the boot area SD-B of the SDRAM 9 and executed (S201). Next, the control unit 6 reads the kernel program stored in the first kernel area F-K1 of the FlashROM 8 into the first kernel area SD-K1 of the SDRAM 9 and checks whether the kernel program is normal. (S202). Whether the kernel program is normal is checked by a sum check based on a checker stored in the checker area of the first kernel area F-K1 of the FlashROM 8. That is, the control unit 6 sequentially reads the data of the kernel program from the first kernel area F-K1 of the flash ROM 8 and writes the data to the first kernel area SD-K1, while reading each data read from the first kernel area F-K1. Add as numbers to find sum for sum check. Based on the result of the sum check, whether or not the kernel program stored in the first kernel area F-K1 of the FlashROM 8, that is, the kernel program read into the first kernel area SD-K1 of the SDRAM 9 is normal. Is determined (S203).

FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラムが正常であると判断すると(S203:YES)、次に、FlashROM8の第2カーネル領域F−K2に記憶されているカーネルプログラムをSDRAM9の第2カーネル領域SD−K2に読み込みつつ、当該カーネルプログラムが正常であるか否かをチェックする(S204)。このカーネルプログラムが正常であるか否かのチェックは、FlashROM8の第2カーネル領域F−K2のチェッカ領域に記憶されているチェッカに基づくサムチェックによって行われる。そして、サムチェックの結果に基づいて、FlashROM8の第2カーネル領域F−K2に記憶されているカーネルプログラム、すなわち、SDRAM9の第2カーネル領域SD−K2に読み込まれたカーネルプログラムが正常であるか否かを判断する(S205)。   If it is determined that the kernel program stored in the first kernel area F-K1 of the FlashROM 8 is normal (S203: YES), then the kernel program stored in the second kernel area F-K2 of the FlashROM 8 is stored in the SDRAM 9 The second kernel area SD-K2 is read while checking whether the kernel program is normal (S204). Whether the kernel program is normal is checked by a sum check based on a checker stored in the checker area of the second kernel area F-K2 of the FlashROM 8. Based on the result of the sum check, whether or not the kernel program stored in the second kernel area F-K2 of the FlashROM 8, that is, the kernel program read into the second kernel area SD-K2 of the SDRAM 9 is normal. Is determined (S205).

FlashROM8の第2カーネル領域F−K2に記憶されているカーネルプログラムが正常でないと判断すると(S205:NO)、第2カーネル領域F−K2のカーネルプログラムが正常であるか否かを記憶するためのF−K2エラーフラグをオン状態にし(S206)、ファームウェア(カーネルプログラム)の読み込み処理を終了する。このF−K2エラーフラグは、例えば、SDRAM9のデータ領域SD−Dなどに設けられた1バイトのデータであり、F−K2エラーフラグの最下位ビットを「1」にすることによってフラグがオン状態となる。一方、第2カーネル領域F−K2に記憶されているカーネルプログラムが正常であると判断すると(S205:YES)、ファームウェア(カーネルプログラム)の読み込み処理を終了する。   If it is determined that the kernel program stored in the second kernel area F-K2 of the FlashROM 8 is not normal (S205: NO), it is stored for determining whether the kernel program in the second kernel area F-K2 is normal. The F-K2 error flag is turned on (S206), and the firmware (kernel program) reading process is terminated. The F-K2 error flag is, for example, 1-byte data provided in the data area SD-D of the SDRAM 9, and the flag is turned on by setting the least significant bit of the F-K2 error flag to “1”. It becomes. On the other hand, if it is determined that the kernel program stored in the second kernel area F-K2 is normal (S205: YES), the firmware (kernel program) reading process is terminated.

ステップS203において、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラムが正常でないと判断すると(S203:NO)、次に、FlashROM8の第2カーネル領域F−K2に記憶されているカーネルプログラムをSDRAM9の第1カーネル領域SD−K1に読み込みつつ、当該カーネルプログラムが正常であるか否かをチェックする(S207)。このカーネルプログラムが正常であるか否かのチェックは、FlashROM8の第2カーネル領域F−K2のチェッカ領域に記憶されているチェッカに基づくサムチェックによって行われる。そして、サムチェックの結果に基づいて、FlashROM8の第2カーネル領域F−K2に記憶されているカーネルプログラム、すなわち、SDRAM9の第1カーネル領域SD−K1に読み込まれたカーネルプログラムが正常であるか否かを判断する(S208)。   If it is determined in step S203 that the kernel program stored in the first kernel area F-K1 of the FlashROM 8 is not normal (S203: NO), then the kernel stored in the second kernel area F-K2 of the FlashROM 8 While reading the program into the first kernel area SD-K1 of the SDRAM 9, it is checked whether or not the kernel program is normal (S207). Whether the kernel program is normal is checked by a sum check based on a checker stored in the checker area of the second kernel area F-K2 of the FlashROM 8. Based on the result of the sum check, whether or not the kernel program stored in the second kernel area F-K2 of the FlashROM 8, that is, the kernel program read into the first kernel area SD-K1 of the SDRAM 9 is normal. Is determined (S208).

FlashROM8の第2カーネル領域F−K2に記憶されているカーネルプログラムが正常であると判断すると(S208:YES)、第1カーネル領域F−K1のカーネルプログラムが正常であるか否かを記憶するためのF−K1エラーフラグをオン状態にし(S209)、ファームウェア(カーネルプログラム)の読み込み処理を終了する。このF−K1エラーフラグは、例えば、SDRAM9のデータ領域SD−Dなどに設けられた1バイトのデータであり、F−K1エラーフラグの最下位ビットを「1」にすることによってフラグがオン状態となる。   When it is determined that the kernel program stored in the second kernel area F-K2 of the FlashROM 8 is normal (S208: YES), it is stored whether or not the kernel program in the first kernel area F-K1 is normal. The F-K1 error flag is turned on (S209), and the firmware (kernel program) reading process is terminated. The F-K1 error flag is, for example, 1-byte data provided in the data area SD-D of the SDRAM 9, and the flag is turned on by setting the least significant bit of the F-K1 error flag to “1”. It becomes.

一方、第2カーネル領域F−K2に記憶されているカーネルプログラムが正常でないと判断すると(S208:NO)、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラム(破損している)を、SDRAM9の第1カーネル領域SD−K1に読み込み(S210)、F−K1エラーフラグ及びF−K2エラーフラグをともにオン状態として(S211)、ファームウェア(カーネルプログラム)の読み込み処理を終了する。なお、データ処理装置1では、上述したようなファームウェアの書き換え方法を採用しているので、第1カーネル領域F−K1のカーネルプログラムと第2カーネル領域F−K2のカーネルプログラムのどちらかは正常であり、ステップS208において、第2カーネル領域F−K2に記憶されているカーネルプログラムが正常でない(NO)と判断され、ステップS210及びステップS211に処理が進むことは想定され難い。   On the other hand, if it is determined that the kernel program stored in the second kernel area F-K2 is not normal (S208: NO), the kernel program stored in the first kernel area F-K1 of the FlashROM 8 (corrupted). Are loaded into the first kernel area SD-K1 of the SDRAM 9 (S210), both the F-K1 error flag and the F-K2 error flag are turned on (S211), and the firmware (kernel program) reading process is terminated. Since the data processing apparatus 1 employs the firmware rewriting method as described above, either the kernel program in the first kernel area F-K1 or the kernel program in the second kernel area F-K2 is normal. In step S208, it is determined that the kernel program stored in the second kernel area F-K2 is not normal (NO), and it is unlikely that the processing proceeds to step S210 and step S211.

このように、FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラムと第2カーネル領域F−K2に記憶されているカーネルプログラムとのうちの破損していない正常なカーネルプログラムがSDRAM9の第1カーネル領域SD−K1に読み込まれるので、ファームウェアのアップデート(書き換え)中の電源断などにより、FlashROM8の第1カーネル領域F−K1のカーネルプログラム又は第2カーネル領域F−K2のカーネルプログラムのどちらかが破損などして正常でない場合でも、データ処理装置1を正常に機能させることができる。   As described above, a normal kernel program which is not damaged among the kernel program stored in the first kernel area F-K1 and the kernel program stored in the second kernel area F-K2 of the Flash ROM 8 is stored in the SDRAM 9. Since it is read into the first kernel area SD-K1, either the kernel program in the first kernel area F-K1 or the kernel program in the second kernel area F-K2 of the FlashROM 8 is caused by a power interruption during firmware update (rewriting). Even if it is not normal due to damage or the like, the data processing apparatus 1 can function normally.

また、FlashROM8の第1カーネル領域F−K1及び第2カーネル領域F−K2に記憶されているカーネルプログラムを読み出して、SDRAM9の第1カーネル領域SD−K1又は第2カーネル領域SD−K2に書き込みつつ、順次にサムチェックのための演算を行うので、カーネルプログラムなどの読み込みにかかる時間を短縮することができる。   Further, the kernel program stored in the first kernel area F-K1 and the second kernel area F-K2 of the FlashROM 8 is read and written to the first kernel area SD-K1 or the second kernel area SD-K2 of the SDRAM 9. Since the calculation for the sum check is sequentially performed, the time required for reading the kernel program or the like can be shortened.

以上に説明したように、データ処理装置1において実行されるファームウェアの書き換え方法、及び、ファームウェアの読み込み方法によれば、ファームウェアのアップデート(書き換え)中に電源断などが発生してカーネルプログラムが破損した場合でも、正常に自装置1を機能させることができる。   As described above, according to the firmware rewriting method and the firmware reading method executed in the data processing device 1, the kernel program is damaged due to a power interruption or the like during the firmware update (rewriting). Even in this case, the device 1 can function normally.

なお、本発明の実施形態は上述の形態に限らず、本発明の技術的思想の範囲内において種々に変更してもよい。   The embodiment of the present invention is not limited to the above-described embodiment, and various modifications may be made within the scope of the technical idea of the present invention.

本発明は、記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの書き換え方法、及び、読み込み方法に適用可能である。   The present invention can be applied to a firmware rewriting method and a reading method in which data is divided and stored in individual storage areas of a storage device.

本発明のファームウェアの書き換え方法、及び、ファームウェアの読み込み方法を実行するデータ処理装置の構成例を示したブロック図である。It is the block diagram which showed the example of a structure of the data processor which performs the rewriting method of the firmware of this invention, and the reading method of firmware. FlashROMとSDRAMの記憶領域を説明する説明図である。It is explanatory drawing explaining the storage area of FlashROM and SDRAM. 第1カーネル領域F−K1及び第2カーネル領域F−K2のデータを書き換えるためのK領域用書き換えデータを説明する説明図である。It is explanatory drawing explaining the rewriting data for K area | regions for rewriting the data of 1st kernel area | region F-K1 and 2nd kernel area | region F-K2. 一般プログラム領域F−Pのデータを書き換えるためのP領域用書き換えデータを説明する説明図である。It is explanatory drawing explaining the rewrite data for P area | region for rewriting the data of the general program area | region FP. 一般プログラム領域F−Pのデータに対して行われるサムチェックを説明する説明図である。It is explanatory drawing explaining the sum check performed with respect to the data of the general program area | region FP. クライアントPC5から送信された書き換えデータに基づいてデータ処理装置1のFlashROM8に記憶されているファームウェアを書き換える場合に、データ処理装置1の制御部6が実行する処理(ファームウェアの書き換え方法)について説明するフローチャートである。A flowchart for explaining processing (firmware rewriting method) executed by the control unit 6 of the data processing device 1 when rewriting the firmware stored in the flash ROM 8 of the data processing device 1 based on the rewriting data transmitted from the client PC 5. It is. 図6のフローチャートに続くフロー図である。FIG. 7 is a flowchart following the flowchart of FIG. 6. 書き換えデータのデータサイズと書き換えデータによって書き換えるべき記憶領域との関係を記憶したテーブルを示す説明図である。It is explanatory drawing which shows the table which memorize | stored the relationship between the data size of rewriting data, and the memory area which should be rewritten by rewriting data. FlashROM8の第1カーネル領域F−K1に記憶されているカーネルプログラム、及び、第2カーネル領域F−K1に記憶されているカーネルプログラムを実行するためにSDRAM9の第1カーネル領域SD−K1及び第2カーネル領域SD−K2に読み込む場合に、データ処理装置1の制御部6が実行する処理(ファームウェアの読み込み方法)について説明するフローチャートである。In order to execute the kernel program stored in the first kernel area F-K1 of the flash ROM 8 and the kernel program stored in the second kernel area F-K1, the first kernel area SD-K1 and the second of the SDRAM 9 7 is a flowchart for explaining processing (firmware reading method) executed by the control unit 6 of the data processing device 1 when reading into the kernel area SD-K2.

符号の説明Explanation of symbols

1 データ処理装置
6 制御部(MPU)
7 インターフェース回路
8 FlashROM
9 SDRAM
F−B ブート領域
F−K1 第1カーネル領域
F−K2 第2カーネル領域
F−P 一般プログラム領域
F−F フォント領域
1 Data processing device 6 Control unit (MPU)
7 Interface circuit 8 FlashROM
9 SDRAM
FB Boot area F-K1 First kernel area F-K2 Second kernel area FP General program area FF Font area

Claims (4)

記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの書き換えデータによる書き換え方法であって、
前記書き換えデータに含まれるカーネルプログラムを前記記憶装置の記憶領域の第1カーネル領域に書き込むステップ(A)と、
前記書き換えデータに含まれるカーネルプログラムを前記記憶装置の記憶領域の第2カーネル領域に書き込むステップ(B)とを含むことを特徴とするファームウェアの書き換え方法。
A rewriting method by rewriting data of firmware stored in each storage area of the storage device divided according to data type,
Writing a kernel program included in the rewrite data into a first kernel area of the storage area of the storage device;
A firmware rewriting method comprising: (B) writing a kernel program included in the rewriting data into a second kernel area of the storage area of the storage device.
前記記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常であるか否かを判断するステップ(C)と、
前記記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムが正常であるか否かを判断するステップ(D)とをさらに含み、
前記記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常でない場合に、前記ステップ(B)に先立って前記ステップ(A)を実行し、前記記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムが正常でない場合に、前記ステップ(A)に先立って前記ステップ(B)を実行することを特徴とする請求項1に記載のファームウェアの書き換え方法。
Determining whether the kernel program stored in the first kernel area of the storage area of the storage device is normal (C);
And (D) determining whether the kernel program stored in the second kernel area of the storage area of the storage device is normal,
If the kernel program stored in the first kernel area of the storage area of the storage device is not normal, the step (A) is executed prior to the step (B), and the second storage area of the storage device 2. The firmware rewriting method according to claim 1, wherein when the kernel program stored in the kernel area is not normal, step (B) is executed prior to step (A).
前記ステップ(C)及び前記ステップ(D)において、カーネルプログラムに含まれる誤り検出データに基づいてカーネルプログラムが正常であるか否かを判断することを特徴とする請求項2に記載のファームウェアの書き換え方法。   The rewriting of firmware according to claim 2, wherein in step (C) and step (D), it is determined whether or not the kernel program is normal based on error detection data included in the kernel program. Method. 副記憶装置の個々の記憶領域にデータの種類別に分割して記憶されているファームウェアの主記憶装置への読み込み方法であって、
前記副記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムを前記主記憶装置に読み込みつつ、当該カーネルプログラムに含まれる誤り検出データに基づいて当該カーネルプログラムが正常であるか否かを判断するステップ(A)と、
前記ステップ(A)において、前記副記憶装置の記憶領域の第1カーネル領域に記憶されているカーネルプログラムが正常でないと判断した場合に、前記副記憶装置の記憶領域の第2カーネル領域に記憶されているカーネルプログラムを前記主記憶装置に読み込むステップ(B)とを備えることを特徴とするファームウェアの読み込み方法。
A method of reading firmware stored in a separate storage area of a secondary storage device according to the type of data into a main storage device,
Whether or not the kernel program is normal based on the error detection data included in the kernel program while reading the kernel program stored in the first kernel area of the storage area of the secondary storage device into the main storage device Step (A) for determining
In the step (A), when it is determined that the kernel program stored in the first kernel area of the storage area of the secondary storage device is not normal, it is stored in the second kernel area of the storage area of the secondary storage device. And a step (B) of reading a stored kernel program into the main storage device.
JP2006216397A 2006-08-09 2006-08-09 Firmware rewriting method and firmware reading method Pending JP2008040924A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006216397A JP2008040924A (en) 2006-08-09 2006-08-09 Firmware rewriting method and firmware reading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006216397A JP2008040924A (en) 2006-08-09 2006-08-09 Firmware rewriting method and firmware reading method

Publications (1)

Publication Number Publication Date
JP2008040924A true JP2008040924A (en) 2008-02-21

Family

ID=39175831

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006216397A Pending JP2008040924A (en) 2006-08-09 2006-08-09 Firmware rewriting method and firmware reading method

Country Status (1)

Country Link
JP (1) JP2008040924A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014106758A (en) * 2012-11-28 2014-06-09 Kyocera Document Solutions Inc Data write circuit and image forming apparatus
JP2017091057A (en) * 2015-11-05 2017-05-25 株式会社デンソー Electronic control device and data rewrite system
CN112527207A (en) * 2020-12-18 2021-03-19 深圳市元征科技股份有限公司 Method and device for storing data in EEPROM

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014106758A (en) * 2012-11-28 2014-06-09 Kyocera Document Solutions Inc Data write circuit and image forming apparatus
JP2017091057A (en) * 2015-11-05 2017-05-25 株式会社デンソー Electronic control device and data rewrite system
CN112527207A (en) * 2020-12-18 2021-03-19 深圳市元征科技股份有限公司 Method and device for storing data in EEPROM

Similar Documents

Publication Publication Date Title
KR102327309B1 (en) Information processing apparatus and method for controlling information processing apparatus
US10819877B2 (en) Printing apparatus, printing apparatus control method, and storage medium connecting to an option unit update option unit program using an update program stored a storage
JP2008238799A (en) Image forming device
JP2022135443A (en) Information processor, method for processing information, and program
JP2009081742A (en) Image forming device
JP2008040924A (en) Firmware rewriting method and firmware reading method
JP2008085457A (en) Image information output device, program and image information output system
JP2010170360A (en) Image output device and image output system
JP2005275843A (en) Data processor
JP2009033539A (en) Image forming apparatus
JP4103823B2 (en) Data processing device
US10956090B2 (en) Memory system and electronic apparatus
JP4556104B2 (en) Data processing device
US20200150947A1 (en) Information processing apparatus, updating method by information processing apparatus, and recording medium
JP2008048229A (en) Image processing device
JP2005032014A (en) Data processor, starting program for data processor, and starting method for data processor
JP7500400B2 (en) Information processing device, method for controlling information processing device, and program
US20220382533A1 (en) Information processing apparatus and control method of the same
JP5135987B2 (en) Image forming apparatus and erroneous printing prevention method
US11947948B2 (en) Information processing apparatus, information processing method, and storage medium
JP7543842B2 (en) COMMUNICATION APPARATUS, IMAGE FORMING APPARATUS, AND METHOD FOR CONTROLLING COMMUNICATION APPARATUS
JP2018092417A (en) Image processing device
JP2011120005A (en) Image processing apparatus and data on information processing apparatus
JP2010182001A (en) Image forming apparatus
JP5290880B2 (en) Electronic apparatus and image forming apparatus