JP2001053891A - Method and apparatus for updating program in portable terminal device - Google Patents
Method and apparatus for updating program in portable terminal deviceInfo
- Publication number
- JP2001053891A JP2001053891A JP11230194A JP23019499A JP2001053891A JP 2001053891 A JP2001053891 A JP 2001053891A JP 11230194 A JP11230194 A JP 11230194A JP 23019499 A JP23019499 A JP 23019499A JP 2001053891 A JP2001053891 A JP 2001053891A
- Authority
- JP
- Japan
- Prior art keywords
- program
- update
- terminal device
- download
- portable terminal
- 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
- 238000000034 method Methods 0.000 title claims abstract description 79
- 238000004891 communication Methods 0.000 claims abstract description 19
- 230000015654 memory Effects 0.000 abstract description 22
- 230000005856 abnormality Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 239000013585 weight reducing agent Substances 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
Landscapes
- Telephone Function (AREA)
- Telephonic Communication Services (AREA)
- Retry When Errors Occur (AREA)
- Stored Programmes (AREA)
Abstract
(57)【要約】
【課題】従来の携帯端末装置においては、プログラムの
ダウンロードによる更新を実行中に通信回線の異常ある
いは電源の異常が発生した場合等では、更新されたプロ
グラムが不完全なものとなるか、あるいはそれを避ける
ためにはメモリに大容量のものが必要とされていた。こ
のため、メモリの容量の増加を抑えたプログラム更新中
の異常対策が可能な方法及び装置の開発が課題となって
いた。
【手段】本発明においては、携帯端末装置のメモリとし
て第1記憶領域および第2記憶領域の2組のメモリを搭
載し、第1記憶領域には携帯端末装置の全プログラムを
格納しておき、プログラムの更新に際しては各プログラ
ム毎に第2記憶領域を利用するか否かの選択を行う方法
としている。
(57) [Summary] In a conventional portable terminal device, an updated program is incomplete when a communication line error or a power source error occurs during execution of the update by downloading the program. In order to avoid it, a large capacity memory was required. Therefore, development of a method and apparatus capable of taking measures against abnormalities during program update while suppressing an increase in memory capacity has been an issue. In the present invention, two sets of memories, a first storage area and a second storage area, are mounted as memories of the portable terminal device, and all programs of the portable terminal device are stored in the first storage area. When updating a program, a method is used for selecting whether to use the second storage area for each program.
Description
【0001】[0001]
【発明の属する技術分野】本発明は携帯端末装置のプロ
グラム更新方法とこの機能を有する携帯端末装置に係
る。The present invention relates to a method for updating a program of a portable terminal device and a portable terminal device having this function.
【0002】[0002]
【従来の技術】従来、携帯端末装置におけるプログラム
の更新は、図12に示すように、プログラムを実行し携
帯端末装置1全体の動作を制御するCPU(中央処理装
置)11と、一時的にデータを記憶するためのSRAM
やDRAM等のRAM12と、プログラムやテーブル等
を格納するF−ROMやEEPROM等の記憶装置13
と、ホストとの通信制御を行う通信制御装置14とを少
なくとも備えている携帯端末装置1を用いて実行されて
いた。この携帯端末装置1におけるプログラム更新方法
としては、例えば以下の3方法等が用いられている。2. Description of the Related Art Conventionally, as shown in FIG. 12, a program in a portable terminal device is updated by a CPU (central processing unit) 11 which executes the program and controls the entire operation of the portable terminal device 1, and temporarily updates the data. For storing data
And a RAM 12 such as a DRAM, and a storage device 13 such as an F-ROM or an EEPROM for storing programs and tables.
And a communication control device 14 for controlling communication with the host. As a program updating method in the portable terminal device 1, for example, the following three methods are used.
【0003】すなわち、第1の方法としては、ダウンロ
ードするプログラムを更新前のプログラムが記憶されて
いるメモリへ直接上書きすることによって更新する方法
である。That is, as a first method, a program to be downloaded is updated by directly overwriting a memory in which a program before update is stored.
【0004】第2の方法としては、RAM12にプログ
ラムを一旦ダウンロードし、そのプログラムを記憶装置
13に記憶する更新方法である。A second method is an update method in which a program is temporarily downloaded to the RAM 12 and the program is stored in the storage device 13.
【0005】また、第3の方法としては、図13に示す
ような装置、すなわちプログラムを実行し携帯端末装置
2全体の動作を制御するCPU11と、一時的にデータ
を記憶するためのSRAMやDRAM等で構成されてい
るRAM12と、プログラムやテーブル等を格納するF
−ROMやEEPROM等の記憶装置15および16
と、記憶装置15および16のメモリバンクの切り替え
を制御するバンク切り替え制御装置17とを少なくとも
備えた携帯端末装置1を用いて、プログラムのメモリ領
域を2バンク用意し、バンク切り替えにより、更新前の
プログラムをダウンロードした新しいプログラムで更新
する方法がある。[0005] As a third method, a device as shown in FIG. 13, that is, a CPU 11 for executing a program and controlling the entire operation of the portable terminal device 2, an SRAM and a DRAM for temporarily storing data are used. And the like which stores a program, a table, and the like.
-Storage devices 15 and 16 such as ROM and EEPROM
And a portable terminal device 1 including at least a bank switching control device 17 for controlling the switching of the memory banks of the storage devices 15 and 16, two memory regions for the program are prepared, and the banks before switching are updated by bank switching. There is a way to update the program with the new program you downloaded.
【0006】しかしながら、無線回線等の回線品質の変
動が激しい回線を介してのダウンロード、あるいは携帯
端末装置の電源電圧の低下または遮断等によるダウンロ
ードの中断が発生した場合、上記第1の方法では、新し
いプログラムが途中まで上書き更新されるのみでそれ以
降は従来のプログラムが残ることにより、不完全なプロ
グラムとなる。これに対応するために通信制御を行うプ
ログラムをダウンロードによる更新の対象外とすること
により、少なくとも携帯端末装置1の制御だけは可能な
状態としておく方法もあるが、この場合、制御プログラ
ムの更新や、ソフトウェアバグ等の対策として、ダウン
ロードが使用できないといった問題がある。上記第2の
方法では、プログラムをRAM12に記憶するため、ダ
ウンロードが途中で止まっても上記第1の方法における
不完全なプログラムが記録されるような問題は起きない
が、ダウンロードするためのRAM12の領域をプログ
ラムサイズ分だけ十分に確保する必要があり、携帯端末
装置の小型化、軽量化にとって大きな妨げとなる。さら
に上記第3の方法では、第2の方法同様、記憶装置15
と記憶装置16とを重複して有しておく必要があり、携
帯端末装置の小型化、軽量化にとって大きな妨げとな
る。However, when downloading via a line such as a wireless line or the like whose line quality fluctuates greatly, or when downloading is interrupted due to a drop or interruption of the power supply voltage of the portable terminal device, the above-mentioned first method requires: The new program is overwritten and updated halfway, and the existing program remains thereafter, resulting in an incomplete program. In order to cope with this, there is a method of excluding a program for performing communication control from being a target of update by download so that at least control of the mobile terminal device 1 is possible. As a countermeasure against software bugs, there is a problem that download cannot be used. In the second method, since the program is stored in the RAM 12, even if the download is stopped halfway, there is no problem that the incomplete program in the first method is recorded. It is necessary to secure a sufficient area for the program size, which greatly hinders miniaturization and weight reduction of the portable terminal device. Further, in the third method, similarly to the second method, the storage device 15
And the storage device 16 need to be duplicated, which greatly hinders the miniaturization and weight reduction of the portable terminal device.
【0007】[0007]
【発明が解決しようとする課題】上記のように従来の方
法では、プログラム更新中に通信回線に異常が発生した
場合、あるいは携帯端末装置の電源電圧低下又は電源遮
断等の異常が発生した場合、更新プログラムがその時点
から誤りデータとなりプログラムが不完全なものとな
る。このままでは携帯端末装置の制御が不可能となって
しまうため、更新前のプログラムを予め別のメモリに記
録し退避させた後に、本来の更新前のプログラムの更新
動作を行う方法が採用される。しかし、この方法ではプ
ログラム全体を記録し得る程度の少なくとも2倍以上の
大きな容量のメモリが要求される。本発明の目的は、上
記従来技術の問題点を解決し、電源異常に対してもその
影響が少なく、かつ比較的少容量のメモリの使用で小型
軽量の、携帯端末装置を開発することにある。As described above, according to the conventional method, when an abnormality occurs in a communication line during a program update, or when an abnormality such as a drop in power supply voltage or a cut-off power supply of a portable terminal device occurs, The update program becomes erroneous data from that point and the program becomes incomplete. Since the control of the mobile terminal device becomes impossible if this state is maintained, a method of recording the program before update in another memory in advance, saving the program, and then performing the original update operation of the program before update is adopted. However, this method requires a memory having a large capacity that is at least twice as large as the entire program can be recorded. SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems of the related art, and to develop a small and lightweight portable terminal device which is less affected by a power failure and uses a relatively small capacity memory. .
【0008】[0008]
【課題を解決するための手段】上記目的を達成するた
め、本発明においては以下の構成としている。In order to achieve the above object, the present invention has the following arrangement.
【0009】請求項1においては、複数のプログラムを
通信手段経由でダウンロードすることにより、プログラ
ムの更新を行う機能を有する携帯端末装置において、第
1の記憶領域に記憶されている上記複数のプログラムに
含まれる各プログラム毎にダウンロード更新プログラ
ム、格納アドレスおよび状態フラグの各項目で更新処理
を管理し、同時に、上記のプログラム更新方法として、
第1の記憶領域よりは少容量の第2の記憶領域に一旦ダ
ウンロードされた新プログラムを用いて、第1の記憶領
域にある旧プログラムを更新するか、または、ダウンロ
ードされた新プログラムを直接第1の記憶領域に上書き
して更新するかをプログラム毎に選択設定する更新方法
としている。According to the first aspect, in a portable terminal device having a function of updating a program by downloading the plurality of programs via a communication means, the plurality of programs may be stored in a first storage area. The update process is managed by each item of the download update program, the storage address and the status flag for each included program, and at the same time, as the above program update method,
The old program in the first storage area is updated by using the new program once downloaded to the second storage area having a smaller capacity than the first storage area, or the downloaded new program is directly stored in the second storage area. The update method is to select and set, for each program, whether to overwrite and update one storage area.
【0010】請求項2においては、上記複数のプログラ
ム毎の管理情報およびプログラム更新方法の少なくとも
一方の手順を記憶し、ダウンロード時に必要な制御情報
を格納する第1の記憶手段と、更新前のプログラムが記
憶されている第2の記憶手段と、第2の記憶手段とは別
の第3の記憶手段と、更新前のプログラムが記憶されて
いる第2の記憶手段に直接ダウンロードする第1のプロ
グラム更新方法と、第3の記憶手段にプログラムをダウ
ンロードし、このプログラムが正常にダウンロードされ
たときに、そのダウンロードしたプログラムが記憶され
ている第3の記憶手段と第2の記憶手段とでプログラム
の更新を行う第2のプログラム更新方法とを有する携帯
端末装置である。According to a second aspect, a first storage means for storing at least one procedure of the management information and the program update method for each of the plurality of programs and storing control information required at the time of download, a program before update , A third storage device different from the second storage device, and a first program directly downloaded to the second storage device in which a program before update is stored. An update method and a method of downloading a program to the third storage means, and when the program is normally downloaded, the third storage means and the second storage means storing the downloaded program store the program. And a second program updating method for updating.
【0011】また、請求項3においては、請求項2記載
の携帯端末装置において、通信手段を用いてプログラム
のダウンロードを実行するダウンロードプログラムを第
2のプログラム更新方法として用いることで、ダウンロ
ードが正常に完了できなかった場合、第2の記憶手段の
ダウンロードを実行するプログラムを用いて、プログラ
ムのダウンロード更新処理を再度実行する構成としてい
る。According to a third aspect of the present invention, in the portable terminal device according to the second aspect, a download program for executing a program download using a communication unit is used as a second program update method, so that the download can be performed normally. If the completion is not completed, the program for executing the download of the second storage means is used to execute the program update process again.
【0012】[0012]
【発明の実施の形態】以下、本発明の実施の形態を図面
を用いて説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0013】図1は本発明におけるプログラム更新にお
ける管理の形態を示す表で、ダウンロード対象プログラ
ムとしてはプログラム#1、プログラム#2及びホスト
からプログラムをダウンロードすることによりプログラ
ムの更新を行うためのダウンロード更新プログラムAお
よびダウンロード更新プログラムBがある。これらプロ
グラムは、それぞれ、ダウンロード更新プログラムおよ
びプログラムをダウンロードする際にダウンロードした
プログラムを格納する記憶領域の先頭アドレスを示す格
納アドレス、およびダウンロード処理中または更新処理
中の状態かそれ以外の状態かを表す状態フラグにより管
理される。ここで、プログラム#1は、もしこのプログ
ラムが破壊された場合には携帯端末装置が動作不可能と
なる属性のもので、例えば、ダウンロード更新プログラ
ムあるいは最低限のユーザインターフェース関連のプロ
グラム等がこれに属する。また、プログラム#2は、こ
のプログラムが破壊されても携帯端末装置の動作に支障
をおよぼさない属性のもので、一般のアプリケーション
プログラムあるいはダウンロードに使用しないプロトコ
ル処理プログラム等がこれに属する。なお、ダウンロー
ド更新プログラムAは第1の記憶領域にそのまま上書き
でダウンロードする機能を有しており、ダウンロード更
新プログラムBは一旦第2の記憶領域にダウンロードし
た後に第1の領域に記憶されているプログラムの更新処
理を行う機能を有している。これらダウンロード更新プ
ログラムにおいては、プログラム#1またはプログラム
#2に与えられている引数に応じて処理方法を変えた
り、外部要因によりダウンロード更新プログラムの動作
内容を変化させたりする方法も可能である。以上のこと
から本発明によれば、第1記憶領域には携帯端末装置に
搭載される全プログラムを記憶する容量が必要である
が、第2記憶領域は少なくとも上記プログラム#1に含
まれる独立したプログラム分以上の容量があれば済むこ
とになリメモリ容量の節減を図ることが出来る。FIG. 1 is a table showing a management form in the program update according to the present invention. The programs to be downloaded are the program # 1, the program # 2, and the download update for updating the program by downloading the program from the host. There is a program A and a download update program B. Each of these programs indicates a storage address indicating a start address of a storage area for storing the downloaded update program and the downloaded program when the program is downloaded, and indicates a state during download processing or update processing or a state other than that. It is managed by a status flag. Here, the program # 1 has an attribute that makes the portable terminal device inoperable if this program is destroyed. For example, a download update program or a minimum user interface-related program is included in the program # 1. Belong. The program # 2 has an attribute that does not affect the operation of the portable terminal device even if the program is destroyed, and includes a general application program, a protocol processing program not used for downloading, and the like. Note that the download update program A has a function of overwriting and downloading to the first storage area as it is, and the download update program B is a program once downloaded to the second storage area and then stored in the first storage area. Has the function of performing update processing of In these download update programs, it is also possible to change the processing method according to the argument given to the program # 1 or the program # 2, or to change the operation content of the download update program due to external factors. From the above, according to the present invention, the first storage area requires a capacity for storing all programs mounted on the portable terminal device, but the second storage area has at least an independent storage area included in the program # 1. It is possible to save the re-memory capacity, which would be sufficient if the capacity is larger than the program.
【0014】また、格納アドレスのうち、アドレス#
1、アドレス#3およびアドレス#4は更新前のプログ
ラムが格納されている第1の記憶領域とは別の第2の記
憶領域に含まれるアドレスであり、アドレス#2は更新
前のプログラムが格納されている領域と同じ第1の記憶
領域のアドレスである。この第1の記憶領域に直接ダウ
ンロードすることで、第2の記憶領域を使用する場合と
は異なり、ダウンロードに際して一時的に必要となるメ
モリは不要となり、プログラムのダウンロード及び更新
が可能となる。さらに、アドレス#1、アドレス#3お
よびアドレス#4は同一のアドレスとしても良いし、別
々のアドレスとしても良い。ただし、前者の場合には、
第2の記憶領域のサイズとしてアドレス#1、アドレス
#3およびアドレス#4に対応するプログラムのサイズ
の最大領域を確保しておく必要がある。また、アドレス
#1、アドレス#3およびアドレス#4は、装置起動時
に静的に割り当てられる記憶領域であっても良いし、装
置始動後の動作中の状況に応じて動的に割り当てられる
記憶領域であっても良い。また、第2の記憶領域は、R
AM12内の領域に確保しても良いし、記憶装置13内
に確保してもよい。また、第1の記憶領域と第2の記憶
領域は、連続した領域である必要は無く、プログラムを
格納するために最低限必要な大きさが確保されており、
ダウンロードの時にプログラムを格納できる大きさであ
れば特に制限はない。ただし、連続した領域でない場合
は、メモリの制御を必要とすることは言うまでもない。
このようにプログラムのダウンロードに必要なメモリを
プログラム毎に管理し、第2の記憶領域を使用する方法
とするか、使用しない方法とするか等プログラムのダウ
ンロードおよび更新方法を選択することで、携帯端末装
置全体のダウンロードに必要なメモリを最小限に抑える
ことができる。Further, among the storage addresses, address #
1, address # 3 and address # 4 are addresses included in a second storage area different from the first storage area in which the program before update is stored, and address # 2 stores the program before update. This is the address of the first storage area that is the same as the area that has been set. By directly downloading to the first storage area, unlike the case where the second storage area is used, a memory temporarily required at the time of downloading is not required, and the program can be downloaded and updated. Further, the address # 1, the address # 3, and the address # 4 may be the same address or may be different addresses. However, in the former case,
It is necessary to secure a maximum area of the size of the program corresponding to the address # 1, the address # 3, and the address # 4 as the size of the second storage area. The address # 1, the address # 3, and the address # 4 may be storage areas that are statically allocated at the time of starting the apparatus, or may be storage areas that are dynamically allocated according to a state during operation after the apparatus is started. It may be. In addition, the second storage area is R
It may be secured in an area in the AM 12 or in the storage device 13. Further, the first storage area and the second storage area do not need to be continuous areas, and the minimum size required for storing the program is secured.
There is no particular limitation as long as the program can be stored at the time of downloading. However, if the area is not a continuous area, it is needless to say that memory control is required.
In this way, the memory required for downloading the program is managed for each program, and the method of downloading and updating the program, such as whether to use the second storage area or not, is used. The memory required for downloading the entire terminal device can be minimized.
【0015】プログラムのダウンロード及び更新の手順
としては、オペレータからの入力やホストからの要求等
の外部要因によりプログラムの更新が必要になると、図
2に示す手順で更新動作を開始する。ダウンロード及び
更新の手順としては、ダウンロードするプログラムの状
態フラグをONにし(ステップ101)、そのプログラ
ムに対応したダウンロード更新プログラムを実行する
(ステップ102)。次にプログラム#1、プログラム
#2の場合のダウンロード更新プログラムとしては、図
3に示すように、まず格納アドレスを特定する(ステッ
プ201)。例えばプログラム#1の場合には、アドレ
ス#1とする。ステップ201に続き、ホストよりプロ
グラムをダウンロードする(ステップ202)、プログ
ラムのダウンロード処理については制限はしないが、最
低限ある単位毎のまとまりでデータをホストからダウン
ロードし、そのダウンロードしたデータが正しいかどう
かを判断(サムチエックやCRC(Cyc1ic Redundancy C
heck Code)による誤り検出等)する機能を有しておれば
良い。また、ダウンロードを行うに当たリ、ホストとの
通信回線を接続する処理が必要であるが、ダウンロード
処理を開始する前までに、ホストとの通信回線が接続さ
れておれば良い。ステップ202に続き、ダウンロード
が正しく実行されたか否かの結果を判断し(ステップ2
03)、ダウンロードが正常に実行された場合は、プロ
グラム更新処理(ステップ204)を行う。さらに、状
態フラグをOFFに書き換え(ステップ205)一連の
処理を終了する。ここでステップ203において、ダウ
ンロードが正常に実行されなかった場合で、かつ、その
理由としてホストとの通信回線が切断されたものであっ
た場合(ステップ206)、ダウンロード異常終了とし
て処理を終了する。それ以外の理由による以上の場合に
は、再度ステップ202を実行する。As a procedure for downloading and updating the program, when an update of the program is required due to an external factor such as an input from an operator or a request from the host, an update operation is started in the procedure shown in FIG. As a procedure for downloading and updating, a status flag of a program to be downloaded is turned on (step 101), and a download update program corresponding to the program is executed (step 102). Next, as the download update program in the case of the program # 1 and the program # 2, as shown in FIG. 3, a storage address is first specified (step 201). For example, in the case of program # 1, address # 1. Following step 201, the program is downloaded from the host (step 202). Although there is no restriction on the program download processing, data is downloaded from the host in a minimum unit of a certain unit, and whether the downloaded data is correct or not. Judgment (Samchek or CRC (Cyc1ic Redundancy C
It is only necessary to have a function of performing error detection based on heck code). In addition, a process of connecting a communication line with the host is required for downloading, but it is sufficient that the communication line with the host is connected before the start of the download process. Subsequent to step 202, it is determined whether or not the download has been correctly performed (step 2).
03) If the download is executed normally, a program update process (step 204) is performed. Further, the state flag is rewritten to OFF (step 205), and a series of processing is ended. Here, in step 203, if the download has not been executed normally and the reason is that the communication line with the host has been disconnected (step 206), the process is terminated as a download abnormal end. In the above case for other reasons, step 202 is executed again.
【0016】次にプログラム#2の場合におけるダウン
ロード更新プログラムの動作は、図4に示すように、ま
ず格納アドレスを特定し(ステップ301)ここから開
始する。例えば、プログラム#2の場合には、アドレス
#2とする。このアドレスは、更新前のプログラムが格
納されている領域に含まれるものである。ステップ30
1でプログラムの格納場所が決定された後、ホストより
プログラムのダウンロードを開始する(ステップ30
2)。このダウンロードが正常に実行されたか否かを判
断し(ステップ303)、ダウンロードが正常に実行さ
れた場合は、状態フラグをOFFに書き換え(ステップ
304)て処理を終了する。ステップ303において、
ダウンロードが正常に実行されなかった場合で、かつ、
その理由としてホストとの通信回線が切断されたもので
あった場合(ステップ305)はダウンロード異常終了
として処理を終了する。それ以外の理由の場合には、ス
テップ302に戻り処理を再度実行する。Next, as shown in FIG. 4, the operation of the download update program in the case of the program # 2 is started by specifying a storage address (step 301). For example, in the case of program # 2, address # 2. This address is included in the area where the program before the update is stored. Step 30
After the storage location of the program is determined in step 1, the download of the program from the host is started (step 30).
2). It is determined whether or not the download has been normally performed (step 303). If the download has been normally performed, the status flag is rewritten to OFF (step 304), and the process ends. In step 303,
If the download was not successful, and
If the reason is that the communication line with the host has been disconnected (step 305), the process ends as abnormal download termination. For other reasons, the process returns to step 302 to execute the process again.
【0017】プログラム更新処理は、図5(a)に示す
ようなシステム構成で行われる。すなわちこのシステム
ではプログラムを実行し携帯端末装置3全体の動作を制
御するCPU11と、一時的にデータを記憶するための
SRAMやDRAM等で構成されたRAM12と、アド
レスバスの切リ替えを制御するアドレスバス切り替え制
御装置17と、プログラムやテーブル等を格納するF−
ROMやEEPROM等で構成された記憶装置15、1
6および18と、ホストとの通信制御を行う通信制御装
置14とを少なくとも備えた携帯端末装置である。プロ
グラム更新時にはアドレスバス切り替え制御装置17に
アドレスバス切リ替えの要求を出力し、アドレスバスを
切り替えることで、図5(b)のメモリマップに示すよ
うに第1の記憶領域の内容と第2の記憶領域の内容が入
れ替わり、更新後のプログラムの実行を行うことが可能
になるプログラム更新方法がある。The program update process is performed with a system configuration as shown in FIG. That is, in this system, the CPU 11 that executes a program and controls the entire operation of the portable terminal device 3, the RAM 12 that is constituted by an SRAM or a DRAM for temporarily storing data, and the switching of an address bus are controlled. An address bus switching control unit 17 and an F-
Storage device 15, 1 constituted by ROM, EEPROM, etc.
6 and 18 and a communication control device 14 for controlling communication with a host. At the time of updating the program, a request for switching the address bus is output to the address bus switching control device 17 and the address bus is switched, so that the contents of the first storage area and the second storage area are changed as shown in the memory map of FIG. There is a program update method in which the contents of the storage area are replaced and the updated program can be executed.
【0018】また、プログラムを実行するときに、その
プログラムの開始アドレスを決定するためのジャンプテ
ーブルを用意し、更新後のプログラムの開始アドレスを
変更することで更新処理を行うプログラム更新処理方法
もある。例えば、図6に示すようなメモリマップがあ
り、図7(a)に示すテーブルを更新前のジャンプテー
ブルとすると、プログラムの更新前では、プログラム#
1を実行する時、ジャンプテーブルをアクセスし、この
テーブルに示されたプログラム開始アドレスが示す番地
にプログラムカウンタをセットすることで実行される。
図7(a)の例では、プログラムカウンタを0x100
0番地にセットすることで、プログラム#1の実行が開
始される。このプログラム#1をホストよリ第2の記憶
領域(0x7000〜0x7FFF)の領域にダウンロ
ードしたとすると、プログラムの更新処理では、図7
(b)のようにプログラム#1のプログラム開始アドレ
スを0x7000番地に変更する。この変更により、次
回、プログラム#1を実行する際、ジャンプテーブルの
プログラム開始アドレスを参照し、プログラムカウンタ
を0x7000番地に動かすことで、更新後のプログラ
ム#1の実行を開始することが出来るようになる。There is also a program update processing method for preparing a jump table for determining a start address of a program when executing the program and performing an update process by changing a start address of the updated program. . For example, if there is a memory map as shown in FIG. 6 and the table shown in FIG. 7A is a jump table before updating, before updating the program, the program #
When 1 is executed, the program is executed by accessing the jump table and setting the program counter to the address indicated by the program start address shown in this table.
In the example of FIG. 7A, the program counter is set to 0x100
By setting to address 0, the execution of program # 1 is started. Assuming that the program # 1 is downloaded from the host to the second storage area (0x7000 to 0x7FFF), in the program update processing, FIG.
As shown in (b), the program start address of the program # 1 is changed to the address 0x7000. With this change, the next time the program # 1 is executed, the execution of the updated program # 1 can be started by referencing the program start address of the jump table and moving the program counter to the address 0x7000. Become.
【0019】また、図8に示すように第1の記憶領域の
プログラムと第2の記憶領域(Ox2000〜Ox2F
FF)のプログラムを入れ替えることで更新を実行する
プログラム更新方法がある。例えば、xを第1の記憶領
域のデータ、yを第2の記憶領域のデータとすると、 1) CPU11内のレジスタや一時記憶領域temp
を用意する方法があり、これをC言語で記述した場合、 temp=x;x=y;y=temp; となり、さらに 2) 記憶領域のみ使用する方法(ただし、^は排他的
論理和)もあり、これをC言語で記述した場合、 y=y^x;x=x^y;y=y^x; となる。As shown in FIG. 8, a program in a first storage area and a second storage area (Ox2000 to Ox2F
There is a program update method for executing the update by exchanging the FF) program. For example, if x is data in the first storage area and y is data in the second storage area, 1) a register in the CPU 11 or a temporary storage area temp
Is written in C language, then temp = x; x = y; y = temp; and 2) a method using only a storage area (where ^ is an exclusive OR) is also used. When this is described in C language, y = y ^ x; x = x ^ y; y = y ^ x;
【0020】これらの方法を用いることで、入れ替えに
際してプログラム全体を記憶するための大きな記憶領域
は不要となる。また、図9に示すように、ダウンロード
した第2の記憶領域の内容をそのまま第1の記憶領域に
コピーすることで更新するプログラム更新方法もある。By using these methods, a large storage area for storing the entire program at the time of replacement becomes unnecessary. As shown in FIG. 9, there is also a program updating method for updating the contents of the downloaded second storage area by copying the contents of the second storage area as it is to the first storage area.
【0021】次にダウンロードが異常終了した場合や、
携帯端末装置の電源断によりダウンロード処理および更
新処理が完遂されなかった場合等、プログラムが正常に
ダウンロードできなかった時の復旧処理の手順として
は、装置起動時に携帯端末装置1のオペレータからの復
旧を指示する入力があった時、及び無線回線が修復され
通信が可能になりホストとの回線が接続可能になった時
等、図10に示すように状態フラグのON/OFFを確
認することによりダウンロード中のプログラムがあるか
否かの判定処理を行う(ステップ401)。状態フラグ
がONの場合には再度ダウンロード更新プログラムを実
行(ステップ402)し、ホストからプログラムをダウ
ンロードする。また、ステップ401で状態フラグがO
FFの場合には、処理を終了する。Next, when the download ends abnormally,
When the download process and the update process are not completed due to the power failure of the mobile terminal device, for example, when the program cannot be normally downloaded, the recovery process procedure is to recover from the operator of the mobile terminal device 1 when the device is started. When there is an input to instruct, or when the wireless line is restored and communication becomes possible and the line with the host becomes connectable, etc., download by confirming the ON / OFF state flag as shown in FIG. A determination process is performed to determine whether there is a program in progress (step 401). If the status flag is ON, the download update program is executed again (step 402), and the program is downloaded from the host. In step 401, the status flag is set to O.
In the case of FF, the process ends.
【0022】次にダウンロード更新プログラムのダウン
ロード処理及び更新処理が正常に終了しなかった時の復
旧処理の手順について説明する。この場合、ダウンロー
ド更新プログラムAおよびBの更新がダウンロード更新
プログラムAによって更新されるので、図11に示すよ
うに第2の記憶領域のダウンロードしたダウンロード更
新プログラムが不完全な場合でも、更新前のダウンロー
ド更新プログラムは第1の記憶領域に完全な状態で記憶
されている。すなわち、ダウンロード更新プログラムA
によって、プログラムのダウンロード及び更新処理を行
うプログラムは、ダウンロード更新プログラムAが完遂
するまで、再実行が可能となっている。このようにプロ
グラムのダウンロード処理および更新処理が不完全な場
合でも、携帯端末装置の最低限の機能を実現するプログ
ラムをダウンロード更新プログラムAでダウンロード処
理および更新処理を行うことで、端末の最低限の動作が
保証でき、また、プログラムのダウンロード処理および
更新処理を再実行することが可能になる。Next, a description will be given of a procedure of a recovery process when the download process and the update process of the download update program are not normally completed. In this case, since the updates of the download update programs A and B are updated by the download update program A, even if the download update program downloaded in the second storage area is incomplete as shown in FIG. The update program is completely stored in the first storage area. That is, the download update program A
Thus, the program for performing the download and update process of the program can be re-executed until the download update program A is completed. Even in the case where the program download and update processes are incomplete, the download and update process of the program that realizes the minimum functions of the portable terminal device is performed by the download update program A, so that the minimum terminal The operation can be guaranteed, and the program download processing and update processing can be executed again.
【0023】[0023]
【発明の効果】本発明によれば、プログラムのダウンロ
ードに必要なメモリをプログラム毎に管理し、第2の記
憶領域を使用する方法かあるいは使用しない方法か等の
プログラムのダウンロードおよび更新方法を選択するこ
とで、携帯端末装置のダウンロードに必要なメモリを最
小限に抑えることができる。また、プログラムのダウン
ロード処理および更新処理が、無線回線等の回線品質の
変動が激しい回線における通信回線の切断によるダウン
ロードの失敗や、携帯端末装置の電源電圧の低下または
電源遮断によリダウンロードが途中で終了してしまった
場合でも、携帯端末装置の最低限の機能を実現するプロ
グラムを第2の記憶領域を用いた第2のプログラム更新
方法でダウンロード処理および更新処理を行うことで、
端末の動作を保証することが出来、また、プログラムの
ダウンロード処理および更新処理を再実行することが可
能となる。According to the present invention, a memory required for downloading a program is managed for each program, and a method of downloading and updating the program such as a method of using or not using the second storage area is selected. By doing so, the memory required for downloading the portable terminal device can be minimized. In addition, the program download processing and the update processing may be interrupted due to disconnection of the communication line on a line such as a wireless line where the line quality fluctuates greatly, or the re-download may be interrupted due to a drop in the power supply voltage of the portable terminal device or a power off. Even if the processing has been terminated, the program for realizing the minimum functions of the mobile terminal device is downloaded and updated by the second program updating method using the second storage area,
The operation of the terminal can be guaranteed, and the program download processing and update processing can be executed again.
【図1】本発明によるプログラムおよびプログラム更新
のための管理項目内容に関する一実施の形態を示すテー
ブル図。FIG. 1 is a table showing an embodiment of a program and management item contents for updating the program according to the present invention.
【図2】本発明によるプログラムのダウンロード処理及
び更新処理の一実施の形態を示すフロー図。FIG. 2 is a flowchart showing an embodiment of a program download process and an update process according to the present invention.
【図3】本発明による第2の記憶領域を用いたダウンロ
ードと更新処理の一実施の形態を示すフロー図。FIG. 3 is a flowchart showing an embodiment of a download and update process using a second storage area according to the present invention.
【図4】本発明による第1の記憶領域を用いたダウンロ
ードと更新処理の一実施の形態を示すフロー図。FIG. 4 is a flowchart showing an embodiment of a download and update process using a first storage area according to the present invention.
【図5】本発明によるプログラム更新処理におけるバン
ク切り替え方法を用いた一実施の形態を示す回路構成
図。FIG. 5 is a circuit diagram showing an embodiment using a bank switching method in a program update process according to the present invention.
【図6】本発明によるプログラム更新処理におけるジャ
ンプテーブルを用いた一実施の形態を示す構成図。FIG. 6 is a configuration diagram showing an embodiment using a jump table in a program update process according to the present invention.
【図7】本発明によるプログラム更新処理におけるジャ
ンプテーブルの内容を説明するテーブル図。FIG. 7 is a table illustrating the contents of a jump table in a program update process according to the present invention.
【図8】本発明によるプログラム更新処理における入れ
替え処理を用いた一実施の形態を示すメモリ構成図。FIG. 8 is a memory configuration diagram showing an embodiment using a replacement process in a program update process according to the present invention.
【図9】本発明によるプログラム更新処理におけるコピ
ー処理を用いた一実施の形態を示すメモリ構成図。FIG. 9 is a memory configuration diagram showing an embodiment using a copy process in a program update process according to the present invention.
【図10】本発明によるプログラムが格納されている記
憶領域の一実施の形態を示すメモリ構成図。FIG. 10 is a memory configuration diagram showing an embodiment of a storage area in which a program according to the present invention is stored.
【図11】本発明によるダウンロード途中か否かを判定
するプログラムの一実施の形態を示すフロー図。FIG. 11 is a flowchart showing an embodiment of a program for determining whether or not downloading is in progress according to the present invention.
【図12】従来の携帯端末装置のプログラム更新に必要
な構成を説明するための装置構成図。FIG. 12 is a device configuration diagram for explaining a configuration necessary for updating a program of a conventional portable terminal device.
【図13】従来の携帯端末装置のメモリバンクによるプ
ログラム更新に必要な構成を説明するための装置構成
図。FIG. 13 is a device configuration diagram for explaining a configuration necessary for updating a program by a memory bank of a conventional portable terminal device.
1:携帯端末装置 2:携帯端末装置 3:携帯端末装置 11:CPU 12:RAM 13:記憶装置 14:通信制御装置 15:記憶装置#1 16:記憶装置#2 17:バンク切り替
え制御装置 18:記憶装置#31: portable terminal device 2: portable terminal device 3: portable terminal device 11: CPU 12: RAM 13: storage device 14: communication control device 15: storage device # 1 16: storage device # 2 17: bank switching control device 18: Storage device # 3
フロントページの続き Fターム(参考) 5B027 AA04 BB06 CC03 5B076 BB06 CA04 5K027 AA11 BB04 HH00 5K101 KK20 LL12 MM07 NN21 TT02Continuation of the front page F term (reference) 5B027 AA04 BB06 CC03 5B076 BB06 CA04 5K027 AA11 BB04 HH00 5K101 KK20 LL12 MM07 NN21 TT02
Claims (3)
ロードすることにより、プログラムの更新を行う機能を
有する携帯端末装置において、 上記複数のプログラムに含まれる個々のプログラム毎に
更新処理を管理し、 上記のプログラム更新方法をプログラム毎に選定するこ
とを特徴とする携帯端末装置のプログラム更新方法。1. A portable terminal device having a function of updating a program by downloading a plurality of programs via a communication means, wherein an update process is managed for each program included in the plurality of programs. A program updating method for a portable terminal device, wherein the program updating method is selected for each program.
ロードすることにより、プログラムの更新を行う機能を
有する携帯端末装置において、 上記複数のプログラム毎の管理情報およびプログラム更
新方法の少なくとも一方の手順を記憶し、ダウンロード
時に必要な制御情報を格納する第1の記憶手段と、 更新前のプログラムが記憶されている第2の記憶手段
と、 第2の記憶手段とは異なる第3の記憶手段と、 更新前のプログラムが記憶されている上記第2の記憶手
段に直接ダウンロードする第1のプログラム更新手段
と、上記第3の記憶手段にプログラムをダウンロード
し、プログラムが正常にダウンロードされたことを確認
した後に、上記ダウンロードしたプログラムが記憶され
ている上記第3の記憶手段の内容を上記第2の記憶手段
に転送することでプログラムの更新を行う第2のプログ
ラム更新手段とを有することを特徴とする携帯端末装
置。2. A portable terminal device having a function of updating a program by downloading a plurality of programs via communication means, wherein at least one procedure of management information and a program updating method for each of the plurality of programs is stored. A first storage unit for storing control information required at the time of download; a second storage unit for storing a program before update; a third storage unit different from the second storage unit; A first program updating means for directly downloading to the second storage means in which the previous program is stored; and a program for downloading to the third storage means for confirming that the program has been normally downloaded. The contents of the third storage means storing the downloaded program are stored in the second storage means. And a second program updating means for updating the program by transferring the program to the portable terminal device.
際にダウンロードが正常に完了できなかった場合、ダウ
ンロードプログラムを上記第2のプログラム更新手段を
用いることで、上記第2の記憶手段のダウンロードを実
行するプログラムによりダウンロード更新処理を再度実
行することを特徴とする携帯端末装置。3. The portable terminal device according to claim 2, wherein when the download of the program is not normally completed when the program is downloaded using the communication means, the download program is used by the second program update means. Thus, the portable terminal device re-executes the download update process by the program for executing the download in the second storage means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11230194A JP2001053891A (en) | 1999-08-17 | 1999-08-17 | Method and apparatus for updating program in portable terminal device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11230194A JP2001053891A (en) | 1999-08-17 | 1999-08-17 | Method and apparatus for updating program in portable terminal device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2001053891A true JP2001053891A (en) | 2001-02-23 |
Family
ID=16904070
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11230194A Pending JP2001053891A (en) | 1999-08-17 | 1999-08-17 | Method and apparatus for updating program in portable terminal device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2001053891A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100414218B1 (en) * | 2001-04-10 | 2004-01-07 | 주식회사 팬택앤큐리텔 | Self initializing device and method of communication mobile station |
| JP2004234511A (en) * | 2003-01-31 | 2004-08-19 | Nec Corp | Software updating system, portable terminal, software updating method, and program |
| JP2005352946A (en) * | 2004-06-14 | 2005-12-22 | Oki Electric Ind Co Ltd | Program updating method and system for communication terminal |
| KR100773317B1 (en) | 2006-03-14 | 2007-11-06 | 후지쯔 가부시끼가이샤 | Software update method, computer readable recording medium recording an update management program and information processing apparatus |
| JP2013205933A (en) * | 2012-03-27 | 2013-10-07 | Mitsubishi Electric Corp | Firmware updating device and firmware updating method |
-
1999
- 1999-08-17 JP JP11230194A patent/JP2001053891A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100414218B1 (en) * | 2001-04-10 | 2004-01-07 | 주식회사 팬택앤큐리텔 | Self initializing device and method of communication mobile station |
| JP2004234511A (en) * | 2003-01-31 | 2004-08-19 | Nec Corp | Software updating system, portable terminal, software updating method, and program |
| JP2005352946A (en) * | 2004-06-14 | 2005-12-22 | Oki Electric Ind Co Ltd | Program updating method and system for communication terminal |
| KR100773317B1 (en) | 2006-03-14 | 2007-11-06 | 후지쯔 가부시끼가이샤 | Software update method, computer readable recording medium recording an update management program and information processing apparatus |
| JP2013205933A (en) * | 2012-03-27 | 2013-10-07 | Mitsubishi Electric Corp | Firmware updating device and firmware updating method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100517248C (en) | Software edition upgrading management device and software edition upgrading management method | |
| JPH11259284A (en) | Online program update system and computer-readable recording medium recording program update program | |
| US7971014B2 (en) | Information processing apparatus and data recovering method | |
| WO2011024688A1 (en) | Firmware update system, and information apparatus, as well as program | |
| US7222342B2 (en) | Execution on a machine, the start of an auxiliary downloader when storage of new software memory fails during execution of a first downloader | |
| JP2002342102A (en) | Program update method and program update method | |
| JP2001053891A (en) | Method and apparatus for updating program in portable terminal device | |
| JP3522176B2 (en) | Switching file update synchronization method | |
| WO2018150820A1 (en) | Information processing device | |
| US6314024B1 (en) | Data processing apparatus | |
| JP2001331379A (en) | Method and device for rewriting flash memory update program | |
| JP2000137604A (en) | System for succeeding data | |
| JPH1063497A (en) | How to update the program | |
| JP2016103261A (en) | Firmware downloading method and firmware built-in device | |
| JPH10187454A (en) | Bios reloading system | |
| JPWO2012077604A1 (en) | Processing apparatus, program update method, and program | |
| JPH11282690A (en) | Control program writing method, information processing apparatus, and information processing system | |
| JPH0855068A (en) | Communication terminal | |
| JP2010079382A (en) | Software update method | |
| JP2004094628A (en) | Flash memory memory rewrite control system, memory rewrite control method, and program for executing each step of memory rewrite control method | |
| JP2853593B2 (en) | Download device | |
| JPH06222986A (en) | Memory controller | |
| JP7418494B2 (en) | Update management system and update management method | |
| JP7491765B2 (en) | Firmware update system and firmware update method | |
| JP2013004043A (en) | Information processing device, image forming apparatus, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment |
Free format text: PAYMENT UNTIL: 20081206 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment |
Free format text: PAYMENT UNTIL: 20081206 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment |
Year of fee payment: 7 Free format text: PAYMENT UNTIL: 20091206 |
|
| LAPS | Cancellation because of no payment of annual fees |