JP5016604B2 - Information processing apparatus and information processing method - Google Patents
Information processing apparatus and information processing method Download PDFInfo
- Publication number
- JP5016604B2 JP5016604B2 JP2008537391A JP2008537391A JP5016604B2 JP 5016604 B2 JP5016604 B2 JP 5016604B2 JP 2008537391 A JP2008537391 A JP 2008537391A JP 2008537391 A JP2008537391 A JP 2008537391A JP 5016604 B2 JP5016604 B2 JP 5016604B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- update
- area
- executed
- execution target
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1433—Saving, restoring, recovering or retrying at system level during software upgrading
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Description
この発明は、実行対象となるプログラムの実行および更新が可能な情報処理装置および情報処理方法に関する。ただし、この発明の利用は、上述した情報処理装置および情報処理方法には限られない。 The present invention relates to an information processing apparatus and an information processing how that can execute and update a program to be executed. However, use of this invention is not limited to the above-mentioned information processing apparatus and an information processing how.
従来より、一つのマイコン(マイクロコンピュータ)における制御プログラムを更新する際には、データ設定器などの外部機器を使用して、データの更新をおこなっている。近年では、制御プログラムの更新の際に、他のマイコンから割り込み処理によって更新エラーを起こさないようにするため、制御プログラムの更新中に、他のマイコンからの割り込み処理を禁止する提案がされている(たとえば、下記特許文献1参照。)。 Conventionally, when updating a control program in one microcomputer (microcomputer), data is updated using an external device such as a data setting device. In recent years, there has been a proposal to prohibit interrupt processing from other microcomputers while updating the control program in order to prevent an update error from being interrupted by other microcomputers when updating the control program. (For example, see Patent Document 1 below.)
ここで、図1を用いて、実行対象となるプログラムが実行可能に保存されたプログラム実行マイコン(マイクロコンピュータ)におけるプログラムの更新の概要について説明する。図1は、プログラム実行マイコンにおけるプログラムの更新の概要について示す説明図である。 Here, an outline of program update in a program execution microcomputer (microcomputer) in which a program to be executed is stored so as to be executable will be described with reference to FIG. FIG. 1 is an explanatory diagram showing an outline of program update in the program execution microcomputer.
図1において、プログラム更新システム100は、プログラム実行マイコン101と、更新用プログラム送信側マイコン102と、フラッシュメモリ103と、から構成されている。
In FIG. 1, a
プログラム実行マイコン101は、バッファ領域110と、プログラム領域111と、IPL(Initial Program Loader)領域112と、Vector領域113と、から構成されている。
The
バッファ領域110は、後述する更新用プログラム送信側マイコン102から送信される更新用プログラムを一時的に保存する。更新用プログラムは、たとえば、マイコン間通信によって更新用プログラム送信側マイコン102からバッファ領域110に送信され、プログラム実行マイコン101の実行対象となるプログラムの更新用のプログラムである。
The
バッファ領域110に一時保存された更新用プログラムは、図示しないCPU(Central Processing Unit)が、後述するIPL領域112を参照することによって、プログラム領域111に複製(コピー)される。換言すれば、後述するプログラム領域111に保存されたプログラムa,b,cは、更新用プログラムのプログラム領域111に複製されることによって更新がおこなわれる構成である。
The update program temporarily stored in the
プログラム領域111は、プログラム実行マイコン101の実行対象となるプログラムa,b,cを保存する。具体的には、たとえば、プログラム領域111は、プログラムaを保存するA領域121と、プログラムbを保存するB領域122と、プログラムcを保存するC領域123と、から構成されている。
The
各プログラムa,b,cは、たとえば、図示しないCPUによって読み込まれて実行される構成でもよい。具体的には、たとえば、プログラムa,b,cは、図示しないCPUが、後述するVector領域113に格納された、プログラムa,b,cのアドレスを参照することによって実行される。なお、図1の説明では、3つの領域(A領域121,B領域122,C領域123)を用いて説明したが、領域の数量および実行対象となるプログラムの数はこれに限るものではない。
Each program a, b, c may be configured to be read and executed by a CPU (not shown), for example. Specifically, for example, the programs a, b, and c are executed by a CPU (not shown) referring to the addresses of the programs a, b, and c stored in a
IPL領域112は、リセットスタート時に図示しないCPUによって最初に実行されるプログラムを保存する領域である。具体的には、たとえば、IPL領域112は、バッファ領域110に一時保存された更新用プログラムをプログラム領域111に複製するか、プログラム領域111に保存された各プログラムa,b,cを実行するかを決定するプログラムを保存する。
The IPL
Vector領域113は、イベント発生時にプログラム実行マイコン101の実行対象となるプログラムのアドレスを格納する。具体的には、たとえば、図示しないCPUは、リセットスタート時には、Vector領域113を参照してIPL領域112に保存されたプログラムのアドレスを読み込む。また、図示しないCPUは、たとえば、通常起動時には、Vector領域113を参照してプログラム領域111に保存された各プログラムa,b,cのアドレスを読み込む。
The Vector
更新用プログラム送信側マイコン102は、プログラム実行マイコン101に対して、プログラム実行マイコン101の実行対象となるプログラムa,b,cの更新用プログラムを送信する。具体的には、たとえば、更新用プログラム送信側マイコン102は、フラッシュメモリ103が保存している更新用プログラムを読み込んで、読み込んだ更新用プログラムをプログラム実行マイコン101に送信する。
The update program transmission side microcomputer 102 transmits to the
フラッシュメモリ103は、各種データを保存することができる記録媒体で、図1では、プログラム実行マイコン101の実行対象となるプログラムa,b,cの更新用プログラムを保存する。具体的には、たとえば、フラッシュメモリ103は、更新用プログラム送信側マイコン102に対して、保存している更新用プログラムを出力する。
The flash memory 103 is a recording medium that can store various data. In FIG. 1, the flash memory 103 stores update programs for the programs a, b, and c to be executed by the
しかしながら、上記従来技術では、マイコンにおける制御プログラムを更新する場合、更新専用の外部機器が必要となるため、マイコンの利用者は、更新専用の外部機器を用意する負担が生じてしまうという問題が一例として挙げられる。 However, in the above-described prior art, when updating a control program in a microcomputer, an external device dedicated for updating is required, so there is an example of a problem that a user of the microcomputer generates a burden of preparing an external device dedicated for updating. As mentioned.
また、更新専用の外部機器を有するマイコンの製造元などで、制御プログラムを更新する場合、マイコンの利用者は、製造元に対するマイコンの送付や受け取りに関する手間が発生するばかりか、更新に要する時間を浪費してしまうという問題が一例として挙げられる。 In addition, when a control program is updated by a manufacturer of a microcomputer having an external device dedicated for updating, the user of the microcomputer not only takes time to send and receive the microcomputer to the manufacturer, but also wastes time required for updating. An example of this is the problem.
一方、更新専用の外部機器を用いずに、マイコン間通信などによって受信される更新用プログラムによって、実行対象となるプログラムを更新する場合、書き換え(複製)の途中に電源障害などによって更新動作が中断されると、マイコンが起動できなくなってしまうという問題が一例として挙げられる。 On the other hand, when a program to be executed is updated by an update program received by communication between microcomputers without using an external device dedicated to update, the update operation is interrupted due to a power failure during rewriting (duplication). As an example, a problem that the microcomputer cannot be activated is given.
特に、Vector領域に格納された、実行対象となるプログラムのアドレスを書き換える場合、書き換えの途中で更新動作が中断されると、中断復旧後の起動時にVector領域を参照できないため、マイコンが起動できなくなってしまうという問題が一例として挙げられる。 In particular, when rewriting the address of the program to be executed stored in the Vector area, if the update operation is interrupted in the middle of the rewriting, the Vector area cannot be referred to at the time of startup after recovery from interruption, and the microcomputer cannot be started. An example of this is the problem.
また、Vector領域に格納された、実行対象となるプログラムのアドレスを書き換えずに、実行対象となるプログラムだけを更新する場合、Vector領域に格納された、実行対象となるプログラムのアドレスが固定されるため、初期設定によるプログラムの配置を変更できず、汎用性に欠けるとともにプログラム領域の容量を効率的に使用できないという問題が一例として挙げられる。 In addition, when only the program to be executed is updated without rewriting the address of the program to be executed stored in the Vector area, the address of the program to be executed stored in the Vector area is fixed. For this reason, the problem is that, for example, the arrangement of the program by the initial setting cannot be changed, the versatility is lacking, and the capacity of the program area cannot be used efficiently.
上述した課題を解決し、目的を達成するため、請求項1の発明にかかる情報処理装置は、 プログラムを保存するメモリおよびプログラムを実行する制御手段を備える情報処理装置であって、前記メモリは、実行対象となるプログラムのアドレスを保存するVector領域、リセットスタート時に実行される初期起動プログラムを保存するIPL領域、実行対象プログラムを保存する実行対象プログラム領域と、リセットスタート時に前記実行対象プログラムを実行させるための仮想初期起動プログラムを保存する仮想Vector領域と、から構成される有効プログラム領域、および前記有効プログラム領域のプログラムを更新するための更新用プログラムを一時保存する更新用プログラム保存領域、を有し、前記制御手段は、リセットスタートを受け付けた場合に、前記Vector領域を参照して前記IPL領域の初期起動プログラムを実行して、前記更新用プログラム保存領域に更新用プログラムが不足なく保存されて更新準備が完了しているか否かを判定し、前記更新準備が完了している場合には前記更新用プログラムを前記有効プログラム領域に複製し、前記更新準備が完了していない場合には前記仮想Vector領域の仮想初期起動プログラムを実行して前記実行対象プログラム領域の実行対象プログラムを実行することを特徴とする。 In order to solve the above-described problems and achieve the object, an information processing apparatus according to claim 1 is an information processing apparatus including a memory for storing a program and a control unit for executing the program, A Vector area for storing the address of a program to be executed, an IPL area for storing an initial startup program executed at reset start, an execution target program area for storing an execution target program, and executing the execution target program at reset start A virtual vector area for storing a virtual initial startup program for updating, and an effective program area comprising: an update program storage area for temporarily storing an update program for updating a program in the valid program area; The control means is reset If a start is received, the initial activation program of the IPL area is executed with reference to the Vector area, and the update program is stored in the update program storage area without any shortage, so that the update preparation is completed. If the update preparation is completed, the update program is copied to the valid program area. If the update preparation is not completed, the virtual initial activation program in the virtual vector area is And executing an execution target program in the execution target program area.
また、請求項2の発明にかかる情報処理方法は、プログラムを保存するメモリを備える情報処理装置が実行する情報処理方法であって、前記メモリは、実行対象となるプログラムのアドレスを保存するVector領域、リセットスタート時に実行される初期起動プログラムを保存するIPL領域、実行対象プログラムを保存する実行対象プログラム領域と、リセットスタート時に前記実行対象プログラムを実行させるための仮想初期起動プログラムを保存する仮想Vector領域と、から構成される有効プログラム領域、および前記有効プログラム領域のプログラムを更新するための更新用プログラムを一時保存する更新用プログラム保存領域、を有し、リセットスタートを受け付けた場合に、前記Vector領域を参照して前記IPL領域の初期起動プログラムを実行して、前記更新用プログラム保存領域に更新用プログラムが不足なく保存されて更新準備が完了しているか否かを判定し、前記更新準備が完了している場合には前記更新用プログラムを前記有効プログラム領域に複製し、前記更新準備が完了していない場合には前記仮想Vector領域の仮想初期起動プログラムを実行して前記実行対象プログラム領域の実行対象プログラムを実行する制御工程を含むことを特徴とする。 According to a second aspect of the present invention, there is provided an information processing method executed by an information processing apparatus including a memory for storing a program, wherein the memory stores a vector area for storing an address of a program to be executed. An IPL area for storing an initial startup program executed at reset start, an execution target program area for storing an execution target program, and a virtual Vector area for storing a virtual initial startup program for executing the execution target program at reset start And an update program storage area for temporarily storing an update program for updating a program in the effective program area, and when the reset start is accepted, the Vector area Refer to the IP When the initial startup program of the area is executed, it is determined whether or not the update program is stored in the update program storage area and the update preparation is completed, and if the update preparation is completed, Control for copying the update program to the valid program area, and executing the virtual initial activation program in the virtual vector area to execute the execution target program in the execution target program area when the update preparation is not completed Including a process.
以下に添付図面を参照して、この発明にかかる情報処理装置および情報処理方法の好適な実施の形態を詳細に説明する。 With reference to the accompanying drawings, illustrating a preferred embodiment of an information processing apparatus and information processing how according to the present invention in detail.
(実施の形態)
(情報処理装置の機能的構成)
図2を用いて、本実施の形態にかかる情報処理装置の機能的構成について説明する。図2は、本実施の形態にかかる情報処理装置の機能的構成の一例を示すブロック図である。
(Embodiment)
(Functional configuration of information processing device)
The functional configuration of the information processing apparatus according to this embodiment will be described with reference to FIG. FIG. 2 is a block diagram illustrating an example of a functional configuration of the information processing apparatus according to the present embodiment.
図2において、プログラム実行領域に保存された実行対象プログラムを実行する情報処理装置200は、更新用プログラム入力部201と、一時保存部202と、判定部203と、生成部204と、更新情報保存部205と、再稼働情報入力部206と、判断部207と、更新部208と、実行部209と、から構成されている。
In FIG. 2, an
更新用プログラム入力部201は、実行対象プログラムに対する更新用プログラムの入力を受け付ける。具体的には、たとえば、更新用プログラムの入力は、図示しない更新用プログラムが送信可能な外部装置から入力を受け付けることとしてもよい。
The update
更新用プログラムは、たとえば、情報処理装置200における不図示のメモリ領域などに割り当てられたプログラム実行領域に複製(コピー)されて実行対象プログラムとなる。また、更新用プログラムは、実行対象プログラムとして実行される際に、初期起動プログラムによって実行される仮想初期起動プログラムを含む構成でもよい。具体的には、たとえば、仮想初期起動プログラムは、プログラム実行領域が備える仮想プログラム領域に保存され、初期起動プログラムによって実行される。ここで、初期起動プログラムは、たとえば、情報処理装置100の再稼働の際に起動されるプログラムである。
The update program is copied (copied) to a program execution area assigned to a memory area (not shown) in the
さらに、更新用プログラム入力部201は、後述する判定部203によって判定された結果、更新用プログラムに過不足がある場合、更新用プログラムの出力元に対して取得要求をおこなうことによって更新用プログラムの入力を受け付けることとしてもよい。
Further, if the update
一時保存部202は、更新用プログラム入力部201によって入力された更新用プログラムを一時保存領域に一時保存する。具体的には、たとえば、一時保存部202は、情報処理装置200における不図示のメモリ領域などに割り当てられたバッファ領域など、データの一時保存が可能な領域に更新用プログラムを一時保存することとしてもよい。
The temporary storage unit 202 temporarily stores the update program input by the update
判定部203は、一時保存部202によって一時保存された更新用プログラムに過不足がないか否かを判定する。具体的には、たとえば、判定部203は、複数回に分割されて入力される更新用プログラムが、すべて一時保存領域に一時保存されたか否かを判定することとしてもよい。
The
生成部204は、判定部203によって判定された結果、更新用プログラムに過不足がない場合、プログラム実行領域に保存された実行対象プログラムの更新準備が完了した旨を示す更新情報を生成する。更新情報は、たとえば、実行対象プログラムの更新準備が完了した旨を示す代わりに、更新準備が完了していない旨を示す情報であってもよい。
As a result of the determination by the
更新情報保存部205は、生成部204によって生成された更新情報を更新情報保存領域に保存する。具体的には、たとえば、更新情報保存部205は、情報処理装置200における不図示のメモリ領域などに割り当てられた更新情報保存領域に更新情報を保存する。なお、更新情報保存部205は、生成部204によって更新準備が完了した旨を示す更新情報の代わりに、更新準備が完了していない旨を示す情報を保存していてもよい。
The update
再稼働情報入力部206は、自装置の再稼働に関する再稼働情報の入力を受け付ける。再稼働情報の入力は、たとえば、リセットスタートの処理要求などの入力であってもよい。
The restart
判断部207は、再稼働情報入力部206によって再稼働情報が入力された場合、初期起動プログラム保存領域に保存された初期起動プログラムを起動させて更新情報を参照することによって、更新準備が完了しているか否かを判断する。具体的には、たとえば、判断部207は、情報処理装置200における不図示のメモリ領域などに割り当てられた初期起動プログラム保存領域に保存された初期起動プログラムを起動させる構成である。
When the restart information is input by the restart
更新部208は、判断部207によって判断された結果、更新準備が完了している場合、更新用プログラムをプログラム実行領域に複製することによって実行対象プログラムを更新する。具体的には、たとえば、実行対象プログラムの更新は、更新準備が完了している場合、一時保存部202によって保存された更新用プログラムを実行対象プログラムに対して上書き保存する構成でもよい。
If the
また、更新部208は、たとえば、更新用プログラムを実行対象プログラムに上書きする際、更新用プログラムに含まれる仮想初期起動プログラムを用いて、プログラム実行領域が備える仮想プログラム保存領域の仮想初期起動プログラムもあわせて上書きすることとなる。
Further, for example, when the
また、更新部208は、プログラム実行領域に複製した更新用プログラムを検証することによって、実行対象プログラムを実行可能な形式に更新することとしてもよい。具体的には、たとえば、更新用プログラムの検証は、更新用プログラムが実行対象プログラムとして過不足なく複製されたか否かを確認する構成でもよい。
The
実行部209は、判断部207によって判断された結果、更新準備が完了していない場合、プログラム実行領域に保存された実行対象プログラムを実行する。具体的には、たとえば、実行部209は、仮想初期起動プログラムの実行にしたがって、プログラム実行領域に保存された実行対象プログラムを実行する。すなわち、実行部209は、更新準備が完了していない場合、初期起動プログラム保存領域に保存された初期起動プログラムの起動によって実行される仮想初期起動プログラムによって、実行対象プログラムを実行することができる。
The
換言すれば、初期起動プログラムは、再稼働情報が入力されると起動して、更新準備が完了しているか否かを判断させる。そして、初期起動プログラムは、判断の結果、更新準備が完了している場合は、更新用プログラムを用いて、実行対象プログラムを更新させることとなる。一方、初期起動プログラムは、判断の結果、更新準備が完了していない場合は、仮想プログラム保存領域に保存されている仮想初期起動プログラムを実行させることにより、実行対象プログラムを実行させることとなる。 In other words, the initial activation program is activated when reactivation information is input, and determines whether or not update preparation is completed. Then, if the initial startup program is ready for update as a result of the determination, the program to be executed is updated using the update program. On the other hand, if it is determined that the preparation for updating has not been completed, the initial activation program causes the execution target program to be executed by executing the virtual initial activation program stored in the virtual program storage area.
このように、情報処理装置200は、実行対象プログラムを更新する場合、仮想プログラム保存領域に保存された仮想初期起動プログラムを、実行対象プログラムとあわせて更新する構成である。また、情報処理装置200は、初期起動プログラムによって仮想初期起動プログラムを実行させることによって、実行対象プログラムを実行することができる。
As described above, when updating the execution target program, the
したがって、情報処理装置200は、仮想プログラム保存領域に仮想初期起動プログラムを保存することによって、実行対象プログラムを更新する際に初期起動プログラムを更新しなくても、実行対象プログラムの更新あるいは実行を確実におこなうことができる。換言すれば、実行対象プログラムの更新中に、電源障害などに起因して更新処理に不具合が発生しても、電源復旧時には、再度初期起動プログラムの実行によって、実行対象プログラムの更新あるいは実行をおこなうことができる。
Therefore, the
(情報処理装置200の処理の内容)
つぎに、図3を用いて本実施の形態にかかる情報処理装置200の処理の内容について説明する。図3は、本実施の形態にかかる情報処理装置の処理の内容を示すフローチャートである。図3のフローチャートにおいて、まず、更新用プログラム入力部201によって、更新用プログラムの入力を受け付けたか否かを判断する(ステップS301)。
(Contents of processing of information processing apparatus 200)
Next, the contents of the processing of the
ステップS301において、更新用プログラムの入力を受け付けた場合(ステップS301:Yes)は、一時保存部202によって、一時保存領域にステップS301において入力された更新用プログラムを一時保存する(ステップS302)。 When the input of the update program is accepted in step S301 (step S301: Yes), the temporary storage unit 202 temporarily stores the update program input in step S301 in the temporary storage area (step S302).
また、ステップS301において、更新用プログラムの入力を受け付けない場合(ステップS301:No)は、ステップS306へ移行して、再稼働情報入力部206によって、再稼働情報の入力を受け付けたか否かを判断する(ステップS306)。
In step S301, when the input of the update program is not received (step S301: No), the process proceeds to step S306, and the restart
つぎに、判定部203によって、ステップS302において一時保存された更新用プログラムに過不足がないか否かを判定する(ステップS303)。
Next, the
そして、生成部204によって、ステップS303において判定された結果に基づいて、更新情報を生成する(ステップS304)。更新情報は、たとえば、ステップS303において判定された結果、更新用プログラムに過不足がない場合、プログラム実行領域に保存された実行対象プログラムの更新準備が完了した旨を示す情報である。また、更新情報は、たとえば、ステップS303において判定された結果、更新用プログラムに過不足がある場合、更新準備が完了していない旨を示す情報であってもよい。
Then, the
つづいて、更新情報保存部205によって、更新情報保存領域にステップS304において生成された更新情報を保存する(ステップS305)。
Subsequently, the update
つぎに、再稼働情報入力部206によって、再稼働情報の入力を受け付けたか否かを判断する(ステップS306)。再稼働情報は、たとえば、リセットスタートの処理要求などであってもよい。
Next, the restart
ステップS306において、再稼働情報の入力を受け付けた場合(ステップS306:Yes)は、判断部207によって、初期起動プログラム保存領域に保存された初期起動プログラムを起動させて更新情報を参照することによって、更新準備が完了しているか否かを判断する(ステップS307)。
In step S306, when the input of reactivation information is accepted (step S306: Yes), the
また、ステップS306において、再稼働情報の入力を受け付けない場合(ステップS306:No)は、ステップS301に戻って処理を繰り返す。 In Step S306, when input of re-operation information is not accepted (Step S306: No), it returns to Step S301 and repeats processing.
ステップS307において、更新準備が完了している場合(ステップS307:Yes)は、更新部208によって、更新用プログラムをプログラム実行領域に複製することによって実行対象プログラムを更新する(ステップS308)。そして、実行部209によって、ステップS308において更新された実行対象プログラムを実行して(ステップS309)、一連の処理を終了する。
In step S307, when the update preparation is completed (step S307: Yes), the
また、ステップS307において、更新準備が完了していない場合(ステップS307:No)は、ステップS309へ移行して、実行部209によって、プログラム実行領域に保存された実行対象プログラムを実行する(ステップS309)。そして、一連の処理を終了する。
If the update preparation is not completed in step S307 (step S307: No), the process proceeds to step S309, and the
換言すれば、ステップS307〜ステップS309では、更新準備が完了している場合は、実行対象プログラムを更新してから、更新した実行対象プログラムを実行する。また、更新準備が完了していない場合は、実行対象プログラムを更新せずに、プログラム実行領域に保存されている実行対象プログラムを実行することとしてもよい。 In other words, in steps S307 to S309, if the update preparation is completed, the updated execution target program is executed after updating the execution target program. In addition, when the update preparation is not completed, the execution target program stored in the program execution area may be executed without updating the execution target program.
以上説明したように、本実施の形態によれば、一時保存部に保存された更新用プログラムによって実行対象プログラムを更新するため、専用の外部機器を用意しなくても実行対象プログラムの更新をおこなうことができる。 As described above, according to the present embodiment, since the execution target program is updated by the update program stored in the temporary storage unit, the execution target program is updated without preparing a dedicated external device. be able to.
また、本実施の形態によれば、更新用プログラムの更新準備が完了してから、実行対象プログラムを更新するため、更新用プログラムの入力途中に電源障害などが発生しても、実行対象プログラムに対する弊害の防止を図ることができる。 Further, according to the present embodiment, since the execution target program is updated after the update program update preparation is completed, even if a power failure or the like occurs during the input of the update program, It is possible to prevent harmful effects.
また、本実施の形態によれば、仮想初期起動プログラムを含む更新用プログラムによって実行対象プログラムを更新するため、初期起動プログラムの更新をしなくてもよい。したがって、更新途中に電源障害などが発生しても、復旧後には初期起動プログラムによって自装置を起動することができる。 Further, according to the present embodiment, since the execution target program is updated by the update program including the virtual initial startup program, the initial startup program need not be updated. Therefore, even if a power failure or the like occurs during the update, the self-device can be activated by the initial activation program after recovery.
すなわち、本実施の形態によれば、電源障害の復旧後であっても、初期起動プログラムによって実行対象プログラムの更新あるいは実行をおこなうことができる。具体的には、たとえば、本実施の形態によれば、電源障害の復旧後に再稼働情報が入力されると、電源障害によって更新途中であるため、初期起動プログラムによって更新を継続あるいはやり直しすることができる。また、本実施の形態によれば、電源障害があっても更新が終了していれば、初期起動プログラムによって仮想初期起動プログラムを実行させて、実行対象プログラムを実行することができる。 That is, according to the present embodiment, the execution target program can be updated or executed by the initial activation program even after the power failure is recovered. Specifically, for example, according to the present embodiment, when re-operation information is input after recovery from a power failure, the update is in progress due to a power failure, so the update may be continued or re-executed by the initial startup program. it can. In addition, according to the present embodiment, if the update is completed even if there is a power failure, the virtual target startup program can be executed by the initial startup program, and the execution target program can be executed.
くわえて、実行対象プログラムは、仮想初期起動プログラムによって実行されることとなるため、汎用性に富んだ実行対象プログラムの配置を設計でき、プログラム実行領域の利用の効率化を図ることができる。換言すれば、初期起動プログラムの代わりに、実行対象プログラムとあわせて更新される仮想初期起動プログラムによって、実行対象プログラムを実行するため、初期起動プログラムによって制限される配置ではなく、仮想初期起動プログラムに設定される自由度のある配置を実現できる。 In addition, since the execution target program is executed by the virtual initial activation program, it is possible to design the arrangement of the execution target program with high versatility and to improve the efficiency of use of the program execution area. In other words, since the execution target program is executed by the virtual initial startup program that is updated together with the execution target program instead of the initial startup program, the virtual initial startup program is not limited to the arrangement limited by the initial startup program. An arrangement with a set degree of freedom can be realized.
また、本実施の形態によれば、更新用プログラムを検証することによって、実行対象プログラムを実行可能な形式に更新するため、的確な実行対象プログラムの更新を図ることができる。 In addition, according to the present embodiment, the execution target program is updated to an executable format by verifying the update program, so that the execution target program can be updated accurately.
以下に、本発明の実施例について説明する。本実施例では、たとえば、フラッシュROM(Read Only Memory)内蔵のワンチップマイコンによって、本発明の情報処理装置を実施した場合の一例について説明する。 Examples of the present invention will be described below. In the present embodiment, an example in which the information processing apparatus of the present invention is implemented by a one-chip microcomputer with a built-in flash ROM (Read Only Memory) will be described.
(ワンチップマイコンのハードウェア構成)
まず、図4を用いて、本実施例にかかるワンチップマイコンのハードウェア構成について説明する。図4は、本実施例にかかるワンチップマイコンのハードウェア構成の一例を示すブロック図である。
(Hardware configuration of one-chip microcomputer)
First, the hardware configuration of the one-chip microcomputer according to the present embodiment will be described with reference to FIG. FIG. 4 is a block diagram illustrating an example of a hardware configuration of the one-chip microcomputer according to the present embodiment.
図4において、ワンチップマイコン400は、CPU401と、フラッシュROM402と、RAM(Random Access Memory)403と、入出力I/F(インターフェース)404と、を備えている。また、各構成部401〜404は、バス410によってそれぞれ接続されている。
In FIG. 4, the one-
まず、CPU401はワンチップマイコン400の全体の制御を司る。具体的には、たとえば、CPU401は、フラッシュROM402に記録されたプログラムを読み込み、RAM403をワークエリアとして読み込んだプログラムを実行する構成でもよい。
First, the
フラッシュROM402は、ブートプログラムや実行対象となる実行対象プログラムなどの各種プログラムを記録している。詳細は図5を用いて説明するが、フラッシュRAM402は、たとえば、各種プログラムを書き換え可能に記録し、電源を切ってもデータが消えない不揮発性半導体メモリなどである。
The
RAM403は、CPU401のワークエリアとして使用される。具体的には、たとえば、RAM403は、データの書き込みと読み出しが随時可能な半導体メモリでもよく、CPU401によって読み込まれたプログラムを実行するためのワークエリアとなる。
The
入出力I/F404は、図示しない外部機器に接続され、ワンチップマイコン400とCPU401とのインターフェースとして機能する。入出力I/F404は、さらに、有線あるいは無線などを介してインターネットなどの通信網に接続され、この通信網とCPU401とのインターフェースとしても機能する。
The input / output I /
また、詳細は図5に後述するが、入出力I/F404は、ワンチップマイコン400の外部に接続されたマイコンから、マイコン間通信によってフラッシュROM402に記録された実行対象プログラムに対する更新用プログラムの入力を受け付けることとしてもよい。
Although details will be described later with reference to FIG. 5, the input / output I /
なお、図4では説明を省略したが、本実施例にかかるワンチップマイコン400は、CPU401、フラッシュROM402、RAM403、入出力I/F404のほかに、タイマ、LCD(Liquid Crystal Display)ドライバ、MMU(Memory Management Unit)、DMAC(Direct Memory Access Contoroller)、A/D(Analog/Digital)コンバータなどの周辺機能を備えていてもよい。
Although not described in FIG. 4, the one-
なお、実施の形態にかかる情報処理装置200の機能的構成のうち、更新用プログラム入力部201や再稼働情報入力部206は入出力I/F404によって、一時保存部202や判定部203や生成部204や更新情報保存部205や判断部207や更新部208や実行部209はCPU401がフラッシュROM402やRAM403に記録された各種プログラムを実行することによって、それぞれその機能を実現する。
Of the functional configuration of the
(ワンチップマイコン400における実行対象プログラムの更新の概要)
つぎに、図5を用いて、本実施例にかかるワンチップマイコン400における実行対象プログラムの更新の概要について説明する。図5は、本実施例にかかるワンチップマイコンにおける実行対象プログラムの更新の概要を示す説明図である。
(Overview of updating the execution target program in the one-chip microcomputer 400)
Next, an outline of updating the execution target program in the one-
図5において、プログラム更新システム500は、ワンチップマイコン400と、更新用プログラム送信側マイコン502と、フラッシュメモリ503と、から構成されている。
In FIG. 5, the
ワンチップマイコン400における図4に示したフラッシュROM402は、有効プログラム情報保存領域510と、空き領域511と、更新用プログラム保存領域512と、有効プログラム領域513と、IPL領域514と、Vector領域515と、から構成されている。
The
有効プログラム情報保存領域510は、後述する有効プログラム領域513に記録された実行対象プログラムの更新準備が完了した旨を示す更新情報を保存する領域である。具体的には、たとえば、更新情報は、後述する更新用プログラム保存領域512に、更新用プログラム送信側マイコン502から複数回に分割されて入力される更新用プログラムに過不足がない場合、更新準備が完了したこととする情報でもよい。
The effective program
また、更新情報は、たとえば、実行対象プログラムの更新準備が完了した旨を示す代わりに、更新準備が完了していない旨を示す情報であってもよい。 The update information may be information indicating that the update preparation is not completed, for example, instead of indicating that the preparation for update of the execution target program is completed.
空き領域511は、本実施例におけるフラッシュROM402の未使用領域であり、初期設定によって変更することができる。
The
更新用プログラム保存領域512は、後述する更新用プログラム送信側マイコン502から送信される更新用プログラムを一時的に保存する領域である。更新用プログラムは、たとえば、マイコン間通信によって更新用プログラム送信側マイコン502から図示しない入出力I/F404を介して入力され、ワンチップマイコン400の実行対象となる実行対象プログラムの更新用のプログラムである。
The update
また、更新用プログラムは、たとえば、図示しないCPU401によって有効プログラム情報保存領域510に保存された更新情報が参照されて更新準備が完了している場合に、有効プログラム領域513に複製(コピー)される。換言すれば、更新用プログラムは、たとえば、CPU401によって実行対象プログラムに対して上書き保存され、その実行対象プログラムが更新されることとなる。
The update program is copied (copied) to the
このように、更新情報を参照して実行対象プログラムの更新をおこなう構成とすれば、更新用プログラムが不完全な状態で実行対象プログラムを更新して不具合を引き起こすことを防ぐことができる。すなわち、電源障害など、何らかの障害によって更新用プログラムの一時保存がストップしてしまった場合、リセットスタートによってストップした時点の更新用プログラムによって中途半端な状態の実行対象プログラムの更新はおこなわずに、一つ前の手順に戻って、更新用プログラムの一時保存を開始することができる。 As described above, when the execution target program is updated with reference to the update information, it is possible to prevent the execution target program from being updated in a state where the update program is incomplete and causing problems. In other words, if the temporary storage of the update program is stopped due to some failure, such as a power failure, the program to be executed in the halfway state is not updated by the update program at the time when it was stopped by the reset start. Returning to the previous procedure, the temporary storage of the update program can be started.
また、更新用プログラムは、実行対象プログラムとして実行される際に、初期起動プログラムによって実行される仮想初期起動プログラムを含む構成でもよい。初期起動プログラムは、たとえば、再稼働(リセットスタート)の際に起動されるプログラムである。 Further, the update program may include a virtual initial startup program executed by the initial startup program when executed as the execution target program. The initial activation program is, for example, a program that is activated at the time of re-operation (reset start).
有効プログラム領域513は、ワンチップマイコン400の実行対象となる実行対象プログラムを保存する領域である。詳細は図6を用いて説明するが、有効プログラム領域513に保存された実行対象プログラムは、複数でもよく、図示しないCPU401に読み込まれて実行されることとしてもよい。
The
また、有効プログラム領域513に更新用プログラムが複製された場合、CPU401は、複製された更新用プログラムを検証することによって、実行対象プログラムを実行可能な形式に更新することとしてもよい。具体的には、たとえば、更新用プログラムの検証は、更新用プログラムが実行対象プログラムとして過不足なく複製されたか否かを確認する構成でもよい。
When the update program is copied to the
IPL領域514は、リセットスタート時に図示しないCPU401によって最初に実行される初期起動プログラムを保存する領域である。具体的には、たとえば、IPL領域514は、更新用プログラム保存領域512に一時保存された更新用プログラムを有効プログラム領域513に複製するか、有効プログラム領域513に保存された各実行対象プログラムを実行するかを決定するプログラムを保存する。
The
Vector領域515は、イベント発生時にワンチップマイコン400の実行対象となるプログラムのアドレスを格納する。具体的には、たとえば、図示しないCPU401は、リセットスタート時には、Vector領域515を参照してIPL領域514に保存されたプログラムのアドレスを読み込む。また、CPU401は、たとえば、通常起動時には、Vector領域515を参照して有効プログラム領域513に保存された各実行対象プログラムのアドレスを読み込むこととしてもよい。
The
このように、IPL領域514およびVector領域515に保存されたデータは、更新用プログラムによって書き換えをおこなわないため、更新用プログラムの一時保存中や、実行対象プログラムの更新中に障害が発生しても、リセットスタートによって、CPU401がIPL領域514およびVector領域515に保存されたデータを参照すれば、ワンチップマイコン400の動作を正常に再開することができる。
As described above, since the data stored in the
更新用プログラム送信側マイコン502は、ワンチップマイコン400に対して、ワンチップマイコン400の実行対象となる実行対象プログラムの更新用プログラムを送信する。具体的には、たとえば、更新用プログラム送信側マイコン502は、フラッシュメモリ503が保存している更新用プログラムを読み込んで、読み込んだ更新用プログラムをワンチップマイコン400に送信する。
The update program
フラッシュメモリ503は、各種データを保存することができる記録媒体で、図5では、ワンチップマイコン400の実行対象となる実行対象プログラムの更新用プログラムを保存する。具体的には、たとえば、フラッシュメモリ503は、更新用プログラム送信側マイコン502に対して、保存している更新用プログラムを出力する。
The
ここで、図6を用いて、有効プログラム領域513に保存されるプログラムについて説明する。図6は、本実施例にかかる有効プログラム領域に保存されるプログラムについて示す説明図である。
Here, a program stored in the
図6において、有効プログラム領域513は、仮想初期起動プログラムを保存する仮想Vector領域601と、実行対象となる実行対象プログラムa,b,cを保存する実行対象プログラム領域602と、から構成されている。
In FIG. 6, the
仮想Vector領域601に保存された仮想初期起動プログラムは、リセットスタート時に、通常起動である場合に図示しないCPU401によって読み込まれる。仮想初期起動プログラムは、たとえば、通常起動時に実行対象となる実行対象プログラムa,b,cを実行させるプログラムで、CPU401に対して、実行対象プログラム領域602に保存された実行対象プログラムa,b,cのアドレスを指定する構成でもよい。
The virtual initial activation program stored in the
具体的には、たとえば、CPU401は、リセットスタート時に、Vector領域515を参照してIPL領域514に保存されたプログラムのアドレスを読み込むことによって、更新用プログラムの複製(実行対象プログラムの更新)、あるいは、実行対象プログラムを実行する。
Specifically, for example, the
より具体的には、たとえば、CPU401は、有効プログラム情報保存領域510に保存された更新情報に基づいて、更新用プログラムの複製、あるいは、実行対象プログラムの実行を選択し、実行対象プログラムを実行する場合、Vector領域515を参照して、仮想Vector領域601のアドレスを読み込む。
More specifically, for example, the
そして、CPU401は、仮想Vector領域601に保存された仮想初期起動プログラムによってアドレスが指定される実行対象プログラムa,b,cを実行することとしてもよい。
Then, the
このように、IPL領域514およびVector領域515は更新せずに、有効プログラム領域513における仮想初期起動プログラムを保存する仮想Vector領域601および実行対象プログラム領域602を更新することで、実行対象プログラムa,b,cの配置に関する制限を最小限に抑制することができる。
As described above, the
換言すれば、たとえば、図1に示すように、仮想初期起動プログラムがないと、Vector領域113を更新しない場合は、各実行対象プログラムa,b,cを保存する領域に余裕を持たせた配置としなければならない。一方で、Vector領域113を更新用プログラムによって更新する場合は、プログラムの更新中に電源障害などが発生すると、Vector領域113に不具合が発生してしまい、プログラム実行マイコン101が動作しなくなってしまう。
In other words, for example, as shown in FIG. 1, if there is no virtual initial activation program and the
(ワンチップマイコン400の処理の内容)
つぎに、図7〜図9を用いて、本実施例にかかるワンチップマイコン400の処理の内容について説明する。図7は、本実施例にかかるワンチップマイコンにおける更新用プログラムの受け付け処理手順を示すフローチャートである。図7のフローチャートにおいて、まず、入出力I/F404によって、更新用プログラム送信側マイコン502からプログラム更新準備完了通知を受け付けたか否かを判断する(ステップS701)。プログラム更新準備完了通知は、たとえば、更新用プログラム送信側マイコン502がフラッシュメモリ503やその他外部機器から更新用プログラムを取得した場合、更新用プログラム送信側マイコン502からワンチップマイコン400に送信されることとしてもよい。
(Contents of processing by the one-chip microcomputer 400)
Next, contents of processing of the one-
ステップS701において、プログラム更新準備完了通知を受け付けるのを待って、受け付けた場合(ステップS701:Yes)は、ワンチップマイコン400は、プログラム更新モードへ移行し(ステップS702)、CPU401によって、更新用プログラム保存領域512を初期化する(ステップS703)。更新用プログラム保存領域512の初期化は、たとえば、更新用プログラム保存領域512の容量を空きとすることでもよく、すなわち、更新用プログラム保存領域512に中途半端なデータがあった場合は消去することとしてもよい。
In step S701, after waiting for acceptance of the program update preparation completion notification (step S701: Yes), the one-
つぎに、入出力I/F404によって、ステップS703において更新用プログラム保存領域512が初期化されたら、更新用プログラム送信側マイコン502に対して、受け入れ可能通知を出力する(ステップS704)。
Next, when the update
そして、入出力I/F404によって、ステップS704において出力された受け入れ可能通知に応じて更新用プログラム送信側マイコン502から出力される、更新用プログラムのデータをパケット受信する(ステップS705)。
Then, the input / output I /
つぎに、入出力I/F404によって、ステップS705においてパケット受信された更新用プログラムのデータについて、更新用プログラム送信側マイコン502に対して、パケット受信完了通知を出力する(ステップS706)。
Next, the input / output I /
つづいて、入出力I/F404によって、更新用プログラムをすべて受信したか否かを判断する(ステップS707)。更新用プログラムをすべて受信したか否かの判断は、たとえば、ステップS705においてパケット受信される最後の更新用プログラムのデータに付与されるフラグを受信した場合に、すべて受信したと判断する構成でもよい。 Subsequently, it is determined whether or not all the update programs have been received by the input / output I / F 404 (step S707). The determination as to whether or not all the update programs have been received may be, for example, a configuration in which it is determined that all the update programs have been received when the flag attached to the data of the last update program received in the packet in step S705 is received. .
ステップS707において、更新用プログラムをすべて受信した場合(ステップS707:Yes)は、CPU401によって、更新用プログラム保存領域512に一時保存される更新用プログラムのチェックサムを確認する(ステップS708)。チェックサムは、たとえば、複数回に分割されてパケット受信される更新用プログラムが、すべて更新用プログラム保存領域512に一時保存されたか否かを判定することとしてもよい。
If all the update programs have been received in step S707 (step S707: Yes), the
また、ステップS707において、更新用プログラムをすべて受信しない場合(ステップS707:No)は、ステップS705に戻って処理を繰り返す。 In step S707, when all the update programs are not received (step S707: No), the process returns to step S705 and the process is repeated.
つぎに、ステップS708においてチェックサムを確認したら、CPU401によって、有効プログラム情報保存領域510に更新用プログラム準備完了状態であることを書き込む(ステップS709)。更新用プログラム準備完了状態の書き込みは、たとえば、実行対象プログラムの更新準備が完了した旨を示す更新情報を有効プログラム情報保存領域510に保存することである。
Next, when the checksum is confirmed in step S708, the
なお、図7のフローチャートでは説明を省略するが、ステップS708においてチェックサムが確認できない場合は、エラーとして、再度更新用プログラム送信側マイコン502に対して、更新用プログラムを要求することとしてもよい。
Although not described in the flowchart of FIG. 7, if the checksum cannot be confirmed in step S708, an update program may be requested again from the update program
そして、入出力I/F404によって、更新用プログラム送信側マイコン502に対してシャットダウン要求を出力する(ステップS710)。その後、入出力I/F404によって、更新用プログラム送信側マイコン502からステップS710におけるシャットダウン要求に応じたシャットダウン完了通知を受信して(ステップS711)、一連の更新用プログラムの受け付け処理を終了する。
The input / output I /
つづいて、図8を用いて、本実施例にかかるワンチップマイコン400の起動処理手順について説明する。図8は、本実施例にかかるワンチップマイコンの起動処理手順を示すフローチャートである。図8のフローチャートにおいて、まず、入出力I/F404によって、リセットスタートを受け付ける(ステップS801)。
Next, the activation process procedure of the one-
ステップS801において、リセットスタートを受け付けると、CPU401によって、IPL領域514に保存されたIPLを起動して(ステップS802)、有効プログラム情報保存領域510を参照する(ステップS803)。
In step S801, upon receiving a reset start, the
そして、CPU401によって、ステップS803において参照された有効プログラム情報保存領域510の更新情報より、更新用プログラム準備は完了しているか否かを判断する(ステップS804)。更新用プログラム準備は、たとえば、有効プログラム情報保存領域510に更新用プログラム準備完了状態であることが書き込まれている(たとえば、図7に示したステップS709)か否かを判断することとしてもよい。
Then, the
ステップS804において、更新用プログラム準備が完了している場合(ステップS804:Yes)は、CPU401によって、コピープログラムを起動させる(ステップS805)。コピープログラムは、たとえば、更新用プログラム保存領域512に一時保存された更新用プログラムを有効プログラム領域513に保存された実行対象プログラムなど各種プログラムに上書き保存するプログラムでもよい。
If the update program preparation has been completed in step S804 (step S804: Yes), the
そして、ステップS805において起動されたコピープログラムによるコピーが終了するのを待って(ステップS806:No)、終了した場合(ステップS806:Yes)は、CPU401によって、有効プログラム領域513にコピーされたプログラムを検証する(ステップS807)。プログラムの検証は、たとえば、更新用プログラムが実行対象プログラムとして過不足なくコピーされたか否かを確認する構成でもよい。
Then, after waiting for the copy by the copy program activated in step S805 to end (step S806: No), if it ends (step S806: Yes), the
そして、ステップS807においてプログラムの検証をおこなったら、CPU401によって、有効プログラム情報保存領域510に通常起動状態であることを書き込んで(ステップS808)、ステップS801へ戻って処理を繰り返す。
When the program is verified in step S807, the
なお、図8のフローチャートでは説明を省略するが、ステップS807においてプログラムの検証の結果、実行対象プログラムとして過不足なくコピーされていない場合は、エラーとして、更新用プログラム保存領域512からのコピーを再度おこなうこととしてもよい。
Although not described in the flowchart of FIG. 8, if the result of program verification in step S807 indicates that the execution target program has not been copied without excess or deficiency, copying from the update
また、ステップS804において、更新用プログラム準備が完了していない場合(ステップS804:No)は、CPU401によって、ステップS803において参照された有効プログラム情報保存領域510への書き込みが通常起動状態であるか否かを判断する(ステップS809)。
If the update program preparation is not completed in step S804 (step S804: No), whether or not writing to the valid program
ステップS809において、通常起動状態である場合(ステップS809:Yes)は、CPU401によって、有効プログラム領域513のプログラムを起動させる(ステップS810)。
In step S809, when it is in the normal activation state (step S809: Yes), the
具体的には、たとえば、有効プログラム領域513のプログラムの起動は、CPU401によって、Vector領域515を参照して、仮想Vector領域601のアドレスを読み込む。そして、CPU401によって、仮想Vector領域601に保存された仮想初期起動プログラムによってアドレスが指定される実行対象プログラムa,b,cを実行することとしてもよい。
Specifically, for example, when the program in the
また、ステップS809において、通常起動状態でない場合(ステップS809:No)は、ステップS801へ戻って処理を繰り返す。 In step S809, when it is not in the normal activation state (step S809: No), the process returns to step S801 and the process is repeated.
つぎに、入出力I/F404によって、割り込み処理を受け付けたか否かを判断する(ステップS811)。ステップS811において、割り込み処理を受け付けた場合(ステップS811:Yes)は、CPU401によって、割り込み処理をおこなって(ステップS812)、プログラムが終了したか否かを判断する(ステップS813)。なお、割り込み処理の詳細は、図9に後述する。
Next, it is determined by the input / output I /
また、ステップS811において、割り込み処理を受け付けない場合(ステップS811:No)は、ステップS813へ移行して、プログラムが終了したか否かを判断する(ステップS813)。 If interrupt processing is not accepted in step S811 (step S811: No), the process proceeds to step S813, and it is determined whether the program is completed (step S813).
ステップS813において、プログラムが終了した場合(ステップS813:Yes)は、ステップS801へ戻って処理を繰り返す。また、ステップS813において、プログラムが終了しない場合(ステップS813:No)は、ステップS810へ戻って処理を繰り返す。 If the program ends in step S813 (step S813: YES), the process returns to step S801 and the process is repeated. If the program does not end in step S813 (step S813: No), the process returns to step S810 to repeat the process.
つぎに、図9を用いて、本実施例にかかるワンチップマイコン400における割り込み処理(図8のステップS812)手順について説明する。図9は、本実施例にかかるワンチップマイコンにおける割り込み処理(図8のステップS812)手順を示すフローチャートである。図9のフローチャートにおいて、まず、CPU401によって、仮想Vector領域601を参照する(ステップS901)。
Next, an interrupt process (step S812 in FIG. 8) in the one-
つぎに、CPU401によって、ステップS901において参照された仮想Vector領域601に保存された仮想初期起動プログラムを起動させて、実行対象プログラム領域602を参照する(ステップS902)。
Next, the
そして、CPU401によって、ステップS902において参照された実行対象プログラム領域602に保存されたプログラムの中から実行対象となるプログラムを起動させて(ステップS903)、一連の割り込み処理を終了する。
Then, the
以上説明したように、本実施例にかかるワンチップマイコンによれば、更新用プログラム保存領域に保存された更新用プログラムによって実行対象プログラムを更新するため、更新専用の外部機器を用意することなく、適切に実行対象プログラムを更新することができる。 As described above, according to the one-chip microcomputer according to the present embodiment, the execution target program is updated by the update program stored in the update program storage area. The execution target program can be updated appropriately.
また、有効プログラム情報保存領域に更新用プログラム準備完了状態であることが書き込まれてから、実行対象プログラムを更新する構成であるため、更新用プログラム準備完了状態となる前に電源障害などが発生しても、復旧後にはワンチップマイコンは正常に起動することができる。 In addition, since the program to be executed is updated after the update program ready state is written in the valid program information storage area, a power failure occurs before the update program ready state is entered. However, the one-chip microcomputer can start up normally after recovery.
さらに、Vector領域の書き換えをおこなわずに、仮想Vector領域を含む有効プログラム領域を更新する構成であるため、更新途中に電源障害などが発生しても、復旧後にはワンチップマイコンは正常に起動することができ、有効プログラム領域の効率的な利用を図ることができる。 Furthermore, since the effective program area including the virtual vector area is updated without rewriting the vector area, even if a power failure occurs during the update, the one-chip microcomputer will start up normally after recovery. And effective use of the effective program area can be achieved.
200 情報処理装置
201 更新用プログラム入力部
202 一時保存部
203 判定部
204 生成部
205 更新情報保存部
206 再稼働情報入力部
207 判断部
208 更新部
209 実行部
DESCRIPTION OF
Claims (2)
前記メモリは、
実行対象となるプログラムのアドレスを保存するVector領域、
リセットスタート時に実行される初期起動プログラムを保存するIPL領域、
実行対象プログラムを保存する実行対象プログラム領域と、リセットスタート時に前記実行対象プログラムを実行させるための仮想初期起動プログラムを保存する仮想Vect
or領域と、から構成される有効プログラム領域、および
前記有効プログラム領域のプログラムを更新するための更新用プログラムを一時保存する更新用プログラム保存領域、
を有し、
前記制御手段は、
リセットスタートを受け付けた場合に、前記Vector領域を参照して前記IPL領域の初期起動プログラムを実行して、前記更新用プログラム保存領域に更新用プログラムが不足なく保存されて更新準備が完了しているか否かを判定し、
前記更新準備が完了している場合には前記更新用プログラムを前記有効プログラム領域に複製し、前記更新準備が完了していない場合には前記仮想Vector領域の仮想初期起動プログラムを実行して前記実行対象プログラム領域の実行対象プログラムを実行することを特徴とする情報処理装置。An information processing apparatus comprising a memory for storing a program and a control means for executing the program,
The memory is
A Vector area that stores the address of the program to be executed,
IPL area for storing the initial startup program executed at reset start,
An execution target program area for storing an execution target program, and a virtual Vect for storing a virtual initial startup program for executing the execution target program at reset start
or area, an effective program area, and an update program storage area for temporarily storing an update program for updating a program in the effective program area,
Have
The control means includes
When a reset start is accepted, the initial activation program of the IPL area is executed with reference to the Vector area, and the update program is stored in the update program storage area without any shortage, and the update preparation is completed. Determine whether or not
When the update preparation is completed, the update program is copied to the valid program area, and when the update preparation is not completed, the virtual initial activation program in the virtual vector area is executed and the execution is executed. An information processing apparatus that executes an execution target program in a target program area.
前記メモリは、
実行対象となるプログラムのアドレスを保存するVector領域、
リセットスタート時に実行される初期起動プログラムを保存するIPL領域、
実行対象プログラムを保存する実行対象プログラム領域と、リセットスタート時に前記実行対象プログラムを実行させるための仮想初期起動プログラムを保存する仮想Vector領域と、から構成される有効プログラム領域、および
前記有効プログラム領域のプログラムを更新するための更新用プログラムを一時保存する更新用プログラム保存領域、
を有し、
リセットスタートを受け付けた場合に、前記Vector領域を参照して前記IPL領域の初期起動プログラムを実行して、前記更新用プログラム保存領域に更新用プログラムが不足なく保存されて更新準備が完了しているか否かを判定し、
前記更新準備が完了している場合には前記更新用プログラムを前記有効プログラム領域に複製し、前記更新準備が完了していない場合には前記仮想Vector領域の仮想初期起動プログラムを実行して前記実行対象プログラム領域の実行対象プログラムを実行する制御工程を含むことを特徴とする情報処理方法。An information processing method executed by an information processing apparatus including a memory for storing a program,
The memory is
A Vector area that stores the address of the program to be executed,
IPL area for storing the initial startup program executed at reset start,
An effective program area configured to store an execution target program area for storing the execution target program, and a virtual vector area for storing a virtual initial startup program for causing the execution target program to be executed at reset start, and Update program storage area for temporarily storing an update program for updating the program,
Have
When a reset start is accepted, the initial activation program of the IPL area is executed with reference to the Vector area, and the update program is stored in the update program storage area without any shortage, and the update preparation is completed. Determine whether or not
When the update preparation is completed, the update program is copied to the valid program area, and when the update preparation is not completed, the virtual initial activation program in the virtual vector area is executed and the execution is executed. An information processing method comprising a control step of executing an execution target program in a target program area.
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2006/319881 WO2008041337A1 (en) | 2006-10-04 | 2006-10-04 | Information processing device, information processing method, information processing program and computer readable recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2008041337A1 JPWO2008041337A1 (en) | 2010-02-04 |
| JP5016604B2 true JP5016604B2 (en) | 2012-09-05 |
Family
ID=39268205
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008537391A Expired - Fee Related JP5016604B2 (en) | 2006-10-04 | 2006-10-04 | Information processing apparatus and information processing method |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP5016604B2 (en) |
| WO (1) | WO2008041337A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020017315A (en) * | 2019-10-21 | 2020-01-30 | パナソニックIpマネジメント株式会社 | Control method and communication device using the same |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09238213A (en) * | 1996-02-29 | 1997-09-09 | Ricoh Co Ltd | Communication device |
| WO1997038367A1 (en) * | 1996-04-11 | 1997-10-16 | Hitachi, Ltd. | Disk drive and computer |
| JP2002007128A (en) * | 2000-06-19 | 2002-01-11 | Nec Soft Ltd | Module distribution and preservation system and module distribution and preservation method |
| JP2002063044A (en) * | 2000-08-21 | 2002-02-28 | Matsushita Electric Ind Co Ltd | Arithmetic device and program rewriting method |
| JP2002244877A (en) * | 2001-02-19 | 2002-08-30 | Nec Corp | Printer device and program updating method for the same |
| JP2005332228A (en) * | 2004-05-20 | 2005-12-02 | Nec Engineering Ltd | Program switching controller |
| JP2006060355A (en) * | 2004-08-18 | 2006-03-02 | Matsushita Electric Ind Co Ltd | Device program update system and method |
-
2006
- 2006-10-04 JP JP2008537391A patent/JP5016604B2/en not_active Expired - Fee Related
- 2006-10-04 WO PCT/JP2006/319881 patent/WO2008041337A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09238213A (en) * | 1996-02-29 | 1997-09-09 | Ricoh Co Ltd | Communication device |
| WO1997038367A1 (en) * | 1996-04-11 | 1997-10-16 | Hitachi, Ltd. | Disk drive and computer |
| JP2002007128A (en) * | 2000-06-19 | 2002-01-11 | Nec Soft Ltd | Module distribution and preservation system and module distribution and preservation method |
| JP2002063044A (en) * | 2000-08-21 | 2002-02-28 | Matsushita Electric Ind Co Ltd | Arithmetic device and program rewriting method |
| JP2002244877A (en) * | 2001-02-19 | 2002-08-30 | Nec Corp | Printer device and program updating method for the same |
| JP2005332228A (en) * | 2004-05-20 | 2005-12-02 | Nec Engineering Ltd | Program switching controller |
| JP2006060355A (en) * | 2004-08-18 | 2006-03-02 | Matsushita Electric Ind Co Ltd | Device program update system and method |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2008041337A1 (en) | 2010-02-04 |
| WO2008041337A1 (en) | 2008-04-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5431111B2 (en) | Information processing apparatus and system setting method | |
| KR100584338B1 (en) | Software update method and system | |
| CN101169749A (en) | Software version upgrade management device and software version upgrade management method | |
| JP7232062B2 (en) | Electronic controller and program update method | |
| JP2005157528A (en) | Memory device | |
| JP5754264B2 (en) | Program execution device, image processing device, and program | |
| JP5747680B2 (en) | Information processing apparatus, image forming apparatus, and program | |
| JP5016604B2 (en) | Information processing apparatus and information processing method | |
| JP2018160207A (en) | In-vehicle control device and program update software | |
| JP6575157B2 (en) | Firmware download method and firmware embedded device | |
| JP2002189609A (en) | System and method for updating software adapted to accident | |
| JP2004220575A (en) | Interface circuit for card-type memory, ASIC with the circuit, and image forming apparatus with the ASIC | |
| JP2015129994A (en) | Transmission program, transmission method, and transmission apparatus | |
| JP2018160208A (en) | On-vehicle controller and program update software | |
| JP2013004043A (en) | Information processing device, image forming apparatus, and program | |
| JP2013003984A (en) | Information processing apparatus, image forming apparatus, and program | |
| JP4478298B2 (en) | Data transfer system | |
| JP2021089643A (en) | Electronic control apparatus and electronic control method | |
| JP2021111916A (en) | Information processing device and program recovery method | |
| JP7491765B2 (en) | Firmware update system and firmware update method | |
| JP2004094725A (en) | Firmware rewriting device and firmware rewriting method | |
| JP2005228225A (en) | Memory card adapter | |
| JP2007042038A (en) | Device and method for controlling terminal equipment | |
| JP2025017216A (en) | Software writing method and control device | |
| JP2004246576A (en) | Program rewriting method and semiconductor device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120313 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120514 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120605 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120608 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150615 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |