JP2008059339A - Controller - Google Patents
Controller Download PDFInfo
- Publication number
- JP2008059339A JP2008059339A JP2006236275A JP2006236275A JP2008059339A JP 2008059339 A JP2008059339 A JP 2008059339A JP 2006236275 A JP2006236275 A JP 2006236275A JP 2006236275 A JP2006236275 A JP 2006236275A JP 2008059339 A JP2008059339 A JP 2008059339A
- Authority
- JP
- Japan
- Prior art keywords
- boot program
- program
- rewrite
- storage medium
- external storage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、制御装置に係り、特に、ブートプログラムの書き換えを行う書換え制御部を備える制御装置に関する。 The present invention relates to a control device, and more particularly to a control device including a rewrite control unit that rewrites a boot program.
コンピュータの起動では、電源の投入後、先ずROM(Read Only Memory)等に記録されたブートプログラムが演算回路であるCPU(Central Processing Unit)に読み出され、CPUの初期化処理、主記憶回路であるRAM(Random Access Memory)の初期化処理及び自己診断処理等が実行される。その後、オペレーションソフトウェア(以下、「OS」という。)、アプリケーションソフトウェア(以下、「アプリケーション」という。)の順で起動が行われるようになっている。 When the computer is turned on, after the power is turned on, first, a boot program recorded in a ROM (Read Only Memory) or the like is read out to a CPU (Central Processing Unit) which is an arithmetic circuit, and the CPU initialization processing and main memory circuit A RAM (Random Access Memory) initialization process, a self-diagnosis process, and the like are executed. Thereafter, the operation software (hereinafter referred to as “OS”) and application software (hereinafter referred to as “application”) are activated in this order.
ブートプログラムは、OSやアプリケーションを起動させる動作環境を整備・管理するプログラムであるため、その管理や書換えに関しては、OSやアプリケーションといったプログラムの管理や書換えに比して慎重を要し、またその設定変更も制限される部分が多い。例えば、ブート処理の管理に関し、特許文献1には、ブートプログラムの管理を行う分散制御装置に関する発明が開示されている。同発明では、ブートプログラムの初期化処理等においてあるべきフラグの状態を示す参照情報を予め保持しておき、実際にブートプログラムの処理が実行された後に、この処理の実行によって得られた各処理のフラグ状態と先の参照情報とを比較することで、ブート処理の誤作動を検出するようになっている。 Since the boot program is a program that maintains and manages the operating environment for starting the OS and applications, its management and rewriting require more care than the management and rewriting of programs such as the OS and applications, and their settings. Many changes are also limited. For example, regarding management of boot processing, Patent Document 1 discloses an invention related to a distributed control apparatus that manages boot programs. In the present invention, reference information indicating the state of a flag that should be in a boot program initialization process or the like is held in advance, and each process obtained by executing this process after the boot program process is actually executed A malfunction of the boot process is detected by comparing the flag state with the previous reference information.
このようにブートプログラムの管理は重要なプロセスであり、その書換え処理に関しても種々の方法がとられている。以下に、ブートプログラムの書換え方法に関する、従来例を説明する。 As described above, management of the boot program is an important process, and various methods are used for the rewriting process. A conventional example relating to a boot program rewriting method will be described below.
図6に、従来のブートプログラムの書換え方法を模式的に示す。同図(a)において、CPUボード100は、例えば、PC(パーソナルコンピュータ)、ワークステーション、携帯型電子情報機器(携帯電話機、PHS、PDA、タブレットPC等)あるいはサーバマシンに組み込まれ、制御部として機能する制御装置である。図では、特にCPU101とROM102のみを示している。ROM102は不揮発性の半導体メモリからなり、起動処理を行うブートプログラムA103が予め格納されている。このブートプログラムA103を他のブートプログラムB111に書き換える場合、例えば、PC110のように制御系を異にする他の書換え装置と、JTAG(Joint European Test Action Group)エミュレーションソフトウェア112及びJTAGエミュレータ113(以下、適宜「治具」という。)と、を用いてブートプログラムの書換えを行う方法がある。
FIG. 6 schematically shows a conventional boot program rewriting method. In FIG. 1A, a
PC110には、書換え用(更新用)のブートプログラムB111及びJTAGエミュレーションソフトウェア112が記憶される。JTAGエミュレーションソフトウェア112は、JTAGエミュレータ113を制御するアプリケーションプログラムである。JTAGエミュレータ113は、JTAGI/F(インターフェイス)114を介してCPUボード100と接続される。JTAGエミュレータ113は、JTAGエミュレーションソフトウェア112の制御の下、ブートプログラムB111をPC110から読み出し、ROM102に記録されているブートプログラムA103をブートプログラムB111に書き換える(更新する)書換え処理を実行する。
The PC 110 stores a rewrite (update) boot program B111 and JTAG
また、同図(b)は、ブートプログラムの書換え方法の他の従来例を示した模式図である。この例は、上述したJTAGエミュレーションソフトウェア112やJTAGエミュレータ113といった治具によりブートプログラムの書換え処理を他の装置に委ねることなく書き換える方法である。
FIG. 2B is a schematic diagram showing another conventional example of a boot program rewriting method. This example is a method of rewriting a boot program rewriting process by a jig such as the above-described JTAG
同図において、CPUボード150には、CPU101、ROM102、RAM105及び外部記憶媒体挿入口151が設けられる。ROM102には、当初ブートプログラムA103が記録されているものとする(なお、図ではブートプログラムB111に書き換えられた状態を示している。)。外部記憶媒体160は、例えば、半導体メモリからなる携行型の記録媒体であり、ブートプログラムB111が記憶保持される。
外部記憶媒体挿入口151に外部記憶媒体160が挿入されると、CPUボード150では、先ず、ROM102に当初から記録されているブートプログラムA103をRAM105にコピーし、RAM105上で動作を行い、外部記憶媒体160に記録されたブートプログラムB111を読み出し、ROM102に記憶されたブートプログラムA103をブートプログラムB111に書き換える処理を実行する。
When the
ところで、情報技術の飛躍的な発達によりPCを始めとした情報機器を取り巻くハードウェアやソフトウェアの環境も日々刷新され、それまでの機器では対応できない技術も提供され続けている。このため、既存の情報機器のブートプログラムの書換えも頻繁に行われるようになっているが、従来例(図6(a)参照)のように治具を用いてブートプログラムの書換えを行う方法では種々の問題がある。 By the way, with the dramatic development of information technology, the environment of hardware and software surrounding information devices such as PCs is being renewed every day, and technologies that cannot be supported by previous devices continue to be provided. For this reason, the boot program of the existing information device is frequently rewritten. However, in the method of rewriting the boot program using a jig as in the conventional example (see FIG. 6A), There are various problems.
例えば、各種プラントに設置される複数の工作機械等を管理する制御装置のブートプログラムを書き換える場合、書換え処理の度にCPUボードを制御装置から取り外し、上述の治具等を使用して書換え処理を行い、その後、再び制御装置本体にCPUボードを装着し直すといった手間を要する。即ち治具を直接的に接続しなければならないという物理操作上の事情から生ずる問題である。仮に、CPUボードを制御装置本体から取りはずすことなく、直接的に治具を接続できるようにCPUボードを設ける構成をとるとしても、書換え処理を実行するのに治具を必要とする煩雑さの問題は残る。 For example, when rewriting the boot program of a control device that manages a plurality of machine tools and the like installed in various plants, the CPU board is removed from the control device every time the rewriting process is performed, and the rewriting process is performed using the above-described jig or the like. After that, it takes time and effort to mount the CPU board on the control device body again. That is, the problem arises from the physical operation that the jig must be connected directly. Even if the CPU board is provided so that the jig can be directly connected without removing the CPU board from the control device main body, the problem of complexity that requires the jig to execute the rewriting process Remains.
また、図6(b)に示すように、携行型の外部記憶媒体を用いる書換え方法では、書換え処理でエラーが生じたときに問題が生ずる。即ち外部記憶媒体160に記録されたブートプログラムB111の書込み中にエラーが発生し、その書込みが中途半端になると、ブートプログラムB111を正常に動作させることができないばかりでなく、CPUボード150上に正常なブートプログラムが存在しなくなくため、再度書換え処理を実行することもできないという問題がある。この場合、上述の治具等を用いて書換え処理を行う必要がある。
Further, as shown in FIG. 6B, in the rewriting method using the portable external storage medium, a problem occurs when an error occurs in the rewriting process. That is, if an error occurs during the writing of the boot program B111 recorded in the
本発明は、上記課題に鑑みて行われたものであり、その目的とするところは、ブートプログラムの書換え処理に治具(エミュレータ及びそのソフトウェア)を使用することなく簡便に書換え処理を実行することができるとともにブートプログラムの書換え処理中にエラーが生じても再度書換え処理を容易に実行することのできるように安全性を確保したブートプログラムの書換えを行うことである。更には、更新されたブートプログラムを外部記憶媒体から取得する際、より効率的に更新されたブートプログラムを取得することのできる書換え処理を行うことである。 The present invention has been made in view of the above problems, and an object of the present invention is to easily execute a rewrite process without using a jig (emulator and its software) for the rewrite process of a boot program. In addition, it is possible to rewrite the boot program with safety so that the rewriting process can be easily executed again even if an error occurs during the boot program rewriting process. Furthermore, when the updated boot program is acquired from the external storage medium, a rewrite process that can acquire the updated boot program more efficiently is performed.
上記課題を解決するために、請求項1に記載の発明は、制御装置(例えば、図1に示すCPUボード1)であって、
ブートプラグラム(例えば、図1に示すブートプログラムA103)を格納する第1の格納部(例えば、図1に示す第2のプログラム格納領域11)と、
前記ブートプログラムを更新されたブートプログラム(例えば、図1に示すブートプログラムB111)に書換える書換え処理プログラム(例えば、図1に示すブートプログラムコピー処理プログラム21)を格納する第2の格納部(例えば、図1示す第1のブートプログラム格納領域10)と、
前記更新されたブートプログラムを外部記憶媒体(例えば、図1に示す外部記憶媒体160)から取得する取得部(例えば、図1に示す論理回路IC2)と、
前記書換え処理プログラムの指示に基づいて前記第1の格納部に記憶されたブートプログラムを前記更新されたブートプログラムに書き換える書換え処理を制御する書換え制御部(例えば、図1に示す論理回路IC2)と、を備えることを特徴とする。
In order to solve the above problems, the invention described in claim 1 is a control device (for example, the CPU board 1 shown in FIG. 1),
A first storage (for example, the second
A second storage unit (for example, a boot program
An acquisition unit (for example, the logic circuit IC2 illustrated in FIG. 1) that acquires the updated boot program from an external storage medium (for example, the
A rewrite control unit (for example, the logic circuit IC2 shown in FIG. 1) that controls a rewrite process for rewriting the boot program stored in the first storage unit with the updated boot program based on an instruction of the rewrite process program; It is characterized by providing.
請求項2に記載の発明は、請求項1に記載の制御装置において、前記書換え制御部の書換え処理を実行するか否かを規定するスイッチ部(例えば、図1に示す動作切替スイッチ3)を更に備え、
前記書換え部制御部は、前記スイッチ部の規定に基づいて前記書換え処理を実行することを特徴とする。
According to a second aspect of the present invention, in the control device according to the first aspect, a switch unit (for example, an
The rewrite unit control unit executes the rewrite process based on a rule of the switch unit.
請求項3に記載の発明は、請求項1又は2に記載の制御装置において、前記書換え制御部は、PLD(Programmable Logic Device)であることを特徴とする。 According to a third aspect of the present invention, in the control device according to the first or second aspect, the rewrite control unit is a PLD (Programmable Logic Device).
請求項4に記載の発明は、請求項3に記載の制御装置において、前記PLDは、FPGA(Field Programmable Gate Array)であることを特徴とする。 According to a fourth aspect of the present invention, in the control device according to the third aspect, the PLD is a field programmable gate array (FPGA).
請求項5に記載の発明は、請求項1から4のいずれか一項に記載の制御装置において、前記取得部は、前記外部記憶媒体から前記更新されたブートプログラムをメモリイメージデータとして取得することを特徴とする。 According to a fifth aspect of the present invention, in the control device according to any one of the first to fourth aspects, the acquisition unit acquires the updated boot program as memory image data from the external storage medium. It is characterized by.
請求項6に記載の発明は、請求項1から5のいずれか一項に記載の制御装置において前記外部記憶媒体は、PCMCIA(Personal Computer Memory Card International Association規格に準拠した記録媒体であることを特徴とする。 According to a sixth aspect of the present invention, in the control device according to any one of the first to fifth aspects, the external storage medium is a recording medium conforming to a PCMCIA (Personal Computer Memory Card International Association standard). And
請求項7に記載の発明は、請求項6に記載の制御装置において、前記外部記憶媒体はCF(コンパクトフラッシュ(登録商標))カードであることを特徴とする。 According to a seventh aspect of the present invention, in the control device according to the sixth aspect, the external storage medium is a CF (Compact Flash (registered trademark)) card.
請求項1に記載の発明によれば、第2の格納部に格納された書換え処理プログラムの指示に基づいて、書換え制御部が第1の格納部に格納されたブートプログラムを外部記憶媒体に格納された更新されたブートプログラムに書き換える書換え処理を行うため、治具を用いることなく簡便にブートプログラムの書換え処理を実行することができる。また、更新されたブートプログラムの書込み処理の実行中にエラーが生じても、書換え制御部が書換え処理プログラムに基づいて外部記憶媒体に格納された更新されたブートプログラムを再度書き込むことができる。従って、安全にブートプログラムの書換え処理に安全性を確保することができる。 According to the first aspect of the present invention, the rewrite control unit stores the boot program stored in the first storage unit in the external storage medium based on the instruction of the rewrite processing program stored in the second storage unit. Since the rewriting process for rewriting the updated boot program is performed, the rewriting process of the boot program can be easily executed without using a jig. Further, even if an error occurs during execution of the updated boot program write process, the rewrite control unit can rewrite the updated boot program stored in the external storage medium based on the rewrite process program. Therefore, it is possible to ensure safety in the rewriting process of the boot program.
請求項2に記載の発明によれば、書換え処理部がスイッチ部の規定に基づいて更新されたブートプログラムへの書換え処理を実行するため、不要な書換え処理を実行することなく、確実に書換え処理を実行することができる。 According to the second aspect of the invention, since the rewrite processing unit executes the rewrite processing to the boot program updated based on the specification of the switch unit, the rewrite processing is surely performed without executing unnecessary rewrite processing. Can be executed.
請求項3に記載の発明によれば、擬似的な回路構成をプログラムにより変更可能なPDLによって書込み処理を制御するため、種々の仕様変更や設計変更に対応した汎用性を持たせることができる。
According to the invention described in
請求項4に記載の発明によれば、擬似的な回路構成をプログラムにより変更可能なFPGAにより書込み処理を制御するため、種々の仕様変更や設計変更に対応した汎用性を持たせることができる。 According to the fourth aspect of the present invention, since the writing process is controlled by the FPGA whose pseudo circuit configuration can be changed by a program, versatility corresponding to various specification changes and design changes can be provided.
請求項5に記載の発明によれば、更新されたブートプログラムをメモリイメージデータとして取得するため、データ通信に関しファイルシステムを有さない制御装置であっても外部記憶媒体から更新されたブートプログラムを取得することができる。また、ファイルシステムを構成するドライバ等を必要としなくなるため、装置構成の簡素化及びコスト低減を図ることができる。特に、PLDやFPGAは、複雑な処理ロジックを組みにくい場合があるが、この様なデバイスを使用する場合にも容易にブートプログラムの書換え処理ができ有用である。 According to the fifth aspect of the present invention, in order to obtain the updated boot program as memory image data, the boot program updated from the external storage medium can be obtained even if the control device does not have a file system for data communication. Can be acquired. Further, since a driver or the like constituting the file system is not required, the apparatus configuration can be simplified and the cost can be reduced. In particular, PLD and FPGA may be difficult to assemble complicated processing logic, but even when such a device is used, the boot program can be easily rewritten and useful.
請求項6に記載の発明によれば、記録媒体の規格として標準であるPCMCIA規格の外務記録媒体を適用することができる。 According to the sixth aspect of the present invention, an external recording medium of the PCMCIA standard, which is a standard as a recording medium standard, can be applied.
請求項7に記載の発明によれば、PCMCIA規格の記録媒体の1つであるCFカードを適用することができる。 According to the seventh aspect of the present invention, a CF card which is one of PCMCIA standard recording media can be applied.
[第1の実施形態]
次に、図を用いて、本発明を実施するための最良の形態について説明する。なお、上述の従来例(図6(a)(b)参照)と機能構成を共通するものは同一符号を用いて説明する。
図1に、本発明を適用したCPUボード1の構成を示す。CPUボード1には、CPU101、論理回路IC(Integrated Circuit)2、ROM102、動作切替スイッチ3、リセットスイッチ4、RAM105、外部記憶媒体挿入口151が設けられ、これらが電気・電子的に接続される。
[First Embodiment]
Next, the best mode for carrying out the present invention will be described with reference to the drawings. In addition, what has the same functional configuration as the above-described conventional example (see FIGS. 6A and 6B) will be described using the same reference numerals.
FIG. 1 shows a configuration of a CPU board 1 to which the present invention is applied. The CPU board 1 is provided with a
論理回路IC(Integrated Circuit)2は、プログラム可能なPLD(Programmable Logic Device)でありLSI(Large Scale Integration)等から構成される。論理回路IC2は、後述する、外部記憶媒体160に記録されたブートプログラムB111を読み込み、それまで記録されていたブートプログラムA103の書換え処理(以下、書換え処理を「コピー処理」という。)を行う。
論理回路IC2としては、SPLD(Simple PLD)、CPLD(Complex PLD)又はFPGA(Field Programmable Gate Array)等を適用することができる。本実施の形態では、FPGAを適用するものとする。
A logic circuit IC (Integrated Circuit) 2 is a programmable PLD (Programmable Logic Device) and is composed of an LSI (Large Scale Integration) or the like. The logic circuit IC2 reads a boot program B111 recorded in the
As the logic circuit IC2, SPLD (Simple PLD), CPLD (Complex PLD), FPGA (Field Programmable Gate Array), or the like can be applied. In this embodiment, FPGA is applied.
ROM102には、第1プログラム格納領域10、第2プログラム格納領域11及び第3プログラム格納領域12が設けられる。第1プログラム格納領域10には、スタート処理プログラム20及びブートプログラムコピー処理プログラム21が格納される。
The
スタート処理プログラム20は、電源ON又はリセットスイッチ4によりリセットされると、CPU101に読み込まれ、CPUの初期化処理を行う。その後、動作切替スイッチ3のON/OFF状態を参照し、ONである場合に論理回路IC2にブートプログラムコピー処理プログラム21の読込みを指示する制御信号を送信させる。また、OFFである場合は、通常通りブートプログラムA103を読み込ませ、所定のブート処理を開始させる。
The
動作切替スイッチ3は、ユーザによってON/OFFの切替を可能とする物理スイッチ又は外部記憶媒体挿入口151に設けられ、外部記憶媒体160が挿入されるとONとなり、取り外されるとOFFとなる物理スイッチ等から構成される。動作切替スイッチ3がONである場合に、ブートプログラムのコピー処理を実行するようになっている。
なお、動作切替スイッチ3を物理スイッチとして構成する以外にも、ブートシーケンスにおいて、ROM102よりも外部記憶媒体160を優先するように構成してもよい。
また、リセットスイッチ4は、操作によりCPUボード1に供給される電力を瞬間的に遮断することでリセットを行うスイッチである。
The operation change-over
In addition to configuring the
The reset switch 4 is a switch that performs a reset by instantaneously cutting off the power supplied to the CPU board 1 by an operation.
ブートプログラムコピー処理プログラム21は、論理回路IC2にブートプログラムのコピー処理ロジックを形成させるプログラムである。即ちブートプログラムコピー処理プログラム21が読み込まれることにより、論理回路IC2には外部記憶媒体160に格納されたブートプログラムB111をROM102に書き込む擬似的な論理回路が形成される。
The boot program
第2プログラム格納領域11は、ブートプログラムの本体情報であるブートプログラムA103が記憶される領域である。CPU101は、第2プログラム格納領域11に記録されているブートプログラム(ブートプログラムA103あるいはコピー処理が行われた後はブートプログラムB111)に基づいてブート処理を行うようになっている。
The second
第3プログラム格納領域12には、基本システムプログラム(即ちオペレーションソフトウェア)30及び各種のアプリケーションプログラム31が格納される。ブート処理により基本システムプログラム30がワークエリアとしてのRAM105に展開され、その後、基本システムプログラム30の指示に従いCPU101はアプリケーションプログラム31を起動するようになっている。
In the third
外部記憶媒体160は、半導体メモリから構成される。第1の実施形態では、PCMCIA規格に準拠したSRAM(Static RAM)を適用する。なお、外部記憶媒体160は、外部接続するHDD等としてもよい。
The
外部記憶媒体挿入口151は、外部記憶媒体160を挿入するインターフェイスである。本実施の形態ではSRAM(Static RAM)カードを適用する例を示す。外部記憶媒体160には、更新プログラムとしてのブートプログラムB111が記憶されている。
The external storage
次に、図2に示すフロー図を用いて、CPUボード1の動作を説明する。
ステップS101で、電源のONあるいはリセットスイッチ4のONにより、CPU101に電力が供給される。
ステップS102で、CPU101は、ROM102の第1プログラム格納領域10からスタート処理プログラム20を読み出し、CPU101の初期化処理即ちスタート処理を開始する。
Next, the operation of the CPU board 1 will be described with reference to the flowchart shown in FIG.
In step S101, power is supplied to the
In step S <b> 102, the
次いで、ステップS103で、CPU101は、動作切替スイッチ3の設定状態を参照し、動作切替スイッチ3がONであるか否かを判断する。CPU101は、動作切替スイッチ3がONであると判断する場合、ステップS104の処理に進み(ステップS103:YES)、OFFであると判断する場合、ステップS105の処理に進む。
Next, in step S103, the
動作切替スイッチ3の設定状態がOFFであると判断したCPU101は、ステップS105で、CPU101は、ROM102の第2プログラム格納領域11に格納されているブートプログラム(ブートプログラムA103あるいはコピー処理後であればブートプログラムB111)に基づいてブート処理を実行する。
The
一方、動作切替スイッチ3がONであると判断したCPU101は、ステップS104で、ブートプログラムコピー処理を実行させる。即ちCPU101は、ROM102からブートプログラムコピー処理プログラム21を論理回路IC2に展開させ、ブートプログラムの書換えロジックを形成させる。ブートプログラムの書換えロジックが形成された論理回路IC2は、外部記憶媒体160からブートプログラムB111を読み出し、ROM102の第2プログラム領域に書込み(書き換え)を行う。
On the other hand, the
その後は、ステップS101の処理に戻る。即ち電源の再投入あるいはリセットスイッチ4により再起動が行われ、且つ動作切替スイッチ3がOFFである場合に、CPU101は、更新されたブートプログラムB111に基づいてCPUボード1はブート処理を実行する。
Thereafter, the process returns to step S101. That is, when the power is turned on again or restarted by the reset switch 4 and the
このように、第1の実施形態におけるCPUボード1によれば、ブートプログラムのコピー処理を行う論理回路IC2(FPGA)をCPUボード1に設けるため、エミュレータ等のハードウェアを用いることなく、簡便にブートプログラムの書換え処理を行うことができる。 As described above, according to the CPU board 1 in the first embodiment, since the logic circuit IC2 (FPGA) for performing the boot program copy process is provided in the CPU board 1, it is simple to use without using hardware such as an emulator. The boot program can be rewritten.
また、書換えを行うブートプログラム(例えば、ブートプログラムB111)は、外部記憶媒体160に記憶されたものを使用する構成となっている。従って、CPUボード1を搭載する機器の筐体上に外部記憶媒体挿入口151を設けることで、ブートプログラムのコピー処理の度に、CPUボード100を逐次筐体から取り外すことなく簡便にコピー処理を実行することができ、操作性が飛躍的に向上する。
特に、CPUボード1を取り外すことができない環境(例えば、大型プラント制御装置のように回路基盤が複雑に入り組んでいたり、装置の部品点数が膨大で取り外しが困難であったりする場合や、携帯電話機等のように一般に分解を前提としていない機器等の場合)では、コピー処理用の外部記憶媒体を挿入するだけでブートプログラムの書換え処理ができ便利である。
In addition, the boot program for rewriting (for example, boot program B111) is configured to use one stored in the
In particular, an environment in which the CPU board 1 cannot be removed (for example, when the circuit board is complicated and complicated, such as a large plant control device, or when the number of parts of the device is enormous and difficult to remove, mobile phones, etc. In the case of devices that are not premised on disassembly as described above, it is convenient that the boot program can be rewritten simply by inserting an external storage medium for copy processing.
また、ブートプログラムの構成において、ブートプログラムからスタート処理プログラム20及びブートプログラムコピー処理プログラム21と、ブートプログラムA103及びブートプログラムB111を独立に構成している。従って、コピー処理において、ブートプログラムB111の書込み(書換え)中に、エラーが生じたとしても、再度スタート処理プログラム20及びブートプログラムコピー処理プログラム21及び論理回路IC2によりブートプログラムB111を再度コピーする処理を実行することができ、エミュレータ等のハードウェアやソフトウェアを使用することなく何度でもブートプログラムの書換え処理を簡便且つ安全に行うことができる。
In the configuration of the boot program, the
更に、ブートプログラムのコピー処理では、動作切替スイッチの設定状態に基づいてコピー処理を実行するため、コピー処理の制御を確実に行うことができる。 Further, in the copy process of the boot program, the copy process is executed based on the setting state of the operation changeover switch, so that the copy process can be reliably controlled.
[第2の実施形態]
次いで、本発明を実施するための第2の実施形態について説明する。
第2の実施形態では、データ通信にファイルシステムを持たない制御装置でブートプログラムのコピー処理を行う例について説明する。ファイルシステムは、一般に、基本システムプログラム30(図1参照)のようなOSに依存する。従って、OSを備えない制御装置はファイルシステムを持たない。このような場合であっても、外部記憶媒体に記録されたブートプログラムを簡易に読み出すことのできるCPUボード50の例について説明する。
[Second Embodiment]
Next, a second embodiment for carrying out the present invention will be described.
In the second embodiment, an example in which a boot program copy process is performed by a control device that does not have a file system for data communication will be described. The file system generally depends on the OS such as the basic system program 30 (see FIG. 1). Therefore, a control device without an OS does not have a file system. An example of a
図3に、CPUボード50の構成を示す。CPUボード50の基本的な構成は第1の実施形態におけるCPUボード1と共通するが、基本システムプログラム30(図1参照)を備えない点及びブートプログラムB111を格納する外部記憶媒体として、CF(Compact Flash(登録商標))カード60を適用する点で相違する。
FIG. 3 shows the configuration of the
図4に、CFカード60の内部構成を模式的に示す。CFカードのメモリ空間は、アトリビュートメモリ空間70、I/O(Input/Output)メモリ空間71及びコモンメモリ空間72から構成される。アトリビュートメモリ空間70は、ブートプログラムB111の固有の属性に関する各種情報が記録されたものである。また、I/Oメモリ空間71は、入力命令及び出力命令でアクセスを行うアドレス空間である。コモンメモリ空間72には、ブートプログラムB111が格納される。
FIG. 4 schematically shows the internal configuration of the
同図に示すように、コモンメモリ空間72の先頭には、マスターブートレコード(以下、「MBR」という。)80というセクタが割り当てられる。MBR80には、ブートストラップコードやパーティションテーブルが記録され、このパーティションテーブルにはパーティションブートセクタ(以下、「PBS」という。)81の開始位置が記録されている。
As shown in the figure, a sector called a master boot record (hereinafter referred to as “MBR”) 80 is assigned to the head of the
PBS81は、各パーティションの先頭にあるセクタである。PBS81の構造は、CFカード60に採用されるファイルシステムの種類(例えば、NTFS(NT File System)、FAT(File Allocation Tables)16、FAT32等)により異なるが、各ファイルシステムには種々のパラメータが存在するため、このパラメータから個別のデータの格納位置(アドレス)を算出するようになっている。即ち該当データの行アドレス及び列アドレスを直接算出する。
The
CPUボード50側は、PBS81のパラメータにより算出した格納位置(行アドレス及び列アドレス)に基づいて、データ領域82から個別のデータにアクセスし、読み出しを行うことができるようになっている。即ちブートプログラムB111をメモリイメージのデータとして読み出しを行うことができる。
The
以下に、図5に示すフロー図を用いて、CPUボード50の動作について説明する。
ステップS201で、電源のONあるいはリセットスイッチ4のONにより、CPU101に電力が供給される。
ステップS202で、CPU101は、ROM102の第1プログラム格納領域10からスタート処理プログラム20を読み出し、CPU101の初期化処理即ちスタート処理を実行する。
The operation of the
In step S201, power is supplied to the
In step S <b> 202, the
次いで、ステップS203で、CPU101は、動作切替スイッチ3の設定状態を参照し、動作切替スイッチ3がONであるか否かを判断する。CPU101は、動作切替スイッチ3がONであると判断する場合、ステップS204の処理に進み(ステップS203:YES)、OFFであると判断する場合、ステップS208の処理に進む(ステップS203:NO)。
Next, in step S203, the
ステップS203において、動作切替スイッチ3の設定状態がOFFであると判断したCPU101は、ステップS208で、CPU101は、ROM102の第2プログラム格納領域11に格納されているブートプログラム(例えば、ブートプログラムA103コピー処理の実行後はブートプログラムB111)に基づいて、ブート処理を実行する。
In step S203, the
一方、ステップS203において、動作切替スイッチ3がONであると判断したCPU101は、ステップS204で、ブートプログラムコピー処理プログラム21を起動させる。即ちCPU101は、ROM102の第1プログラム格納領域10からブートプログラムコピー処理プログラム21を論理回路IC2に展開させ、ブートプログラムの書換えロジックを形成させる。
On the other hand, in step S203, the
ステップS204の処理でブートプログラムの書換えロジックが形成された論理回路IC2は、ステップS205で、CFカード60にアクセスしてMBRを読み込み、パーティションテーブルからPBSの開始位置を検出する。
In step S205, the logic circuit IC2 in which the boot program rewrite logic is formed in the process of step S204 accesses the
次いで、ステップS206で、論理回路IC2は、ステップS205で検出したPBSの開始位置からPBSにアクセスし、PBS内のファイルシステムのパラメータに基づいてデータ格納位置(アドレス)を算出する(即ち行アドレス及び列アドレスを算出する)。 Next, in step S206, the logic circuit IC2 accesses the PBS from the PBS start position detected in step S205, and calculates the data storage position (address) based on the file system parameters in the PBS (ie, the row address and the address). Calculate column address).
ステップS207で、論理回路IC2は、ステップS206で算出したアドレスに基づいてデータ(ブートプログラムB111)を読み出し、ROM102の第2プログラム格納領域11、ブートプログラムB111をコピーする処理(ブートプログラムA103からブートプログラムB111への書換え)を実行する。
In step S207, the logic circuit IC2 reads data (boot program B111) based on the address calculated in step S206, and copies the second
その後は、ステップS201の処理に戻る。即ち電源の再投入あるいはリセットスイッチ4により再起動が行われ、且つ動作切替スイッチ3がOFFである場合に、CPU101は、更新されたブートプログラムB111に基づいてブート処理を実行する(つまり更新後のブートプログラムにより起動する)。
Thereafter, the process returns to step S201. That is, when the power is turned on again or restarted by the reset switch 4 and the
以上のように、CPUボード50によれば、ファイルシステムを有さない場合であっても、CFカード60からメモリイメージデータとしてブートプログラムB111を読み出すことができる。このため。ファイルシステムを構築するためのドライバ等を設ける必要がなく、コストの低減や装置の構成を簡素化させることができる。
As described above, according to the
特に、PLDやFPGAは、複雑な処理ロジックを形成するのが困難である場合が多い。従って、メモリイメージデータで処理を行うほうが処理負荷を低減させることができ有利である。 In particular, it is often difficult for PLD and FPGA to form complicated processing logic. Therefore, processing with memory image data is advantageous because the processing load can be reduced.
また、第2の実施形態では、外部記憶媒体としてサイズが小型であるCFカード60を適用している。従って、CPUボード50を搭載する筐体上で外部記憶媒体挿入口151設けるスペースをより少なくすることができる。
In the second embodiment, the
以上、本発明を実施するための最良の形態について説明したが、本発明は上記種々の例に限定されるものではない。特に、第1及び第2の実施形態では、PCMCIA規格に準拠したSRAMカードやCFカードを適用したが、PCMCIAに準拠した他の記録媒体を適用することもできるし、又他の規格の記録媒体を適用することも可能である。 As mentioned above, although the best form for implementing this invention was demonstrated, this invention is not limited to the said various example. In particular, in the first and second embodiments, the SRAM card and the CF card conforming to the PCMCIA standard are applied, but other recording media conforming to the PCMCIA can be applied, and the recording medium conforming to other standards. It is also possible to apply.
更に、CFカード等からメモリイメージデータとしてデータを読み込み構成は、ブートプログラムに限るものではなく、種々のデータの通信に応用することができる。例えば、CPUボードにアプリケーションプログラムをインストールする場合にも有用である。 Furthermore, the configuration for reading data as memory image data from a CF card or the like is not limited to the boot program, and can be applied to communication of various data. For example, it is useful when installing an application program on a CPU board.
1、50、100、150 CPUボード
2 論理回路IC
3 動作切替スイッチ
4 リセットスイッチ
10 第1プログラム格納領域
11 第2プログラム格納領域
12 第3プログラム格納領域
20 スタート処理プログラム
21 ブートプログラムコピー処理プログラム
30 基本システムプログラム
31 アプリケーションプログラム
60 CFカード
101 CPU
102 ROM
103 ブートプログラムA
105 RAM
110 PC
111 ブートプログラムB
112 JTAGエミュレーションソフトウェア
113 JTAGエミュレータ
114 JTAG I/F
151 外部記憶媒体挿入口
160 外部記憶媒体
1, 50, 100, 150
3 Operation Change Switch 4
102 ROM
103 Boot program A
105 RAM
110 PC
111 Boot program B
112
151 External storage
Claims (7)
前記ブートプログラムを更新されたブートプログラムに書換える書換え処理プログラムを格納する第2の格納部と、
前記更新されたブートプログラムを外部記憶媒体から取得する取得部と、
前記書換え処理プログラムの指示に基づいて前記第1の格納部に記憶されたブートプログラムを前記更新されたブートプログラムに書き換える書換え処理を制御する書換え制御部と、
を備えることを特徴とする制御装置。 A first storage for storing a boot program;
A second storage unit for storing a rewrite processing program for rewriting the boot program with an updated boot program;
An acquisition unit for acquiring the updated boot program from an external storage medium;
A rewrite control unit that controls a rewrite process of rewriting the boot program stored in the first storage unit with the updated boot program based on an instruction of the rewrite process program;
A control device comprising:
前記書換え制御部は、前記スイッチ部の規定に基づいて前記書換え処理を実行することを特徴とする請求項1に記載の制御装置。 A switch unit for specifying whether or not to execute the rewrite process of the rewrite control unit;
The control device according to claim 1, wherein the rewrite control unit executes the rewrite processing based on a rule of the switch unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006236275A JP2008059339A (en) | 2006-08-31 | 2006-08-31 | Controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006236275A JP2008059339A (en) | 2006-08-31 | 2006-08-31 | Controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008059339A true JP2008059339A (en) | 2008-03-13 |
Family
ID=39241985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006236275A Pending JP2008059339A (en) | 2006-08-31 | 2006-08-31 | Controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008059339A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011234308A (en) * | 2010-04-30 | 2011-11-17 | Toshiba Corp | Communication apparatus, programmable device mounted in the same and program write control method thereof |
WO2020122194A1 (en) * | 2018-12-12 | 2020-06-18 | 住友重機械工業株式会社 | Injection molding machine, injection molding system, and controller |
JP2021055875A (en) * | 2019-09-27 | 2021-04-08 | 株式会社デンソーウェーブ | Air-conditioning controller |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000007152A (en) * | 1998-06-22 | 2000-01-11 | Nitta Ind Corp | Chamber connecting flange of air conveyor |
JP2000089949A (en) * | 1998-09-11 | 2000-03-31 | Hitachi Denshi Ltd | Program writing method |
JP2001195260A (en) * | 2000-01-12 | 2001-07-19 | Nec Yonezawa Ltd | Boot program rewriting system |
JP2004078483A (en) * | 2002-08-15 | 2004-03-11 | Meidensha Corp | Method of changing firmware program |
JP2006119996A (en) * | 2004-10-22 | 2006-05-11 | Canon Inc | Battery-driven device and its nonvolatile memory updating method |
-
2006
- 2006-08-31 JP JP2006236275A patent/JP2008059339A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000007152A (en) * | 1998-06-22 | 2000-01-11 | Nitta Ind Corp | Chamber connecting flange of air conveyor |
JP2000089949A (en) * | 1998-09-11 | 2000-03-31 | Hitachi Denshi Ltd | Program writing method |
JP2001195260A (en) * | 2000-01-12 | 2001-07-19 | Nec Yonezawa Ltd | Boot program rewriting system |
JP2004078483A (en) * | 2002-08-15 | 2004-03-11 | Meidensha Corp | Method of changing firmware program |
JP2006119996A (en) * | 2004-10-22 | 2006-05-11 | Canon Inc | Battery-driven device and its nonvolatile memory updating method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011234308A (en) * | 2010-04-30 | 2011-11-17 | Toshiba Corp | Communication apparatus, programmable device mounted in the same and program write control method thereof |
WO2020122194A1 (en) * | 2018-12-12 | 2020-06-18 | 住友重機械工業株式会社 | Injection molding machine, injection molding system, and controller |
JP2021055875A (en) * | 2019-09-27 | 2021-04-08 | 株式会社デンソーウェーブ | Air-conditioning controller |
JP7380016B2 (en) | 2019-09-27 | 2023-11-15 | 株式会社デンソーウェーブ | air conditioning controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110032403B (en) | Memory device and start program loading method of electronic device | |
KR100415371B1 (en) | Computer | |
JP4815938B2 (en) | Information processing apparatus and method, and program | |
KR100280637B1 (en) | Computer system capable of data update of fixed flash ROM and its control method | |
US20070038801A1 (en) | Control circuit, electronic device using the same, and firmware update method | |
JP2009259197A (en) | Information processor and its starting method | |
CN104123153A (en) | Apparatus and method for firmware upgrade using USB | |
JP2007094766A (en) | Controller, upgrade method and program | |
JP2007149065A (en) | Information processor, bios processing method and program | |
JP2008059339A (en) | Controller | |
JP2008158991A (en) | Control system for nand type flash memory | |
JP2008009799A (en) | Image forming device | |
KR20070044268A (en) | Apparatus and method of processing booting in main board | |
JP2009205277A (en) | Controller for machine tool | |
JP5084853B2 (en) | Firmware update device, communication device, electronic device, firmware update system, firmware update method, and program | |
JP2009176151A (en) | Information processing apparatus and method of starting the same | |
JP2008102761A (en) | Method for updating embedded firmware | |
JP2000235483A (en) | Information processor | |
US8166431B1 (en) | Reducing startup time of an embedded system that includes an integrated circuit | |
JP2008015725A (en) | Information processor and program activating method | |
JP2005050079A (en) | Server device, bios updating program, bootstrap program, and bios updating method | |
JP6149624B2 (en) | Firmware execution apparatus, firmware execution method, computer program, and computer apparatus | |
TWI448967B (en) | Updating method of software and computer readable medium | |
WO2024106264A1 (en) | Update assistance device, update assistance method, update assistance program, and field apparatus | |
KR101113342B1 (en) | Boot-loader version managing method for mobile communication terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090302 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111013 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111018 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20111215 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120110 |