JP2008225972A - Image forming apparatus, data protection method, and program - Google Patents

Image forming apparatus, data protection method, and program Download PDF

Info

Publication number
JP2008225972A
JP2008225972A JP2007064779A JP2007064779A JP2008225972A JP 2008225972 A JP2008225972 A JP 2008225972A JP 2007064779 A JP2007064779 A JP 2007064779A JP 2007064779 A JP2007064779 A JP 2007064779A JP 2008225972 A JP2008225972 A JP 2008225972A
Authority
JP
Japan
Prior art keywords
program
processing unit
image forming
forming apparatus
activation
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
JP2007064779A
Other languages
Japanese (ja)
Inventor
Toshimitsu Takagi
俊光 高木
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007064779A priority Critical patent/JP2008225972A/en
Publication of JP2008225972A publication Critical patent/JP2008225972A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique for protecting a specific program in rewriting the program which makes an image forming apparatus uncontrollable when breakage or erasing occur. <P>SOLUTION: The image forming apparatus 100 includes a storage medium 102 such as a flash memory divided into a plurality of partitions. The specific program is stored in any one of the partitions. A switching processing part 111 switches the partition to be accessed, and a rewrite processing part 11 rewrites the specific program stored in a first partition 103 by copying this specific program to a second partition 104 different from the first partition 103 by switching by the switching processing part 111 and then storing an update program in the first partition 103. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像形成装置に係り、特に、特定のプログラムを保護する技術に関する。   The present invention relates to an image forming apparatus, and more particularly to a technique for protecting a specific program.

近年、フラッシュメモリ等のデータを書き換え可能な記憶媒体は、コストが低下してきたため、プリンタ等の画像形成装置におけるプリントコントローラにも多く使用されるようになってきている。   In recent years, storage media capable of rewriting data, such as flash memory, have come to be used in many print controllers in image forming apparatuses such as printers because of a reduction in cost.

フラッシュメモリには、例えば、ブートプログラム、メモリ内のデータを書き換えるための書き換えプログラム、各種周辺機器とデータの送受信を行うためのI/F(インタフェース)制御プログラム、印刷制御を行うためのプログラム、等が格納される。   The flash memory includes, for example, a boot program, a rewrite program for rewriting data in the memory, an I / F (interface) control program for transmitting / receiving data to / from various peripheral devices, a program for performing print control, etc. Is stored.

これらプログラムは、機能の拡張、セキュリティ対策としてのバージョンアップ、ユーザカスタマイズ、等に応じて、書き換えが求められるようになってきている。例えば、特許文献1には、プリンタ装置の制御プログラムを容易に更新する技術について記載されている。   These programs are required to be rewritten in accordance with function expansion, version upgrade as a security measure, user customization, and the like. For example, Patent Document 1 describes a technique for easily updating a control program for a printer apparatus.

特開平7−314798号JP-A-7-314798

しかし、ブートプログラム、書き換えプログラム、I/Fプログラム、といった特定のプログラムは、破壊又は消去されると、画像形成装置を制御することができなくなる。従って、これらのプログラムの書き換え処理時には、特に、該プログラムの破壊又は消去が発生しないようにしなければならない。   However, when a specific program such as a boot program, a rewrite program, or an I / F program is destroyed or erased, the image forming apparatus cannot be controlled. Therefore, it is necessary to prevent the program from being destroyed or erased during the rewriting process of these programs.

本発明は、破壊又は消去されると画像形成装置を制御不能にする特定のプログラムを、書き換える場合において、該プログラムを保護するための技術を提供することを目的とする。   It is an object of the present invention to provide a technique for protecting a specific program that makes the image forming apparatus uncontrollable when it is destroyed or erased, when the program is rewritten.

上記課題を解決するため、本発明は、アップデートプログラムを保有するホストコンピュータが接続されている画像形成装置であって、当該画像形成装置は、複数のパーティションから構成され、該いずれかのパーティションに、当該画像形成装置を制御する特定のプログラムが格納されている記憶媒体を備え、前記特定のプログラムを書き替える指示を受け付ける指示受付部と、前記複数のパーティションのいずれのパーティションにアクセスするか切り替える切り替え処理部と、前記指示を受け付けたときに、前記いずれかのパーティションに格納されている特定のプログラムを、前記切り替え処理部の切り替えによって、該特定のプログラムが格納されている第1のパーティションとは異なる第2のパーティションに複製してから、前記ホストコンピュータからアップデートプログラムを取得し、取得したアップデートプログラムを前記第1のパーティションに格納する書き替え処理部と、を有することを特徴とする。   In order to solve the above problems, the present invention is an image forming apparatus to which a host computer having an update program is connected, and the image forming apparatus includes a plurality of partitions. An instruction receiving unit that includes a storage medium in which a specific program for controlling the image forming apparatus is stored, receives an instruction to rewrite the specific program, and a switching process for switching which partition of the plurality of partitions is accessed And when the instruction is received, the specific program stored in any of the partitions differs from the first partition in which the specific program is stored by switching of the switching processing unit Duplicate to the second partition and before Get the update program from the host computer, and having obtained the rewriting processing unit for storing the update program to the first partition and the.

本発明の画像形成装置によれば、破壊又は消去されると当該画像形成装置を制御不能にする特定のプログラムを、書き換える場合において、該プログラムを保護することができる。   According to the image forming apparatus of the present invention, when rewriting a specific program that makes the image forming apparatus uncontrollable when it is destroyed or erased, the program can be protected.

以下、本発明の最良の実施の形態を、図面を参照して説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

本発明の実施形態に適用される画像形成装置100のハードウェア構成の一例を、図1のブロック図に示す。   An example of the hardware configuration of the image forming apparatus 100 applied to the embodiment of the present invention is shown in the block diagram of FIG.

画像形成装置100には、ホストPC200が接続される。画像形成装置100は、ホストPC200から送られてきた画像データに基づいて、印刷データを生成する。画像形成装置100は、生成した印刷データを、後述する印刷エンジン300を用いて印刷する また、画像形成装置100は、破壊又は消去されると画像形成装置100を制御不能にする特定のプログラム(以下では、メインプログラムとよぶ)の書き替えを実行する。ここで、メインプログラムは、例えば、メインプログラム自体を書き替えるための書き替えプログラム、画像形成装置100のシステムを起動/再起動するための起動プログラム、ホストPC200から各種プログラムを受信するためのI/F制御プログラム、である。   A host PC 200 is connected to the image forming apparatus 100. The image forming apparatus 100 generates print data based on the image data sent from the host PC 200. The image forming apparatus 100 prints the generated print data using a print engine 300 to be described later. Further, the image forming apparatus 100 has a specific program (hereinafter referred to as an uncontrollable program) that makes the image forming apparatus 100 uncontrollable when destroyed or erased. Then, the main program is rewritten. Here, the main program is, for example, a rewriting program for rewriting the main program itself, a starting program for starting / restarting the system of the image forming apparatus 100, and an I / for receiving various programs from the host PC 200. F control program.

また、画像形成装置100は、メインプログラムを書き替えの際に、メインプログラムを保護する。   Further, the image forming apparatus 100 protects the main program when the main program is rewritten.

なお、画像形成装置100は、書き替え用の新しいメインプログラムを、ホストPC200等から受け付けることができる。書き替え用の新しいメインプログラムは、例えば、バグなどを修正したプログラムであったり、機能を拡張したプログラムであったり、セキュリティを改善したプログラム、等でよい。ここでのメインプログラムの書き替えの目的は、所謂、メインプログラムのバージョンアップである。従って、画像形成装置100は、バージョンアップしたメインプログラムを、既に画像形成装置100に組み込まれているメインプログラムに上書きすることで、メインプログラムを書き替える。   The image forming apparatus 100 can accept a new main program for rewriting from the host PC 200 or the like. The new main program for rewriting may be, for example, a program in which bugs are corrected, a program with expanded functions, a program with improved security, or the like. The purpose of rewriting the main program here is to upgrade the so-called main program. Therefore, the image forming apparatus 100 rewrites the main program by overwriting the upgraded main program on the main program already incorporated in the image forming apparatus 100.

ホストPC200は、パーソナルコンピュータ等の一般的な情報処理装置である。ホストPC200は、例えば、生成した印刷対象の画像データに、印刷を指示するコマンドを付加して、画像形成装置100に送信する。また、ホストPC200は、メインプログラム等の各種プログラムを、画像形成装置100に送信する。なお、画像形成装置100には、図1において、1台のホストPC200が接続されているように記載しているが、ネットワーク等を介して複数のホストPC200が接続されてもよい。   The host PC 200 is a general information processing apparatus such as a personal computer. For example, the host PC 200 adds a command instructing printing to the generated image data to be printed and transmits the image data to the image forming apparatus 100. In addition, the host PC 200 transmits various programs such as a main program to the image forming apparatus 100. Although the image forming apparatus 100 is described as being connected to one host PC 200 in FIG. 1, a plurality of host PCs 200 may be connected via a network or the like.

上記のような画像形成装置100は、制御部101と、記憶媒体102と、I/F(インタフェース)部105と、印刷エンジン106と、入力部107と、を有する。   The image forming apparatus 100 as described above includes a control unit 101, a storage medium 102, an I / F (interface) unit 105, a print engine 106, and an input unit 107.

記憶媒体102は、フラッシュメモリ等のデータを書き替え可能なメモリである。記憶媒体102には、例えば、上述したメインプログラムと、画像形成装置100における画像処理及び印刷処理のためのプログラム、等が格納される。   The storage medium 102 is a memory that can rewrite data, such as a flash memory. The storage medium 102 stores, for example, the main program described above, a program for image processing and printing processing in the image forming apparatus 100, and the like.

また、記憶媒体102には、図2に示すように、セクタアドレスが割り当てられる。記憶媒体102における各セクタへのアクセスは、各セクタアドレスを指定して行われる。   Further, a sector address is assigned to the storage medium 102 as shown in FIG. Access to each sector in the storage medium 102 is performed by designating each sector address.

さらに、記憶媒体102は、ブロックA103、ブロックB104、の2つのパーティションに区切られている。ここで、2つのパーティションは、記憶媒体102をパーティション単位で電気的に分割した物理パーティションでもよいし、ソフトウェア的に分割した論理パーティションでもよい。ここで、セクタアドレスは、例えば、「01010011111」といった11ビットの数字列とする。また、例えば、ブロックA103には、上位1ビットが0のアドレスが割り当てられ、ブロックB104には、上位1ビットが1のアドレスが割り当てられるようにする。   Furthermore, the storage medium 102 is divided into two partitions, block A103 and block B104. Here, the two partitions may be physical partitions obtained by electrically dividing the storage medium 102 in units of partitions, or may be logical partitions obtained by software division. Here, the sector address is, for example, an 11-bit numeric string such as “01010011111”. Further, for example, an address whose upper 1 bit is 0 is assigned to the block A103, and an address whose upper 1 bit is 1 is assigned to the block B104.

記憶媒体102には、少なくともブロックA103かブロックB104のどちらかのパーティションに、上述したメインプログラムが格納される。このことについての具体的な説明は、後述する。   In the storage medium 102, the main program described above is stored in at least one of the blocks A103 and B104. A specific description of this will be described later.

なお、メインプログラムは、書き替えプログラム、起動プログラム、I/F制御プログラム、を含むことは上述したが、メインプログラムには、画像形成装置100が、ブロックA103とブロックB104のどちらから起動プログラムを読み込んで起動したかを特定するための起動ブロック特定用データが含まれている。また、メインプログラムには、ブロックA103とブロックB104の先頭アドレス(例えば、図2に示すアドレスA1とアドレスB1)を特定するための先頭アドレス特定用データも含まれている。   As described above, the main program includes the rewriting program, the activation program, and the I / F control program. However, the image forming apparatus 100 reads the activation program from either the block A 103 or the block B 104 in the main program. The data for starting block specification for specifying whether or not it was started in is included. The main program also includes start address specifying data for specifying the start addresses of the blocks A103 and B104 (for example, the address A1 and the address B1 shown in FIG. 2).

さらに、記憶媒体102には、画像形成装置100が印刷データを生成するためのプログラムや、印刷処理を行うためのプログラム、等の各種プログラムが格納される。   Further, the storage medium 102 stores various programs such as a program for the image forming apparatus 100 to generate print data and a program for performing print processing.

また、各ブロック(ブロックA103、ブロックB)の最終アドレスが割り当てられているセクタには、各ブロックに記憶されているデータのチェックサム値が格納される。   In addition, the checksum value of the data stored in each block is stored in the sector to which the final address of each block (block A103, block B) is assigned.

図1に戻って、I/F部105は、ホストPC200の接続を受け付け、ホストPC200と各種データを送受信するインタフェースである。また、I/F部105は、後述する入力部107の接続を受け付け、入力部107からの各種データを受信するインタフェースでもある。例えば、I/F部105は、USB規格に準拠したUSBインタフェースでよい。ただし、I/F部105は、USBインタフェースに限定されず、例えば、LAN等のネットワークに接続するためのネットワークインタフェースであってもよい。   Returning to FIG. 1, the I / F unit 105 is an interface that accepts connection of the host PC 200 and transmits / receives various data to / from the host PC 200. The I / F unit 105 is also an interface that accepts connection of an input unit 107 (to be described later) and receives various data from the input unit 107. For example, the I / F unit 105 may be a USB interface compliant with the USB standard. However, the I / F unit 105 is not limited to a USB interface, and may be a network interface for connecting to a network such as a LAN, for example.

入力部107は、ユーザからの指示を受け付けるための操作パネルである。ここで、入力部107は、ユーザから、起動・再起動の指示、メインプログラムの書き替えの指示、印刷の指示、各種機能の設定の指示、等を受け付ける。具体的には、入力部107は、1又は複数の操作ボタン等を有し、ユーザによる該ボタンの操作に基づいて、対応する指示信号を生成する。入力部107は、生成した指示信号を、I/F部105を介して、制御部101に供給する。   The input unit 107 is an operation panel for receiving instructions from the user. Here, the input unit 107 accepts a start / restart instruction, a main program rewriting instruction, a printing instruction, various function setting instructions, and the like from the user. Specifically, the input unit 107 has one or a plurality of operation buttons and the like, and generates a corresponding instruction signal based on the operation of the button by the user. The input unit 107 supplies the generated instruction signal to the control unit 101 via the I / F unit 105.

印刷エンジン106は、制御部101から入力されたシリアルデータ(印刷データ)に基づいて印刷用紙に印刷を行う。印刷エンジン106は、例えば、レーザプリンタであれば、レーザ照射機構、感光体ドラム、紙送り機構等により構成される。   The print engine 106 performs printing on printing paper based on the serial data (print data) input from the control unit 101. For example, if the print engine 106 is a laser printer, the print engine 106 includes a laser irradiation mechanism, a photosensitive drum, a paper feed mechanism, and the like.

制御部101は、記憶媒体102に記憶されている各種プログラムを読み出し、記憶媒体102の起動ブロックを切り替える切り替え処理、記憶媒体102に記憶されている各種プログラムを書き替える書き替え処理、画像形成装置100のシステムを起動させる起動処理、等を行う。また、制御部101は、I/F部105を介して、ホストPC200および入力部107から供給された入力データを受け付ける処理を行う。さらに、制御部101は、ホストPC200から供給された画像データに基づいて印刷データを生成する。制御部101は、生成した印刷データを印刷エンジン106に印刷させる。   The control unit 101 reads out various programs stored in the storage medium 102, a switching process for switching the activation block of the storage medium 102, a rewriting process for rewriting various programs stored in the storage medium 102, and the image forming apparatus 100. Performs startup processing to start the system. In addition, the control unit 101 performs processing for receiving input data supplied from the host PC 200 and the input unit 107 via the I / F unit 105. Further, the control unit 101 generates print data based on the image data supplied from the host PC 200. The control unit 101 causes the print engine 106 to print the generated print data.

上記処理を行う制御部101は、図1に示すように、切り替え処理部110と、書き替え処理部111と、起動処理部112と、I/F制御部113と、画像処理部114と、印刷制御部115と、を有する。   As shown in FIG. 1, the control unit 101 that performs the above processing includes a switching processing unit 110, a rewrite processing unit 111, an activation processing unit 112, an I / F control unit 113, an image processing unit 114, and a printing process. And a control unit 115.

切り替え処理部110は、記憶媒体102の起動ブロックを切り替える処理を行う。例えば、切り替え処理部110は、図3に示すように、アドレス切り替え処理部300、アドレス切り替えレジスタ301、タイマ302、デコーダ303、OR回路304、を有する。   The switching processing unit 110 performs processing for switching the activation block of the storage medium 102. For example, the switching processing unit 110 includes an address switching processing unit 300, an address switching register 301, a timer 302, a decoder 303, and an OR circuit 304, as shown in FIG.

デコーダ303は、制御部101が記憶媒体102にアクセスする場合(例えば、書き替え処理部111が記憶媒体102に格納されているデータの書き替えを行う場合)に、制御部101がアクセスする記憶媒体102上のアドレスを生成する。例えば、制御部101が記憶媒体102に格納されているメインプログラムを書き替える場合、デコーダ303は、メインプログラムが格納されているアドレスA1〜A12を生成する。このとき、デコーダ303は、生成したアドレスA1〜A12を、アドレス切り替え処理部300に供給する。   The decoder 303 is a storage medium that the control unit 101 accesses when the control unit 101 accesses the storage medium 102 (for example, when the rewrite processing unit 111 rewrites data stored in the storage medium 102). An address on 102 is generated. For example, when the control unit 101 rewrites the main program stored in the storage medium 102, the decoder 303 generates addresses A1 to A12 where the main program is stored. At this time, the decoder 303 supplies the generated addresses A1 to A12 to the address switching processing unit 300.

アドレス切り替え処理部300は、後述するアドレス切り替えレジスタ301に格納されているデータを参照して、デコーダ303から供給されたアドレスを変換するか否かを決定する回路である。変換する場合は、アドレス切り替え処理部300は、デコーダ303から供給されたアドレスを変換して、変換したアドレスを記憶媒体102に供給する。変換しない場合は、アドレス切り替え処理部300は、デコーダ303から供給されたアドレスを変換せずに、記憶媒体102に供給する。ここで、アドレスの変換は、例えば、デコーダ303から供給されたアドレス(11ビットの数字列)の上位1ビットを反転させる。これによって、アドレス切り替え処理部300は、デコーダ303から供給されたアドレスA1〜A12を、アドレスB1〜B12に変換する。加えて、アドレス切り替え処理部300は、デコーダ303から供給されたアドレスB1〜B12を、アドレスA1〜A12に変換することもできる。   The address switching processing unit 300 is a circuit that determines whether or not to convert the address supplied from the decoder 303 with reference to data stored in an address switching register 301 described later. In the case of conversion, the address switching processing unit 300 converts the address supplied from the decoder 303 and supplies the converted address to the storage medium 102. When not converting, the address switching processing unit 300 supplies the address supplied from the decoder 303 to the storage medium 102 without converting. Here, in the address conversion, for example, the upper 1 bit of the address (11-bit numeric string) supplied from the decoder 303 is inverted. As a result, the address switching processing unit 300 converts the addresses A1 to A12 supplied from the decoder 303 into addresses B1 to B12. In addition, the address switching processing unit 300 can also convert the addresses B1 to B12 supplied from the decoder 303 into addresses A1 to A12.

アドレス切り替えレジスタ301は、制御部101がアクセスする記憶媒体102のブロックを特定するデータが格納される。例えば、このデータは、「0」、「1」等のデータでよい。ここで、例えば、アドレス切り替えレジスタ301に格納されているデータが「0」であるときは、制御部101は記憶媒体102のブロックA103にアクセスし、「1」であるときは、ブロックB104にアクセスする。   The address switching register 301 stores data for specifying a block of the storage medium 102 accessed by the control unit 101. For example, this data may be data such as “0” and “1”. Here, for example, when the data stored in the address switching register 301 is “0”, the control unit 101 accesses the block A103 of the storage medium 102, and when it is “1”, it accesses the block B104. To do.

また、アドレス切り替えレジスタ301に格納されているデータは、書き替え可能とすする。例えば、制御部101は、アドレス切り替えレジスタ301のデータを変更(ライト)することができる。また、タイマ302からの通知に基づいて、アドレス切り替えレジスタ301に格納されているデータは変更される。   The data stored in the address switching register 301 is rewritable. For example, the control unit 101 can change (write) data in the address switching register 301. Further, based on the notification from the timer 302, the data stored in the address switching register 301 is changed.

さらに、制御部101は、アドレス切り替えレジスタ301のデータを参照(リード)することで、その時点における起動ブロックを特定することができる。   Further, the control unit 101 can specify the activation block at that time by referring to (reading) the data in the address switching register 301.

タイマ302は、記憶媒体102の起動ブロックを切り替えるタイミングを決定する。例えば、タイマ302は、起動処理部112からの通知を受けて、後述するCPUから供給される一定周期のクロック信号(図示せず)に基づくカウント動作を開始する。タイマ302は、カウント動作を停止させる通知を受けずに、所定時間(例えば、1分)が経過した場合には、カウント動作を停止させる。ただし、該所定時間は、システムの起動処理を正常に終了させるために要する時間に合わせて予め設定されている。また、カウント動作中に、起動処理部112からカウント動作を停止させる通知を受けた場合にも、カウント動作を終了させる。カウント動作を停止させたときに、タイマ302は、カウント動作を停止させたことを示す信号(例えば、Highの信号)を、アドレス切り替えレジスタ301およびOR回路304に供給する。   The timer 302 determines the timing for switching the activation block of the storage medium 102. For example, the timer 302 receives a notification from the activation processing unit 112 and starts a counting operation based on a clock signal (not shown) with a fixed period supplied from a CPU described later. The timer 302 stops the counting operation when a predetermined time (for example, 1 minute) elapses without receiving a notification to stop the counting operation. However, the predetermined time is set in advance according to the time required to normally finish the system startup process. The count operation is also terminated when a notification for stopping the count operation is received from the activation processing unit 112 during the count operation. When the count operation is stopped, the timer 302 supplies a signal (for example, a high signal) indicating that the count operation is stopped to the address switching register 301 and the OR circuit 304.

OR回路304は、タイマ302又は起動処理部112のいずれかからの通知を受けたときに、記憶媒体102の起動ブロックを切り替えて起動・再起動する指示信号を、起動処理部112に供給する回路である。具体的には、OR回路304は、起動処理部112とタイマ302から供給されるいずれかの信号がHighであるときに、Highの信号を起動処理部112に供給する。   The OR circuit 304 is a circuit that supplies an instruction signal to the activation processing unit 112 by switching the activation block of the storage medium 102 and starting / restarting upon receiving a notification from either the timer 302 or the activation processing unit 112 It is. Specifically, the OR circuit 304 supplies a High signal to the activation processing unit 112 when any of the signals supplied from the activation processing unit 112 and the timer 302 is High.

以上のような構成により、切り替え処理部110は、記憶媒体102にアクセスするブロックの切り替え、起動ブロックの切り替え、を行うことができる。なお、本実施形態では、切り替え処理部110をハードウェアの構成として説明したが、本発明は、ソフトウェアにより上記処理を実施するようにしてもよい。   With the configuration as described above, the switching processing unit 110 can perform switching of blocks that access the storage medium 102 and switching of activation blocks. In the present embodiment, the switching processing unit 110 has been described as a hardware configuration. However, the present invention may be implemented by software.

図1に戻って、書き替え処理部111は、記憶媒体102に格納されている各種プログラムを書き替える処理を行う。例えば、書き替え処理部111は、記憶媒体102に格納されている上述したメインプログラムの書き替え、画像処理および印刷処理のためのプログラム、等を書き替える。   Returning to FIG. 1, the rewrite processing unit 111 performs a process of rewriting various programs stored in the storage medium 102. For example, the rewrite processing unit 111 rewrites the above-described main program stored in the storage medium 102, a program for image processing, print processing, and the like.

具体的には、書き替え処理部111は、記憶媒体102に格納されている各種プログラムを書き替える前に、切り替え処理部110のアドレス切り替えレジスタ301にアクセスして、その時点での起動ブロックを特定しておく。書き替え処理部111は、特定したブロックに格納されている書き替え対象のプログラムを読み出し、特定したブロックとは異なるブロックに、読み出したプログラムを一時的に複製しておく。正常に複製が終了した後、書き替え処理部111は、新たに書き替えるプログラムを取得する。このとき、新たに書き替えるプログラムは、例えば、I/F部105、I/F制御部113を介して、ホストPC200から取得する。書き替え処理部111は、取得した新たなプログラムと、書き替え対象のプログラムを比較して、書き替える必要がある場合には、先に特定した起動ブロックと同一のブロックに格納されているプログラムを書き替える。ここで、書き替え処理部111は、正常に書き換えが行われたか否かを判別して、書き替え処理を終了させる。このときの判別は、例えば、チェックサムの計算により行われる。また、上述した複製の処理、及び、書き替え処理を行うたびに、書き替え処理部110は、各ブロック(ブロックA103、ブロックB104)の最終アドレスに格納されているチェックサム値を更新する。   Specifically, before rewriting various programs stored in the storage medium 102, the rewrite processing unit 111 accesses the address switching register 301 of the switching processing unit 110 and specifies the activation block at that time. Keep it. The rewrite processing unit 111 reads the program to be rewritten stored in the identified block, and temporarily copies the read program to a block different from the identified block. After the copying is normally completed, the rewrite processing unit 111 acquires a new rewrite program. At this time, a program to be newly rewritten is acquired from the host PC 200 via the I / F unit 105 and the I / F control unit 113, for example. The rewrite processing unit 111 compares the acquired new program with the program to be rewritten and, when it is necessary to rewrite, the program stored in the same block as the activation block specified earlier is Rewrite. Here, the rewrite processing unit 111 determines whether the rewrite has been normally performed and ends the rewrite process. The determination at this time is performed, for example, by calculating a checksum. Each time the above-described duplication processing and rewriting processing are performed, the rewriting processing unit 110 updates the checksum value stored in the final address of each block (block A103, block B104).

上記書き替え処理により、本画像形成装置100は、メインプログラムの書き替え時に、メインプログラムの破壊・消去から保護することができる。   By the rewriting process, the image forming apparatus 100 can protect the main program from being destroyed or erased when the main program is rewritten.

起動処理部112は、画像形成装置100におけるシステムの起動・再起動を行う。例えば、起動処理部112は、上述した切り替え処理部110のタイマ302がタイムアウトした場合(起動処理が正常に行うことができなかった場合)や、入力部107から起動・再起動の指示が入力された場合に、システムの起動・再起動の処理を行う。また、ここで、システムの起動とは、画像形成装置100が印刷を行うことができるようにシステムの初期設定(印刷エンジン106の駆動処理、等)を行うことを指す。   The activation processing unit 112 activates and restarts the system in the image forming apparatus 100. For example, the activation processing unit 112 receives an activation / reactivation instruction from the input unit 107 when the timer 302 of the switching processing unit 110 described above times out (when the activation process cannot be performed normally). In the event of a failure, system startup / reboot processing is performed. Here, the activation of the system refers to performing initial setting of the system (such as drive processing of the print engine 106) so that the image forming apparatus 100 can perform printing.

具体的には、起動処理部112は、ハードウェアによって電源がオンにされたときに、切り替え処理部110のタイマ302に通知して、タイマ302にカウント動作を開始させる。そして、起動処理部112は、システムの起動・再起動の処理を行う前に、切り替え処理部110のアドレス切り替えレジスタ301にアクセスして、その時点での起動ブロックを特定しておく。起動ブロックが正常である場合には、起動処理部112は、システムの起動・再起動の処理を行う。ただし、システムの起動・再起動の処理が終了する前に、タイマ302からタイムアウトした通知を受けると、起動処理部112は、起動ブロックを、現時点での起動ブロックとは異なるブロックに切り替えて、システムを再起動する。また、起動処理部112は、起動・再起動処理を終了したときに、タイマ302に、カウント動作を停止させる信号を供給する。   Specifically, the activation processing unit 112 notifies the timer 302 of the switching processing unit 110 when the power is turned on by hardware, and causes the timer 302 to start a counting operation. Then, the startup processing unit 112 accesses the address switching register 301 of the switching processing unit 110 and identifies the startup block at that time before performing the system startup / restart processing. When the activation block is normal, the activation processing unit 112 performs system activation / reactivation processing. However, upon receiving a time-out notification from the timer 302 before the system startup / restart processing is completed, the startup processing unit 112 switches the startup block to a block different from the current startup block, and the system Restart. In addition, the activation processing unit 112 supplies a signal for stopping the count operation to the timer 302 when the activation / reactivation processing is completed.

これにより、本画像形成装置100は、正常なメインプログラムを格納しているブロックから、後述するCPUが起動プログラムを読み出して、システムの起動・再起動処理を行うことができる。   As a result, in the image forming apparatus 100, the CPU described later can read the activation program from the block storing the normal main program, and can perform the activation / reactivation processing of the system.

I/F制御部113は、I/F部105を制御する。例えば、I/F制御部113は、I/F部105に接続されているホストPC200および入力部107とのデータの送受信を制御する。具体的には、I/F制御部113は、ホストPC200から印刷対象の画像データが、I/F部105を介して供給されたとき、該画像データを、後述する画像処理部114に供給する。また、I/F制御部113は、入力部107から、システムの起動・再起動を指示する信号が供給されたとき、該信号を起動処理部112に供給する。さらに、I/F制御部113は、入力部107から、記憶媒体102に格納されている各種プログラムの書き替えを指示する信号が供給されたとき、該信号を書き替え処理部111に供給する。   The I / F control unit 113 controls the I / F unit 105. For example, the I / F control unit 113 controls transmission / reception of data with the host PC 200 and the input unit 107 connected to the I / F unit 105. Specifically, when image data to be printed is supplied from the host PC 200 via the I / F unit 105, the I / F control unit 113 supplies the image data to the image processing unit 114 described later. . Further, when a signal instructing system activation / reactivation is supplied from the input unit 107, the I / F control unit 113 supplies the signal to the activation processing unit 112. Further, when a signal instructing rewriting of various programs stored in the storage medium 102 is supplied from the input unit 107, the I / F control unit 113 supplies the signal to the rewriting processing unit 111.

画像処理部114は、ホストPC200から供給された印刷対象の画像データを、印刷エンジン106で印刷可能な印刷データに変換する処理を行う。例えば、画像処理部114は、I/F制御部113を介して、ホストPC200から供給された画像データに基づいて印刷データを生成し、これを印刷制御部115に供給する。   The image processing unit 114 performs processing for converting image data to be printed supplied from the host PC 200 into print data that can be printed by the print engine 106. For example, the image processing unit 114 generates print data based on the image data supplied from the host PC 200 via the I / F control unit 113 and supplies the print data to the print control unit 115.

印刷制御部115は、印刷エンジン106を制御する処理を行う。例えば、印刷制御部115は、画像処理部114が生成した印刷データを印刷エンジン106に供給して、印刷エンジン106に印刷させる。   The print control unit 115 performs processing for controlling the print engine 106. For example, the print control unit 115 supplies the print data generated by the image processing unit 114 to the print engine 106 and causes the print engine 106 to print.

以上のように構成される画像形成装置100は、例えば、図4に示すような、CPU401と、RAM等の主記憶装置402と、特定の処理を行うASIC403と、フラッシュメモリ等の外部記憶装置405と、ユーザからの指示を受け付ける操作パネルや印刷を実行する印刷エンジン等を含む入出力装置406と、ホストPC200とUSB通信を行う通信装置404と、を備えた一般的なプリンタで実現される。ただし、通信装置404は、通信ネットワークに接続するためのNIC(Network Interface Card)等であってもよい。   The image forming apparatus 100 configured as described above includes, for example, a CPU 401, a main storage device 402 such as a RAM, an ASIC 403 that performs specific processing, and an external storage device 405 such as a flash memory as illustrated in FIG. And a general printer including an input / output device 406 including an operation panel that receives an instruction from a user, a print engine that executes printing, and a communication device 404 that performs USB communication with the host PC 200. However, the communication device 404 may be a NIC (Network Interface Card) for connecting to a communication network.

例えば、上述した記憶媒体102は、外部記憶装置405により実現可能である。また、制御部101は、外部記憶装置405に格納されている各種プログラム(メインプログラム、等)を、主記憶装置402にロードして、CPU401、ASIC403で処理することで実現可能である。さらに、I/F部105、I/F制御部113は、通信装置404で実現可能である。また、入力部107、印刷エンジン106は、入出力装置406で実現される。   For example, the storage medium 102 described above can be realized by the external storage device 405. Further, the control unit 101 can be realized by loading various programs (main program, etc.) stored in the external storage device 405 into the main storage device 402 and processing them by the CPU 401 and the ASIC 403. Further, the I / F unit 105 and the I / F control unit 113 can be realized by the communication device 404. The input unit 107 and the print engine 106 are realized by an input / output device 406.

以上のような構成により、画像形成装置100は、メインプログラムの書き換え時に、該プログラムの破壊・消去から保護することができる。   With the configuration described above, the image forming apparatus 100 can protect the program from being destroyed or erased when the main program is rewritten.

図5は、画像形成装置100で行われるシステムの起動時処理を説明するためのフローチャートである。   FIG. 5 is a flowchart for explaining a system start-up process performed by the image forming apparatus 100.

画像形成装置100における制御部101の起動処理部112は、システムの起動・再起動処理が正常に行うことができなかったときや、ユーザから入力部107を介して起動・再起動の指示がされたときに、起動時処理を開始する。具体的には、起動処理部112は、上述した切り替え処理部110に備わるOR回路304から、Highの信号が供給されたときに、起動時処理を開始する。例えば、システムの起動・再起動が正常に行うことができなかった場合は、タイマ302がタイムアウトしたことをOR回路304に通知し、OR回路304はHighの信号を起動処理部112に供給する。また、ユーザから起動・再起動の指示がされた場合は、入力部107がユーザの指示に基づいて生成した信号が、I/F制御部113を介して、起動処理部112に供給される。このとき、起動処理部112は、Highの信号をOR回路304に供給し、OR回路304は、Highの信号を起動処理部112に供給する。   The activation processing unit 112 of the control unit 101 in the image forming apparatus 100 is instructed to activate / restart when the system activation / reactivation process cannot be normally performed or when the user instructs the activation / reactivation via the input unit 107. When starting up, start-up processing is started. Specifically, the activation processing unit 112 starts the activation process when a High signal is supplied from the OR circuit 304 included in the switching processing unit 110 described above. For example, when the activation / reactivation of the system cannot be performed normally, the OR circuit 304 is notified that the timer 302 has timed out, and the OR circuit 304 supplies a high signal to the activation processing unit 112. In addition, when an activation / reactivation instruction is issued from the user, a signal generated by the input unit 107 based on the user's instruction is supplied to the activation processing unit 112 via the I / F control unit 113. At this time, the activation processing unit 112 supplies a High signal to the OR circuit 304, and the OR circuit 304 supplies a High signal to the activation processing unit 112.

起動処理部112は、起動時処理を開始して、まず、タイマ302を起動させる(ステップS101)。具体的には、起動処理部112は、タイマ302に、システムの起動処理を開始したことを示すHighの信号を供給する。   The activation processing unit 112 starts the activation process, and first activates the timer 302 (step S101). Specifically, the activation processing unit 112 supplies a high signal to the timer 302 indicating that the system activation process has started.

このとき、タイマ302は、起動処理部112からHighの信号を受け付け、CPU401から供給される一定間隔のクロックパルスに従って、カウントを行う。   At this time, the timer 302 receives a High signal from the activation processing unit 112 and performs counting according to clock pulses at regular intervals supplied from the CPU 401.

続いて、起動処理部112は、起動ブロックを特定する処理を行う(ステップS102)。具体的には、起動処理部112は、切り替え処理部110のアドレス切り替えレジスタ301に格納されているデータを読み出す。起動処理部112は、読み出したデータが、「0」である場合は、起動ブロックがブロックA103であると特定する。また、起動処理部112は、読み出したデータが、「1」である場合は、起動ブロックがブロックB104であると特定する。
次に、起動処理部112は、起動ブロックが不正、又は、ステップS101で起動したタイマ302がタイムアウトしたか否かを判別する(ステップS103)。具体的には、起動処理部112は、ステップS102で特定した起動ブロックをスキャンしてチェックサム値を求める。起動処理部112は、求めたチェックサム値と、起動ブロックの最終アドレスが割り当てられているセクタに格納されているチェックサム値とを比較することで、判別を行う。また、起動処理部112は、タイマ302からタイムアウトを通知する信号を、OR回路304を介して、供給されたときに、タイムアウトと判別する。
Subsequently, the activation processing unit 112 performs a process of specifying an activation block (step S102). Specifically, the activation processing unit 112 reads data stored in the address switching register 301 of the switching processing unit 110. If the read data is “0”, the activation processing unit 112 identifies the activation block as the block A103. In addition, when the read data is “1”, the activation processing unit 112 specifies that the activation block is the block B104.
Next, the activation processing unit 112 determines whether the activation block is invalid or the timer 302 activated in step S101 has timed out (step S103). Specifically, the activation processing unit 112 obtains a checksum value by scanning the activation block identified in step S102. The activation processing unit 112 performs the determination by comparing the obtained checksum value with the checksum value stored in the sector to which the final address of the activation block is assigned. Further, the activation processing unit 112 determines that a timeout has occurred when a signal notifying the timeout from the timer 302 is supplied via the OR circuit 304.

ステップS103では、起動処理部112は、起動ブロックが正常であり、かつ、タイマ302はタイムアウトしていないと判別した場合は(ステップS103;No)、処理をステップS104に移行させる。一方、起動処理部112は、起動ブロックが正常ではない、又は、タイマ302がタイムアウトしたと判別した場合は(ステップS103;Yes)、処理をステップS107に移行させる。具体的には、起動処理部112は、タイマ302からタイムアウトの通知を受けずに、ステップS102で比較したチェックサム値が一致する場合に、処理をステップS104に移行させ、一致しない場合又はタイムアウトした場合に、処理をステップS107に移行させる。   In step S103, if the activation processing unit 112 determines that the activation block is normal and the timer 302 has not timed out (step S103; No), the process proceeds to step S104. On the other hand, if the activation processing unit 112 determines that the activation block is not normal or the timer 302 has timed out (step S103; Yes), the activation processing unit 112 shifts the processing to step S107. Specifically, the activation processing unit 112 shifts the process to step S104 when the checksum values compared in step S102 match without receiving a timeout notification from the timer 302, and if they do not match or times out If so, the process proceeds to step S107.

続いて、起動処理部112は、システムの起動・再起動処理を開始する(ステップS104)。具体的には、起動処理部112は、画像形成装置100を印刷可能にするための初期設定を行う。通常、この初期設定には、所定時間(例えば、1分程度)を要する。   Subsequently, the activation processing unit 112 starts a system activation / reactivation process (step S104). Specifically, the activation processing unit 112 performs initial settings for enabling the image forming apparatus 100 to print. Usually, this initial setting requires a predetermined time (for example, about 1 minute).

このとき、起動処理部112は、ステップS103で起動したタイマ302がタイムアウトしたか否かを判別する(ステップS105)。具体的には、起動処理部112は、初期設定中に、タイマ302からタイムアウトを通知する信号を、OR回路304を介して、供給されたときに、タイムアウトと判別する。   At this time, the activation processing unit 112 determines whether or not the timer 302 activated in step S103 has timed out (step S105). Specifically, the activation processing unit 112 determines that a timeout has occurred when a signal notifying the timeout from the timer 302 is supplied via the OR circuit 304 during the initial setting.

なお、タイマ302のタイムアウトの通知は、上述したように、システムの初期設定が正常に終了することができなかった場合に発生する。システムの初期設定に、上記所定時間(例えば、1分程度)を超える時間を要する場合は、その処理が異常であると考えられるため、このような構成が設けられている。このような構成により、画像形成装置100は、システムの起動時に、自動的に異常を検出して、起動ブロックを切り替えることができる。   Note that the notification of the timeout of the timer 302 occurs when the initial setting of the system cannot be completed normally as described above. When the initial setting of the system requires a time exceeding the predetermined time (for example, about 1 minute), the processing is considered to be abnormal, and thus such a configuration is provided. With such a configuration, the image forming apparatus 100 can automatically detect an abnormality and switch the activation block when the system is activated.

ステップS105で、タイムアウトと判別しないで(ステップS105;Yes)、システムの起動・再起動処理を終了した場合には(ステップS106;Yes)、起動処理部112は、タイマ302にカウント動作を停止させて、起動時処理を終了する。具体的には、起動処理部112は、タイマ302に、システムの起動処理を終了したことを示すLowの信号を供給する。このとき、タイマ302は、Lowの信号を受け付けて、カウント動作を停止する。   If it is determined in step S105 that a timeout has not occurred (step S105; Yes) and the system startup / restart process is completed (step S106; Yes), the startup processing unit 112 causes the timer 302 to stop the counting operation. To complete the startup process. Specifically, the activation processing unit 112 supplies a low signal to the timer 302 indicating that the system activation process has been completed. At this time, the timer 302 receives the Low signal and stops the count operation.

一方、ステップS106で、起動処理部112は、システムの起動・再起動処理を終了する前に(ステップS106;No)、タイマ302がタイムアウトしたと判別した場合(ステップS105;Yes)、処理をステップS107に移行させる。   On the other hand, in step S106, the activation processing unit 112 determines that the timer 302 has timed out (step S105; Yes) before ending the system activation / reactivation process (step S106; No). The process proceeds to S107.

なお、ステップS106で、起動処理部112は、システムの起動・再起動処理が終了したか否かの判別を、起動プログラムを正常に終了したときに、返される結果値により判別するようにすればよい。   In step S106, the activation processing unit 112 may determine whether or not the system activation / reactivation process has been completed based on a result value returned when the activation program is terminated normally. Good.

ステップS107では、起動処理部112は、切り替え処理部110に、起動ブロックを、現時点での起動ブロックとは異なるブロックに切り替えさせる(ステップS107)。具体的には、アドレス切り替えレジスタ301のデータは、「0」から「1」、又は、「1」から「0」のように、変更される。この変更は、タイマ302が書き替え処理部111にタイムアウトの通知が行われたときに、書き替え処理部111が行うようにしてもよい。   In step S107, the activation processing unit 112 causes the switching processing unit 110 to switch the activation block to a block different from the current activation block (step S107). Specifically, the data in the address switching register 301 is changed from “0” to “1” or from “1” to “0”. This change may be performed by the rewrite processing unit 111 when the timer 302 notifies the rewrite processing unit 111 of a timeout.

起動処理部112は、ステップS107で、切り替え処理部110に起動ブロックを切り替えさせた後、処理をステップS101に移行させて、システムの再起動を行う。   In step S107, the activation processing unit 112 causes the switching processing unit 110 to switch the activation block, and then shifts the processing to step S101 to restart the system.

以上の起動時処理を実行することにより、画像形成装置100は、正常なプログラムを格納しているブロックから、システムの起動・再起動処理を行うことができる。   By executing the above startup processing, the image forming apparatus 100 can perform system startup / restart processing from a block storing a normal program.

図6は、画像形成装置100で行われる書き替え時処理を説明するためのフローチャートである。   FIG. 6 is a flowchart for explaining rewriting processing performed in the image forming apparatus 100.

画像形成装置100における制御部101の書き替え処理部111は、ユーザから入力部107を介して、記憶媒体102に格納されている各種プログラムの書き替えの指示がされたときに、書き替え時処理を開始する。具体的には、入力部107がユーザの指示に基づいて生成した信号が、I/F制御部113を介して、書き替え処理部111に供給されたときに、書き替え時処理を開始する。   The rewrite processing unit 111 of the control unit 101 in the image forming apparatus 100 performs rewrite processing when an instruction to rewrite various programs stored in the storage medium 102 is received from the user via the input unit 107. To start. Specifically, when a signal generated by the input unit 107 based on a user instruction is supplied to the rewrite processing unit 111 via the I / F control unit 113, the rewriting process is started.

なお、上記のように、必ずしもユーザからの指示に基づいて書き替え時処理を開始する必要はなく、自動的に記憶媒体102に格納されている各種プログラムをアップデートするプログラムに従って、書き替え時処理を開始するようにしてもよい。   As described above, it is not always necessary to start the rewriting process based on an instruction from the user, and the rewriting process is automatically performed according to a program for updating various programs stored in the storage medium 102. You may make it start.

書き替え処理部111は、書き替え時処理を開始して、まず、現時点での起動ブロックを特定する処理を行う(ステップS201)。具体的には、書き替え処理部111は、切り替え処理部110のアドレス切り替えレジスタ301に格納されているデータを読み出す。書き替え処理部111は、読み出したデータが、「0」である場合は、起動ブロックがブロックA103であると特定する。また、書き替え処理部111は、読み出したデータが、「1」である場合は、起動ブロックがブロックB104であると特定する。   The rewrite processing unit 111 starts the rewriting process, and first performs a process of specifying the current activation block (step S201). Specifically, the rewrite processing unit 111 reads data stored in the address switching register 301 of the switching processing unit 110. When the read data is “0”, the rewrite processing unit 111 specifies that the activation block is the block A103. Further, when the read data is “1”, the rewrite processing unit 111 specifies that the activation block is the block B104.

続いて、書き替え処理部111は、ステップS201で特定したブロックに格納されている書き替え対象のプログラムを、他方のブロックに複製する処理を行う(ステップS202)。具体的には、書き替え処理部111は、ステップS201で特定したブロックに格納されている書き替え対象のプログラムをロードする。ロード後、書き替え処理部111は、切り替え処理部110のアドレス切り替えレジスタ301のデータを変更する。これにより、書き替え処理部111がアクセスする記憶媒体102のブロックを切り替えることができる。それから、書き替え処理部111は、先にロードした書き替え対象のプログラムを、他方のブロックに複製する。このとき、アドレス切り替え処理部300は、先に変更されたアドレス切り替えレジスタ301に格納されているデータを参照して、デコーダ303から供給されたアドレスの上位1ビットを反転させて、アクセス先のアドレスを指定するように動作する。   Subsequently, the rewrite processing unit 111 performs a process of copying the rewrite target program stored in the block identified in step S201 to the other block (step S202). Specifically, the rewrite processing unit 111 loads the rewrite target program stored in the block identified in step S201. After loading, the rewrite processing unit 111 changes the data in the address switching register 301 of the switching processing unit 110. Thereby, the block of the storage medium 102 which the rewriting process part 111 accesses can be switched. Then, the rewrite processing unit 111 copies the program to be rewritten previously loaded to the other block. At this time, the address switching processing unit 300 refers to the data stored in the previously-changed address switching register 301, inverts the upper 1 bit of the address supplied from the decoder 303, and accesses the access destination address. It works to specify.

次に、書き替え処理部111は、ステップS101での複製が正常に終了したか否かを判別する(ステップS203)。具体的には、書き替え処理部111は、書き替え対象のプログラムのチェックサム値と、複製後のプログラムのチェックサム値を、比較することで判別する。   Next, the rewrite processing unit 111 determines whether or not the duplication in step S101 has been completed normally (step S203). Specifically, the rewrite processing unit 111 determines by comparing the checksum value of the program to be rewritten with the checksum value of the copied program.

ステップS203で、書き替え処理部111は、複製が正常に終了したと判別した場合(ステップS203;Yes)、処理をステップS204に移行させる。一方、書き替え処理部111は、複製が正常に終了していないと判別した場合(ステップS203;No)、処理をステップS202に戻して、再度、複製する処理を行う。具体的には、書き替え処理部111は、比較したチャックサム値が一致する場合に、処理をステップS204に移行させ、一致しない場合には、処理をステップS202に戻す。   If the rewrite processing unit 111 determines in step S203 that the duplication has been completed normally (step S203; Yes), the process proceeds to step S204. On the other hand, when the rewrite processing unit 111 determines that the duplication has not ended normally (step S203; No), the process returns to step S202, and the duplication process is performed again. Specifically, the rewrite processing unit 111 shifts the process to step S204 when the compared chuck sum values match, and returns the process to step S202 when they do not match.

ステップS204では、書き替え処理部111は、新たに書き替えるプログラム(アップデートプログラム)をロードする(ステップS205)。具体的には、書き替え処理部111は、I/F制御部113を介して、アップデートプログラムをロードする。このとき、I/F制御部113は、ホストPC200と通信を行い、アップデートプログラムを書き替え処理部111に供給する。このとき、取得するアップデートプログラムは、ヘッダ部分にバージョンを特定するデータを有する。従って、ホストPC200は、このバージョンを参照することで、最新のアップデートプログラムを、I/F制御部113に供給することができる。   In step S204, the rewrite processing unit 111 loads a new rewrite program (update program) (step S205). Specifically, the rewrite processing unit 111 loads the update program via the I / F control unit 113. At this time, the I / F control unit 113 communicates with the host PC 200 and supplies the update program to the rewrite processing unit 111. At this time, the update program to be acquired has data specifying the version in the header portion. Therefore, the host PC 200 can supply the latest update program to the I / F control unit 113 by referring to this version.

続いて、書き替え処理部111は、ステップS204でロードしたアップデートプログラムが、書き替える必要のあるプログラムであるか否かを判別する(ステップS205)。具体的には、書き替え処理部111は、記憶媒体102に格納されている書き替え対象のプログラムと、アップデートプログラムのデータ内容を比較することで判別する。   Subsequently, the rewrite processing unit 111 determines whether or not the update program loaded in step S204 is a program that needs to be rewritten (step S205). Specifically, the rewrite processing unit 111 makes a determination by comparing the rewrite target program stored in the storage medium 102 with the data content of the update program.

ステップS205で、書き替え処理部111は、書き替える必要があると判別した場合(ステップS205;Yes)、処理をステップS206に移行させる。一方、書き替える必要がないと判別した場合(ステップS205;No)、書き替え時処理を終了させる。具体的には、書き替え処理部111は、比較したデータ内容が一致しない場合に、処理をステップS206に移行させ、一致する場合には書き替え時処理を終了させる。   In step S205, when the rewrite processing unit 111 determines that rewriting is necessary (step S205; Yes), the process proceeds to step S206. On the other hand, when it is determined that there is no need to rewrite (step S205; No), the rewriting process is terminated. Specifically, the rewrite processing unit 111 shifts the process to step S206 when the compared data contents do not match, and ends the rewriting process when they match.

ステップS206では、書き替え処理部111は、ステップS204でロードしたアップデートプログラムを、ステップS201で特定したブロックに格納されている書き替え対象のプログラムに上書きする(ステップS206)。具体的には、ステップS202で説明した処理と同様に、まず、切り替え処理部301に、書き替え処理部111がアクセスするブロックを切り替えさせる。そして、書き替え処理部111は、アップデートプログラムを、切り替え後のブロックに書き込む処理を行う。   In step S206, the rewrite processing unit 111 overwrites the program to be rewritten stored in the block identified in step S201 with the update program loaded in step S204 (step S206). Specifically, similarly to the processing described in step S202, first, the switching processing unit 301 switches the block accessed by the rewrite processing unit 111. Then, the rewrite processing unit 111 performs a process of writing the update program into the block after switching.

なお、アップデートプログラムがメインプログラムである場合には、アップデートプログラムを上書きした後に、印刷処理に必要な他のプログラム等もアップデートするようにしてもよい。   If the update program is the main program, another program necessary for the printing process may be updated after overwriting the update program.

続いて、書き替え処理部111は、書き替え処理が正常に終了したか否かを判別する(ステップS207)。具体的には、書き替え処理部111は、ステップS204でロードしたアップロードプログラムのチェックサム値と、ステップS206で記憶したアップロードプログラムのチェックサム値を比較することで判別する。   Subsequently, the rewrite processing unit 111 determines whether or not the rewrite process has been normally completed (step S207). Specifically, the rewrite processing unit 111 makes a determination by comparing the checksum value of the upload program loaded in step S204 with the checksum value of the upload program stored in step S206.

ステップS207で、書き替え処理が正常に終了したと判別した場合、書き替え処理部111は、書き替え時処理を終了させる。一方、正常に終了していないと判別した場合、書き替え処理部111は、処理をステップS206に戻して、再度、アップデートプログラムを書き込む処理を行う。   When it is determined in step S207 that the rewriting process has been normally completed, the rewriting processing unit 111 ends the rewriting process. On the other hand, if it is determined that the processing has not ended normally, the rewrite processing unit 111 returns the process to step S206 and performs the process of writing the update program again.

以上の書き替え時処理を、画像形成装置100が実行することにより、メインプログラム等のプログラムを書き換える場合において、該プログラムの破壊・消去から保護することができる。例えば、電源切断時による記憶媒体102に格納されるメインプログラムの書き替えの失敗で、画像形成装置100が起動しなくなることを、防ぐことができる。また、書き替えに失敗した場合であって、再度、メインプログラムの書き込みを行うことができる。   By executing the above rewriting process by the image forming apparatus 100, when rewriting a program such as a main program, it is possible to protect the program from being destroyed or erased. For example, it is possible to prevent the image forming apparatus 100 from starting up due to a failure in rewriting the main program stored in the storage medium 102 when the power is turned off. In addition, when rewriting fails, the main program can be written again.

さらに、本実施形態の画像形成装置100は、メインプログラムのバックアップ用に、複数の記憶媒体102を備える必要がないため、安価で信頼性の高い装置となる。   Furthermore, the image forming apparatus 100 according to the present embodiment does not need to include a plurality of storage media 102 for main program backup, and thus is an inexpensive and highly reliable apparatus.

なお、本発明は、上記実施形態に限定されず、種々の変形、応用が可能である。   In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible.

例えば、書き替え処理部111が、ステップS204でロードしたアップデートプログラムが、書き替える必要のあるプログラムであるか否かを判別するのは、データ内容を比較して行っている。しかしながら、本発明は、これに限定されず、アップデートプログラムのヘッダ部に記載されたバージョン情報と、書き替え対象のプログラムのバーションを比較することで、ステップS205の判別処理を行ってもよい。   For example, the rewrite processing unit 111 determines whether or not the update program loaded in step S204 is a program that needs to be rewritten by comparing data contents. However, the present invention is not limited to this, and the determination process in step S205 may be performed by comparing the version information described in the header part of the update program with the version of the program to be rewritten.

また、上記実施形態では、記憶媒体102を2つのブロックに区切るようにしている。しかしながら、本発明は、これに限定されず、記憶媒体102は、3つのブロック、4つのブロックといった、複数のブロックから構成されてもよい。   In the above embodiment, the storage medium 102 is divided into two blocks. However, the present invention is not limited to this, and the storage medium 102 may be composed of a plurality of blocks such as three blocks and four blocks.

本発明の実施形態に係る画像形成装置の機能構成図である。1 is a functional configuration diagram of an image forming apparatus according to an embodiment of the present invention. 2つのパーティションから構成される記憶媒体を説明するための説明図である。It is explanatory drawing for demonstrating the storage medium comprised from two partitions. 切り替え処理部のハードウェア構成図である。It is a hardware block diagram of a switching process part. 画像形成装置のハードウェア構成の一例を示す図である。2 is a diagram illustrating an example of a hardware configuration of an image forming apparatus. FIG. 起動時処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process at the time of starting. 書き替え時処理を説明するためのフローチャートである。It is a flowchart for demonstrating the process at the time of rewriting.

符号の説明Explanation of symbols

100 画像形成装置、101 制御部、102 記憶媒体、103 ブロックA、104 ブロックB、105 I/F部、106 印刷エンジン、107 入力部、110 切り替え処理部、111 書き替え処理部、112 起動処理部、113 I/F制御部、114 画像処理部、115 印刷制御部、200 ホストPC、300 アドレス切り替え処理部、301 アドレス切り替えレジスタ、302 タイマ、303 デコーダ、304 OR回路、401 CPU、402 主記憶装置、403 ASIC、404 通信装置、405 外部記憶装置、406 入出力装置。 100 image forming apparatus, 101 control unit, 102 storage medium, 103 block A, 104 block B, 105 I / F unit, 106 print engine, 107 input unit, 110 switching processing unit, 111 rewrite processing unit, 112 activation processing unit , 113 I / F control unit, 114 image processing unit, 115 print control unit, 200 host PC, 300 address switching processing unit, 301 address switching register, 302 timer, 303 decoder, 304 OR circuit, 401 CPU, 402 main storage device , 403 ASIC, 404 communication device, 405 external storage device, 406 input / output device.

Claims (5)

アップデートプログラムを保有するホストコンピュータが接続されている画像形成装置であって、
複数のパーティションから構成され、該いずれかのパーティションに、当該画像形成装置を制御する特定のプログラムが格納されている記憶媒体を備え、
前記特定のプログラムを書き替える指示を受け付ける指示受付部と、
前記複数のパーティションのいずれのパーティションにアクセスするか切り替える切り替え処理部と、
前記指示を受け付けたときに、前記いずれかのパーティションに格納されている特定のプログラムを、前記切り替え処理部の切り替えによって、該特定のプログラムが格納されている第1のパーティションとは異なる第2のパーティションに複製してから、前記ホストコンピュータからアップデートプログラムを取得し、取得したアップデートプログラムを前記第1のパーティションに格納する書き替え処理部と、
を有することを特徴とする画像形成装置。
An image forming apparatus to which a host computer having an update program is connected,
It is composed of a plurality of partitions, and a storage medium storing a specific program for controlling the image forming apparatus is provided in any one of the partitions,
An instruction receiving unit for receiving an instruction to rewrite the specific program;
A switching processing unit for switching which partition of the plurality of partitions is accessed;
When the instruction is received, a second program different from the first partition in which the specific program is stored by switching the specific processing program stored in any one of the partitions is changed. A rewrite processing unit that obtains an update program from the host computer after copying to a partition, and stores the obtained update program in the first partition;
An image forming apparatus comprising:
請求項1に記載される画像形成装置であって、
前記特定のプログラムは、当該画像形成装置を起動する起動プログラムを含み、
前記画像形成装置は、前記起動プログラムの処理を開始してから計時するタイマを、備え、
前記切り替え処理部は、
前記起動プログラムの処理が終了する前に、前記タイマから、前記起動プログラムの処理に必要な所定時間が経過したことを通知されたときに、切り替え処理を行う、
ことを特徴とする画像形成装置。
An image forming apparatus according to claim 1,
The specific program includes a start program for starting the image forming apparatus,
The image forming apparatus includes a timer for timing after starting the processing of the startup program,
The switching processing unit
Before the end of the processing of the startup program, when the timer is notified that a predetermined time required for processing of the startup program has passed, the switching process is performed.
An image forming apparatus.
請求項1又は2に記載される画像形成装置であって、
前記画像形成装置は、複数のパーティションのうち、1のパーティションを特定するデータを格納するレジスタを備え、
前記切り替え処理部は、前記レジスタを参照して、前記切り替えを行う、
ことを特徴とする画像形成装置。
The image forming apparatus according to claim 1, wherein:
The image forming apparatus includes a register that stores data for specifying one of a plurality of partitions,
The switching processing unit refers to the register and performs the switching.
An image forming apparatus.
請求項1乃至3のいずれか1項に記載される画像形成装置であって、
前記画像形成装置は、印刷処理を行う印刷処理部を備え、
前記特定のプログラムは、印刷処理を行うためのプログラムを含む、
ことを特徴とする画像形成装置。
The image forming apparatus according to any one of claims 1 to 3,
The image forming apparatus includes a print processing unit that performs print processing.
The specific program includes a program for performing a printing process,
An image forming apparatus.
前記記憶媒体は、フラッシュメモリである、
ことを特徴とする画像形成装置。
The storage medium is a flash memory.
An image forming apparatus.
JP2007064779A 2007-03-14 2007-03-14 Image forming apparatus, data protection method, and program Pending JP2008225972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007064779A JP2008225972A (en) 2007-03-14 2007-03-14 Image forming apparatus, data protection method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007064779A JP2008225972A (en) 2007-03-14 2007-03-14 Image forming apparatus, data protection method, and program

Publications (1)

Publication Number Publication Date
JP2008225972A true JP2008225972A (en) 2008-09-25

Family

ID=39844496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007064779A Pending JP2008225972A (en) 2007-03-14 2007-03-14 Image forming apparatus, data protection method, and program

Country Status (1)

Country Link
JP (1) JP2008225972A (en)

Similar Documents

Publication Publication Date Title
NL2007975C2 (en) Information processing apparatus capable of appropriately executing shutdown processing, method of controlling the information processing apparatus, and storage medium.
JP2007094766A (en) Controller, upgrade method and program
JP6543122B2 (en) INFORMATION PROCESSING APPARATUS, METHOD OF INITIALIZING NONVOLATILE STORAGE DEVICE BY THE INFORMATION PROCESSING APPARATUS, AND PROGRAM
JP2004133881A (en) Interface circuit of card type memory, asic (application specified ic) mounted with its circuit and image forming apparatus mounted with its asic
JP2005157528A (en) Memory device
JP2002244877A (en) Printer device and program updating method for the same
JP2008158991A (en) Control system for nand type flash memory
US10120677B2 (en) Method of rewriting printer firmware, and printer
JP7263067B2 (en) Information processing device and information processing device control method
JP2008225972A (en) Image forming apparatus, data protection method, and program
JP5895609B2 (en) Information processing apparatus, image forming apparatus, and program
JP2005094301A (en) Image forming apparatus
JP2000222200A (en) Electronic apparatus
JP2001344156A (en) Device with flash memory and data rewriting method
JP5932511B2 (en) Information processing apparatus, software update method, and computer program
JP2020171002A (en) Information processing apparatus and method of controlling the same
JP2005032014A (en) Data processor, starting program for data processor, and starting method for data processor
US11907049B2 (en) Information processing apparatus, method of controlling the same, and storage medium with features for updating code and data areas of non-volatile memory
JP4366207B2 (en) PRINT CONTROL DEVICE, PRINT DEVICE, PROGRAM START METHOD, AND PROGRAM
JP2005028676A (en) Image forming apparatus and program updating method therefor
JP2020021246A (en) Image forming apparatus for updating firmware
JP2009238071A (en) Built-in system
US10942810B2 (en) Start-up processing for information processing apparatus and method, and storage medium
JP2009265980A (en) Information processing apparatus
JP2003122575A (en) Information processing unit