[go: up one dir, main page]

CN100339823C - Program updating method and terminal device - Google Patents

Program updating method and terminal device Download PDF

Info

Publication number
CN100339823C
CN100339823C CNB2003801003168A CN200380100316A CN100339823C CN 100339823 C CN100339823 C CN 100339823C CN B2003801003168 A CNB2003801003168 A CN B2003801003168A CN 200380100316 A CN200380100316 A CN 200380100316A CN 100339823 C CN100339823 C CN 100339823C
Authority
CN
China
Prior art keywords
address
program
ram
instruction
command
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
Application number
CNB2003801003168A
Other languages
Chinese (zh)
Other versions
CN1692330A (en
Inventor
松本泰辅
渡边泰彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Publication of CN1692330A publication Critical patent/CN1692330A/en
Application granted granted Critical
Publication of CN100339823C publication Critical patent/CN100339823C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

在更新可重写非易失性存储器如闪速ROM中存储的程序时,将非易失性存储器内包含要更新的存储程序部分的区块中的程序部分传到RAM中,仅让要更新的传送程序部分从外部接受指示并进行更新。然后擦除非易失性存储器内的这个区块,再次将RAM内经过更新的这部分程序记录到非易失性存储器的这个经过擦除的区块上。

Figure 200380100316

When updating the program stored in the rewritable non-volatile memory such as flash ROM, the program part in the block containing the stored program part to be updated in the non-volatile memory is transferred to the RAM, and only the program part to be updated The transfer program part receives instructions from the outside and updates them. Then erase this block in the non-volatile memory, and record the updated part of the program in the RAM to the erased block in the non-volatile memory again.

Figure 200380100316

Description

程序更新方法和终端设备Program update method and terminal device

技术领域technical field

本发明涉及一种用于更新终端设备中的可重写非易失性存储器如闪速ROM(闪速ROM)内存储的程序的方法,并涉及一种这样的终端设备。The present invention relates to a method for updating a program stored in a rewritable non-volatile memory such as a flash ROM (flash ROM) in a terminal device, and to such a terminal device.

背景技术Background technique

传统上,终端设备在可重写非易失性存储器(如闪速ROM)内存储控制软件(程序),用以指示CPU的操作,从而对终端设备进行控制。Traditionally, a terminal device stores control software (program) in a rewritable non-volatile memory (such as a flash ROM) to instruct the operation of the CPU, thereby controlling the terminal device.

在该终端设备中,人们提出了一种可在发现控制软件中的程序错误(bug)时更新控制软件的方法。例如,JP2001-154838(第3-5页,图3)就公开了这样一种方法。In this terminal device, a method for updating the control software when a program error (bug) in the control software is found is proposed. For example, JP2001-154838 (page 3-5, Fig. 3) discloses such a method.

在JP2001-154838公开的方法中,首先产生的是程序错误经过校正的新控制软件。然后,一旦对记录着程序错误的可重写非易失性存储器进行了擦除,就将该新控制软件记录到该存储器中。由此就更新了控制软件。In the method disclosed in JP2001-154838, first, new control software with program errors corrected is generated. Then, once the rewritable nonvolatile memory in which program errors are recorded is erased, the new control software is recorded in the memory. The control software is thus updated.

在一擦掉可重写非易失性存储器(如闪速ROM)就在上面记录新控制软件的更新控制软件方法中,在非易失性存储器(如闪速ROM)的约束下,存储器被分成多个区块,仅在一个划分区块基础上删掉旧控制软件,然后记录新控制软件。In the update control software method of recording new control software on rewritable nonvolatile memory such as flash ROM as soon as it is erased, under the constraints of nonvolatile memory such as flash ROM, the memory is Divide into multiple blocks, delete the old control software on the basis of only one divided block, and then record the new control software.

因此,即使在仅需校正1个字节时,如果非易失性存储器的区块是16K字节或64K字节,也必需删掉这整个16K字节或64K字节,然后从设备外部传送其程序错误经过校正了的16K字节或64K字节的新控制软件,分别将它们记录到非易失性存储器中。Therefore, even when only 1 byte needs to be corrected, if the block of the nonvolatile memory is 16K bytes or 64K bytes, it is necessary to delete the entire 16K bytes or 64K bytes, and then transfer it from outside the device 16K bytes or 64K bytes of new control software whose program errors have been corrected are recorded in the nonvolatile memory, respectively.

因此,在更新终端设备的控制软件过程中,从设备外部传入的数据量加大,于是就产生了包括数据传送所需时间在内的操作时间增加的问题。Therefore, in updating the control software of the terminal equipment, the amount of data transferred from the outside of the equipment increases, thus causing a problem that the operation time including the time required for data transfer increases.

发明内容Contents of the invention

本发明的一个目的是缩短终端设备内记录的程序更新所需的终端设备操作时间。An object of the present invention is to shorten the operating time of a terminal device required for updating a program recorded in the terminal device.

本发明中,在更新可重写非易失性存储器(如闪速ROM)内记录的程序过程中,在RAM内对非易失性存储器的含有存储的程序中需更新的部分的那个区块内的程序部分进行扩展,然后根据外部指令,仅更新所扩展的程序部分中需要更新的那个部分。然后,擦除非易失性存储器内的区块,再次将RAM内经过更新的程序部分记录到非易失性存储器的已擦除区块内。In the present invention, in the process of updating the program recorded in the rewritable non-volatile memory (such as flash ROM), in the RAM, the block containing the part of the program stored in the non-volatile memory needs to be updated The internal program part is expanded, and then according to the external instruction, only the part that needs to be updated in the extended program part is updated. Then, erase the block in the non-volatile memory, and record the updated program part in the RAM to the erased block in the non-volatile memory again.

这样通过在RAM内对包含有需要更新的部分的程序部分进行扩展,就可以仅更新程序部分内需要更新的部分。通过这种方式,仅需对需要更新的部分作出指示,而无需指示更新所有程序部分的信息。换言之,由于可以减少从装置外部传送的重写指令,因此可以减少包括数据传输所需时间在内的程序更新操作时间。In this way, by expanding the program part including the part to be updated in the RAM, only the part to be updated in the program part can be updated. In this way, it is only necessary to instruct the parts that need to be updated, instead of instructing to update the information of all program parts. In other words, since the rewrite command transmitted from outside the device can be reduced, the program update operation time including the time required for data transfer can be reduced.

附图的简要说明Brief description of the drawings

图1是本发明第一实施例中的终端设备的功能方框图;FIG. 1 is a functional block diagram of a terminal device in a first embodiment of the present invention;

图2是表示终端设备中存储器映象图(map)的例子的示意图;Fig. 2 is a schematic diagram showing an example of a memory map (map) in a terminal device;

图3是第一实施例中的处理过程的流程图;Fig. 3 is a flowchart of the processing procedure in the first embodiment;

图4是表示第一实施例中的重写指令的例子的示意图;FIG. 4 is a schematic diagram showing an example of a rewrite command in the first embodiment;

图5是表示第一实施例中的重写指令的另一例子的示意图;Fig. 5 is a schematic diagram showing another example of the rewrite command in the first embodiment;

图6是表示本发明的第二实施例中的重写指令的例子的示意图;6 is a schematic diagram showing an example of a rewrite command in the second embodiment of the present invention;

图7是第二实施例中的处理过程的流程图;Fig. 7 is a flowchart of the processing procedure in the second embodiment;

图8是表示本发明第三实施例中的重写指令的例子的示意图;FIG. 8 is a schematic diagram showing an example of a rewrite command in the third embodiment of the present invention;

图9是第三实施例中的处理过程的流程图;Fig. 9 is a flowchart of the processing procedure in the third embodiment;

图10是表示第三实施例中的重写指令的另一例子的示意图;FIG. 10 is a schematic diagram showing another example of a rewrite command in the third embodiment;

图11是表示第三实施例中的重写指令的又一例子的示意图;FIG. 11 is a schematic diagram showing still another example of a rewrite command in the third embodiment;

图12是表示本发明第四实施例中的重写指令的例子的示意图;FIG. 12 is a schematic diagram showing an example of a rewrite command in the fourth embodiment of the present invention;

图13是第四实施例中的处理过程的流程图;Fig. 13 is a flowchart of the processing procedure in the fourth embodiment;

图14A是表示本发明的第五实施例中软件在校正前的模块结构的示意图;14A is a schematic diagram showing the module structure of the software before correction in the fifth embodiment of the present invention;

图14B是第五实施例中校正后的软件的模块结构的示意图;Fig. 14B is a schematic diagram of the module structure of the corrected software in the fifth embodiment;

图15是表示第五实施例中的重写指令例子的示意图;Fig. 15 is a diagram showing an example of a rewrite command in the fifth embodiment;

图16是第五实施例中的处理过程的流程图;Fig. 16 is a flowchart of the processing procedure in the fifth embodiment;

图17是表示第五实施例中的重写指令的另一例子的示意图;FIG. 17 is a diagram showing another example of a rewrite command in the fifth embodiment;

图18是表示第五实施例中的重写指令的再一例子的示意图;Fig. 18 is a schematic diagram showing still another example of the rewrite command in the fifth embodiment;

图19是表示第五实施例中软件在RAM内扩展后的模块结构的示意图;Fig. 19 is a schematic diagram showing the module structure after the software is expanded in the RAM in the fifth embodiment;

图20A是表示本发明的第六实施例中软件在经过校正前的模块结构的示意图;Fig. 20A is a schematic diagram showing the module structure of the software before correction in the sixth embodiment of the present invention;

图20B是表示第六实施例中软件在经过校正后的模块结构的示意图;Fig. 20B is a schematic diagram showing the corrected module structure of the software in the sixth embodiment;

图21A是表示第六实施例中闪速(Flash)ROM内的软件数据在校正前的示意图;Fig. 21A is a schematic diagram showing software data in the flash (Flash) ROM before correction in the sixth embodiment;

图21B是表示第六实施例中闪速ROM内的软件数据在校正后的示意图;Fig. 21B is a schematic diagram showing the corrected software data in the flash ROM in the sixth embodiment;

图22是第六实施例中控制CPU使用的命令的示意图;Fig. 22 is a schematic diagram of commands used to control CPU usage in the sixth embodiment;

图23是第六实施例中重写指令的例子的示意图;Fig. 23 is a schematic diagram of an example of a rewrite command in the sixth embodiment;

图24是第六实施例中的处理过程的流程图;Fig. 24 is a flowchart of the processing procedure in the sixth embodiment;

图25是表示第六实施例中的移位(shift)记录的示意图;Fig. 25 is a schematic diagram showing shift (shift) recording in the sixth embodiment;

图26是表示第六实施例中RAM内的部分软件数据在地址重写之前的示意图;Fig. 26 is a schematic diagram showing part of software data in RAM before address rewriting in the sixth embodiment;

图27是表示第六实施例中RAM内的部分软件数据在指示了地址重写后的示意图;Fig. 27 is a schematic diagram showing part of the software data in the RAM after address rewriting is indicated in the sixth embodiment;

图28是表示第六实施例中RAM中的部分软件数据在指示了地址重写后的另一示意图。Fig. 28 is another diagram showing part of software data in RAM after address rewriting is instructed in the sixth embodiment.

最佳实施方式best practice

下面将参照附图描述本发明的实施例。Embodiments of the present invention will be described below with reference to the accompanying drawings.

(第一实施例)(first embodiment)

图1表示本发明第一实施例中的终端设备的方框图的例子。在图1中,“1”表示终端设备。Fig. 1 shows an example of a block diagram of a terminal device in a first embodiment of the present invention. In FIG. 1, "1" indicates a terminal device.

终端设备1具有可向/从外部发送/接收信号的外部连接接口11、用于控制终端设备1的控制CPU 12、作为可重写非易失性存储器的闪速ROM 13、RAM、以及数据总线15(每个功能块都通过其相连)。The terminal device 1 has an external connection interface 11 capable of sending/receiving signals to/from the outside, a control CPU 12 for controlling the terminal device 1, a flash ROM 13 as a rewritable nonvolatile memory, a RAM, and a data bus 15 (through which each function block is connected).

可考虑作为外部接口11的是电缆有线连接接口和无线连接接口。此外,对于外部接口11,还可使用存储卡接口。该情况下,控制CPU 12从插入存储卡接口的存储卡中读取各种信息。Conceivable as external interface 11 are a cable-wired connection interface and a wireless connection interface. Furthermore, for the external interface 11, a memory card interface can also be used. In this case, the control CPU 12 reads various information from the memory card inserted into the memory card interface.

此外,当外部接口11是有线连接接口或无线连接接口、并且与网络相连时,可利用HTTP、FTP、TFTP以及其它传输协议输入数据。此外,也是在通过外部接口如有线连接接口、无线连接接口或存储卡接口输入信息时,输入信息通过控制CPU 12记录在RAM 14或闪速ROM 13中。另外,在该实施例中,数据通过控制CPU 12记录,在允许DMA传送时,可利用DMA传送复制的数据。In addition, when the external interface 11 is a wired connection interface or a wireless connection interface and is connected to a network, data can be input using HTTP, FTP, TFTP, and other transfer protocols. In addition, also when information is input through an external interface such as a wired connection interface, a wireless connection interface, or a memory card interface, the input information is recorded in the RAM 14 or the flash ROM 13 by controlling the CPU 12. Also, in this embodiment, data is recorded by controlling the CPU 12, and when DMA transfer is enabled, copied data can be transferred using DMA.

图2表示终端设备1中的存储器映象图的例子。FIG. 2 shows an example of a memory map in the terminal device 1. As shown in FIG.

如图2所示,与数据总线15相连的闪速ROM 13的存储区201在由控制CPU 12控制的存储空间中具有十六进制标志地址00000000(此后表示为0x00000000)到0x0005FFFF。此外,假设RAM 14的存储区202具有0x00100000到0x0015FFFF,闪速ROM 13的擦除单位为64K字节,即0x00000000~0x0000FFFF,0x00010000~0x0001FFFF...2, the storage area 201 of the flash ROM 13 connected to the data bus 15 has hexadecimal notation addresses 00000000 (hereinafter expressed as 0x00000000) to 0x0005FFFF in the storage space controlled by the control CPU 12. In addition, assuming that the storage area 202 of the RAM 14 has 0x00100000 to 0x0015FFFF, the erasing unit of the flash ROM 13 is 64K bytes, namely 0x00000000~0x0000FFFF, 0x00010000~0x0001FFFF...

下面参照图3所示的流程图描述按上述方式构建的终端装置1的操作。The operation of the terminal device 1 constructed in the above manner will be described below with reference to the flowchart shown in FIG. 3 .

在步骤S101,终端装置1的控制CPU 12通过外部连接接口11从外部装置(图1未示出)中将重写指令读入RAM 14的任选区域(在此,假设是图2中从0x00100000开始的区域)。In step S101, the control CPU 12 of the terminal device 1 reads the rewrite instruction from the external device (not shown in Fig. 1) into the optional area of the RAM 14 through the external connection interface 11 (here, assuming that it is from 0x00100000 in Fig. 2 starting area).

在此假设在闪速ROM 13存储的控制软件中要重写的地址和数据如图4所示。Assume here that the addresses and data to be rewritten in the control software stored in the flash ROM 13 are as shown in FIG. 4 .

此外,通过利用图4所示的地址来指示控制软件的重写部分,就不必利用实际数据指示重写部分,于是就可以减少重写指令的数据量,并缩短程序更新时间。Furthermore, by using the address shown in FIG. 4 to designate the rewritten part of the control software, it is not necessary to use actual data to designate the rewritten part, so that the data amount of the rewritten command can be reduced and the program update time can be shortened.

因此,在步骤S102中,控制CPU 12确定闪速ROM 13中的重写区块。例如,控制CPU 12检查图4中的重写地址,然后判定No.1到No.6的重写指令指定了闪速ROM 13中区块0x00010000到0x0001FFFF中的重写。Therefore, in step S102, the control CPU 12 determines the rewrite block in the flash ROM 13. For example, the control CPU 12 checks the rewrite addresses in FIG. 4, and then judges that the rewrite instructions No. 1 to No. 6 designate rewrite in blocks 0x00010000 to 0x0001FFFF in the flash ROM 13.

在步骤S103中,控制CPU 12在RAM 14的除了步骤S101中读入重写指令区域以外的任选区域中(在此,假设图2中的0x00110000到0x0011FFFF)扩展步骤S102中确定的重写区块内的数据。In step S103, the control CPU 12 expands the rewrite area determined in the step S102 in an optional area (here, assuming 0x00110000 to 0x0011FFFF among Fig. 2 ) of the RAM 14 except that the rewrite instruction area is read in the step S101 data within the block.

此外,在步骤S104中,控制CPU 102在RAM内更新地址0x00110030中的数据,在该地址中,将在用图4的重写指令No.1指示的地址0x00010030内的数据扩展成0x43。Further, in step S104, the control CPU 102 updates the data in the address 0x00110030 in the RAM, in which the data in the address 0x00010030 indicated by the rewrite command No. 1 of FIG. 4 is expanded to 0x43.

在步骤S105中,控制CPU 12判断步骤S102内确定的重写区块上的所有重写指令是否已得到处理。该情况下,由于留下了指令No.2到No.6,控制CPU 12就进入步骤S104的处理过程,并按照与前面相同的方式根据重写指令No.2到No.6更新RAM中经过扩展的控制软件。In step S105, the control CPU 12 judges whether all rewrite commands on the rewrite block determined in step S102 have been processed. In this case, since the instructions No.2 to No.6 are left, the control CPU 12 enters the process of step S104, and updates the process in the RAM according to the rewriting instructions No.2 to No.6 in the same manner as before. Extended control software.

在完成了重写指令No.6的处理过程后,控制CPU 12在步骤S105中能够确定重写区块上的重写指令已全部经过处理,然后进入到步骤S106的处理过程。After completing the processing of the rewriting command No. 6, the control CPU 12 can determine in step S105 that all the rewriting commands on the rewriting block have been processed, and then enter into the processing of step S106.

接着,在步骤S106中,控制CPU 12擦除闪速Rom13中的区块0x00010000到0x0001FFFF。然后,控制CPU 12将RAM 14内区域0x00110000到0x0011FFFF上存储的更新控制软件记录到闪速ROM 13内的已擦除区块中。Next, in step S106, the control CPU 12 erases blocks 0x00010000 to 0x0001FFFF in the flash Rom 13. Then, the control CPU 12 records the update control software stored in the area 0x00110000 to 0x0011FFFF in the RAM 14 into the erased block in the flash ROM 13.

在步骤S107中,控制CPU 12判断是否已处理了所有这些读取的重写指令。该情况下,由于留下了重写指令No.7,因此控制CPU 12进入步骤S102的处理过程。In step S107, the control CPU 12 judges whether all these read rewrite commands have been processed. In this case, since the rewrite command No. 7 remains, the control CPU 12 proceeds to the processing of step S102.

然后,在步骤S102中,控制CPU 12检查图4中指令No.7以及后续数字的地址,并判定No.7到No.19的重写指令指定了对闪速ROM 13中区块0x00020000到0x0002FFFF中的重写。Then, in step S102, the control CPU 12 checks the address of instruction No.7 and subsequent numbers in Fig. rewrite in .

在步骤S103中,控制CPU12在RAM 14的除读取重写指令区域之外的所有其它区域(在此假设图2中的0x00110000到0x0011FFFF)的区块内扩展数据。另外,在步骤S104中,控制CPU 12更新RAM 14的地址0x00110000中的数据,其中将位于用图4的重写指令No.7指示的地址0x00021000中的数据扩展为0x1F。In step S103, the control CPU 12 expands data in blocks of all other areas (assuming 0x00110000 to 0x0011FFFF in FIG. 2 here) of the RAM 14 except the read and rewrite instruction area. In addition, in step S104, the control CPU 12 updates the data in the address 0x00110000 of the RAM 14, wherein the data located in the address 0x00021000 indicated by the rewrite command No. 7 of FIG. 4 is extended to 0x1F.

此后,控制CPU 12按照与前面相同的方式根据重写指令No.8到No.10更新RAM中经过扩展的控制软件。在步骤S106中,CPU 12删除闪速ROM 13中的区块。然后,控制CPU 12将RAM 14的区域0x00110000到0x0011FFFF中存储的更新控制软件记录在闪速ROM 13的已删除区块中。Thereafter, the control CPU 12 updates the expanded control software in the RAM according to the rewriting instructions No. 8 to No. 10 in the same manner as before. In step S106, the CPU 12 deletes the block in the flash ROM 13. Then, the control CPU 12 records the update control software stored in the area 0x00110000 to 0x0011FFFF of the RAM 14 in the deleted block of the flash ROM 13.

上述处理过程重复进行,直到在步骤S107中判定在终端设备1中读取重写指令的过程已经全部完成。The above process is repeated until it is determined in step S107 that the process of reading the rewriting instruction in the terminal device 1 has been completed.

按照上面所述的,依照第一实施例,通过在RAM14中扩展包括需要更新部分的程序部分,可以仅更新程序部分中需要更新的部分。于是仅需指示需要更新的部分,而无需要求指示更新整个程序部分的更新信息。换言之,可以减少外部传给终端设备1的重写指令。因此,就可以缩短包括数据传输时间在内的闪速ROM 13内存储的控制程序的更新操作时间。As described above, according to the first embodiment, by extending the program portion including the portion requiring update in the RAM 14, only the portion requiring update of the program portion can be updated. It is then only necessary to indicate the portion that needs to be updated, without requiring update information indicating to update the entire program portion. In other words, it is possible to reduce the number of rewriting instructions externally transmitted to the terminal device 1 . Therefore, it is possible to shorten the update operation time of the control program stored in the flash ROM 13 including the data transfer time.

此外,可在完成了对RAM14内控制程序的程序部分的更新之后,对闪速ROM 13进行删除处理,并将更新后的数据写入闪速ROM 13。通过这种方式,例如可获得这样一种方法,其能仅将闪速RAM 13的控制程序中不需要改变的那部分保存RAM 14中,对闪速ROM 13进行删除处理,然后下载更新程序部分以写入闪速ROM 13。在该方法中,可避免以下情形:在将更新程序信息写入闪速ROM 13的过程中通信未联系上时,不仅写入更新程序失败,而且闪速ROM 13中存储的原始程序也丢失。换言之,即使在写入更新程序信息过程中通信未联系上时,也能将更新前的程序部分留在闪速ROM 13内,因此,是能恢复的。In addition, after the update of the program part of the control program in the RAM 14 is completed, the flash ROM 13 can be deleted, and the updated data can be written into the flash ROM 13. In this way, for example, a method can be obtained in which only the part of the control program of the flash RAM 13 that does not need to be changed is stored in the RAM 14, the flash ROM 13 is deleted, and then the updated program part is downloaded to write to the flash ROM 13. In this method, the following situation can be avoided: when the communication is not connected during the process of writing the update program information into the flash ROM 13, not only the write update program fails, but also the original program stored in the flash ROM 13 is also lost. In other words, even if the communication is not connected during the writing of the update program information, the program part before the update can be left in the flash ROM 13, so it can be restored.

此外,依照第一实施例,可利用外部接口11从外部提供重写指令,因此不必删除(remove)闪速ROM 13以更新程序,而且可以实现缩短了更新操作时间的程序更新。Furthermore, according to the first embodiment, a rewrite instruction can be supplied from the outside using the external interface 11, so it is not necessary to remove the flash ROM 13 to update the program, and a program update with shortened update operation time can be realized.

此外,图2所示的存储空间可相应于控制CPU 12、闪速ROM 13和/或RAM 14的类型或结构或者终端设备1中提供的数据量而变化。In addition, the storage space shown in FIG. 2 may vary according to the type or structure of the control CPU 12, flash ROM 13 and/or RAM 14 or the amount of data provided in the terminal device 1.

此外,虽然该实施例中使用了闪速ROM 13,但只要存储器是可重写的非易失性存储器,也可以采用EEPROM之类的存储器。In addition, although the flash ROM 13 is used in this embodiment, as long as the memory is a rewritable nonvolatile memory, a memory such as EEPROM can also be used.

另外,该实施例中控制软件的更新单位是64千字节,但也不需要是64千字节,这要根据取决于非易失性存储器(例如闪速ROM 13)装置类型的擦除区块容量来确定。而且,虽然该实施例描述了1字节作为重写字节数,但重写数据也不必是1字节,例如也可以同时重写用任选地址指定方法指定的数据量如2字节和4字节。In addition, the update unit of the control software in this embodiment is 64 kilobytes, but it does not need to be 64 kilobytes, depending on the erasing area depending on the type of nonvolatile memory (such as flash ROM 13) device Block size is determined. Moreover, although this embodiment has described 1 byte as the number of rewriting bytes, the rewriting data need not be 1 byte, for example, it is also possible to simultaneously rewrite the amount of data designated by an optional address designation method such as 2 bytes and 4 bytes.

图4中,闪速ROM 13中目标重写地址用绝对地址指示。但是,如图5所示,相对于后续的地址,可仅用绝对地址指示第一地址,而这些后续地址用紧接前面所用地址的相对值指示。例如在图5所示的例子中,用重写指令No.2指示的重写地址表示位于用指令No.1指示的重写地址后面的地址0x1。In Fig. 4, the target rewriting address in the flash ROM 13 is indicated with an absolute address. However, as shown in FIG. 5, only the first address may be indicated by an absolute address with respect to subsequent addresses indicated by a relative value of the address used immediately before. For example, in the example shown in FIG. 5, the rewrite address indicated by the rewrite command No. 2 indicates the address 0x1 located after the rewrite address indicated by the command No. 1.

通过这种方式,就可以用数据量小于绝对地址数据量的相对地址指示重写,由此可以减少重写指令的数据量。In this way, rewriting can be indicated with a relative address whose data volume is smaller than that of an absolute address, thereby reducing the data volume of a rewriting command.

(第二实施例)(second embodiment)

下面描述依照本发明第二实施例的终端装置。A terminal device according to a second embodiment of the present invention will be described below.

依照本发明第二实施例的终端装置的功能方框图的例子和存储映象图的例子分别与第一实施例中的终端装置相同,因此也与图1和2所示的相同。An example of a functional block diagram and an example of a memory map of a terminal device according to the second embodiment of the present invention are respectively the same as those of the terminal device in the first embodiment, and thus are also the same as those shown in FIGS. 1 and 2 .

在第一实施例中,重写指令由图4所示的非易失性存储器中的重写目标地址401和重写数据402的组合构成。在第二实施例中,如图6所示,重写指令由重写指示命令501和用于执行该命令的数据501和502的组合构成。通过这种方式,也可以获得象第一实施例中那样的效果。In the first embodiment, the rewrite command is composed of a combination of rewrite target address 401 and rewrite data 402 in the nonvolatile memory shown in FIG. 4 . In the second embodiment, as shown in FIG. 6, the rewrite command is composed of a combination of a rewrite instruction command 501 and data 501 and 502 for executing the command. In this way, effects like those in the first embodiment can also be obtained.

例如,图6中的重写指令No.1是用于在RAM 14中扩展的指令。当控制CPU 12收到重写指令No.1时,其利用数据1作为扩展源地址504,以数据2作为扩展目的地址505,将程序从闪速ROM 13扩展到RAM 14中。For example, the rewrite instruction No. 1 in FIG. 6 is an instruction for expanding in the RAM 14. When the control CPU 12 receives the rewriting instruction No. 1, it uses data 1 as the extension source address 504, and uses data 2 as the extension destination address 505 to extend the program from the flash ROM 13 to the RAM 14.

此外,图6中的重写指令No.8是一个写回闪速ROM 13的指令。收到重写指令No.8的控制CPU 12删掉闪速ROM 13中从重写指令后面的数据2开始的区块,然后利用数据1作为扩展源地址506,以数据2作为记录目标地址507,将RAM 14中的程序存到闪速ROM 13中。In addition, rewrite command No. 8 in FIG. 6 is a command to write back to the flash ROM 13. The control CPU 12 that has received the rewrite command No. 8 deletes the block starting from the data 2 behind the rewrite command in the flash ROM 13, then uses the data 1 as the extended source address 506, and uses the data 2 as the recording target address 507 , the program in the RAM 14 is stored in the flash ROM 13.

重写指令No.2到No.7和No.10到No.13是数据重写指令。当控制CPU 12收到数据重写指令时,其利用数据1作为重写目标地址508,以数据2作为实际重写数据509,对RAM中的数据进行重写。Rewrite commands No. 2 to No. 7 and No. 10 to No. 13 are data rewrite commands. When the control CPU 12 receives the data rewriting instruction, it uses data 1 as the rewriting target address 508 and data 2 as the actual rewriting data 509 to rewrite the data in the RAM.

下面参照图7所示的流程图描述给出了图6所示重写指令时的操作。The following description gives the operation when the instruction shown in FIG. 6 is rewritten with reference to the flowchart shown in FIG. 7 .

首先,在步骤S110中,当提供图6所示的指令作为闪速ROM 13所存程序的重写指令时,控制CPU 12通过外部连接接口11读取图6所示的重写指令No.1,并将其存在RAM 14的任选区域内。First, in step S110, when the instruction shown in Figure 6 is provided as the rewriting instruction of the program stored in the flash ROM 13, the control CPU 12 reads the rewriting instruction No.1 shown in Figure 6 through the external connection interface 11, And store it in the optional area of RAM 14.

在步骤S111中,控制CPU 12检查指令No.1是否是重写终止指令。由于该指令No.1不是重写终止指令,控制CPU 12转入步骤S112的处理过程。In step S111, the control CPU 12 checks whether command No. 1 is a rewriting termination command. Because this instruction No.1 is not rewriting termination instruction, control CPU 12 and proceed to the processing procedure of step S112.

在步骤S112中,控制CPU 12检查指令No.1是否是用于在RAM 14中进行扩展的指令。由于指令No.1是用于在RAM 14中进行扩展的指令,控制CPU12转入步骤S115的处理过程。In step S112, the control CPU 12 checks whether instruction No. 1 is an instruction for expansion in the RAM 14. Because instruction No.1 is the instruction that is used for expanding in RAM 14, control CPU 12 goes over to the processing procedure of step S115.

在步骤S115中,控制CPU 12根据指令后面的数据,在RAM 14中的0x00110000到0x0011FFFF内对闪速ROM 13中始自0x00010000的区块、即第二实施例中的0x00010000到0x0001FFFF的数据进行扩展。然后,控制CPU12转入步骤S110的处理过程。In step S115, the control CPU 12 expands the block from 0x00010000 in the flash ROM 13, that is, the data from 0x00010000 to 0x0001FFFF in the second embodiment, in the RAM 14 from 0x00110000 to 0x0011FFFF according to the data behind the instruction . Then, the control CPU 12 proceeds to the processing of step S110.

接着,在步骤S110中,控制CPU 12读取指令No.2。控制CPU 12在步骤S111和S112中象对指令No.1那样检查读取指令No.2的指令内容。但是,指令No.2与步骤S111和S112的转移条件(branch condition)不一致。因此,控制CPU 12转入步骤S113的处理过程。Next, in step S110, the control CPU 12 reads command No. 2. The control CPU 12 checks the command content of the read command No. 2 as in the command No. 1 in steps S111 and S112. However, instruction No. 2 does not match the branch conditions of steps S111 and S112. Therefore, the control CPU 12 proceeds to the processing of step S113.

在步骤S113中,控制CPU 13判定指令No.2是数据重写指令,因此,转入步骤S116的过程。In step S113, the control CPU 13 judges that command No. 2 is a data rewriting command, and therefore, proceeds to the process of step S116.

在步骤S116中,控制CPU 12根据该指令后面的数据重写地址0x00110030到0x43中存储的数据。In step S116, the control CPU 12 rewrites the data stored in addresses 0x00110030 to 0x43 according to the data behind the instruction.

然后,控制CPU 12重复与前面相同的过程,直到指令No.7,然后在步骤S110中读取指令No.8。控制CPU 12在步骤S111到S113中按照与前述过程相同的方式检查指令内容,然后转入步骤S114的处理过程。Then, the control CPU 12 repeats the same process as before until command No. 7, and then reads command No. 8 in step S110. The control CPU 12 checks the instruction content in steps S111 to S113 in the same manner as the foregoing procedure, and then proceeds to the processing procedure of step S114.

在步骤S114中,控制CPU 12判断指令No.8是写回闪速ROM 13的指令,然后转入步骤S117的处理过程。In step S114, the control CPU 12 judges that instruction No. 8 is an instruction to write back to the flash ROM 13, and then proceeds to the processing of step S117.

在步骤S117中,依照该指令后面的数据,控制CPU 12转入将RAM 14中经过扩展的程序记录到区块0x00010000到0x0001FFFF中的处理过程。首先,控制CPU 12一次删掉ROM 13中的区块0x00010000到0x0001FFFF。然后,控制CPU 12将RAM 14的区块0x00010000到0x0001FFFF的内容记录到闪速ROM 13的区块0x00010000到0x0001FFFF中。In step S117, according to the data behind the instruction, the control CPU 12 transfers to the process of recording the expanded program in the RAM 14 into blocks 0x00010000 to 0x0001FFFF. First, the control CPU 12 deletes blocks 0x00010000 to 0x0001FFFF in the ROM 13 at a time. Then, the control CPU 12 records the contents of the blocks 0x00010000 to 0x0001FFFF of the RAM 14 into the blocks 0x00010000 to 0x0001FFFF of the flash ROM 13.

然后,控制CPU 12为图6所提供的所有重写指令执行前述过程。Then, the control CPU 12 executes the aforementioned process for all the rewriting instructions provided in FIG. 6 .

如上所述,依照第二实施例,可以仅将终端设备1中闪速ROM 13所存控制软件中的需要更新的数据读入终端设备1中。由此可以缩短终端设备1中对闪速ROM 13内记录的软件进行更新的时间。As mentioned above, according to the second embodiment, only the data to be updated in the control software stored in the flash ROM 13 in the terminal device 1 can be read into the terminal device 1. This can shorten the time for updating the software recorded in the flash ROM 13 in the terminal device 1.

另外,在第二实施例中,图6中举例示出的重写指令可通过图1所示的外部接口11提供,此外,还可为了执行程序过程而顺序地提供指令内容。再有,还可一起提供要存到终端设备1的RAM 14中去的指令,以便根据存储的指令执行重写过程。In addition, in the second embodiment, the rewrite command exemplified in FIG. 6 can be supplied through the external interface 11 shown in FIG. 1 , and furthermore, the content of the command can be sequentially supplied for executing the program process. Have again, also can provide the instruction that will be stored in the RAM 14 of terminal equipment 1 together, so that the rewriting process is carried out according to the instruction stored.

此外,在前述描述中,可按照图7中步骤S111、S112、S113和S114的顺序执行检查读指令内容的每个过程,但即使以可选方式改变了顺序,也可以获得相同效果。Furthermore, in the foregoing description, each process of checking the contents of the read command may be performed in the order of steps S111, S112, S113, and S114 in FIG. 7, but the same effect can be obtained even if the order is optionally changed.

(第三实施例)(third embodiment)

在第一实施例中,重新指令由闪速ROM 13(其是非易失性存储器)内的图4所示的重写目标地址401和重写数据402的组合构成。在第三实施例中,如图8所示,重写指令由重写起始地址801、重写数据项数目802、以及与重写数据项数目802相对应的实际重写数据803组合构成。通过这种方式,就可以获得与第一实施例相同的效果。In the first embodiment, the recommand is constituted by a combination of the rewrite target address 401 and rewrite data 402 shown in FIG. 4 in the flash ROM 13 (which is a nonvolatile memory). In the third embodiment, as shown in FIG. 8 , the rewrite command is composed of a rewrite start address 801 , a rewrite data item number 802 , and actual rewrite data 803 corresponding to the rewrite data item number 802 . In this way, the same effect as that of the first embodiment can be obtained.

另外,依照本发明第三实施例的终端设备的功能框图的例子和存储器映象图的例子分别与图1和2所示的第一实施例的相同。In addition, an example of a functional block diagram and an example of a memory map of a terminal device according to the third embodiment of the present invention are the same as those of the first embodiment shown in FIGS. 1 and 2, respectively.

下面参照图9所示的流程图,描述在提供有图8所示的重写指令时终端设备1的操作。The operation of the terminal device 1 when supplied with the rewriting instruction shown in FIG. 8 will be described below with reference to the flowchart shown in FIG. 9 .

在步骤S121中,在将图8所示的指令提供给终端设备1以作为闪速ROM13内所存程序的重写指令时,控制CPU 12通过外部连接接口11将图8所示的重写指令读入RAM 14中的任选区域(在此,假设该区域从图2中的0x00100000开始)。In step S121, when the instruction shown in FIG. 8 is provided to the terminal device 1 as the rewriting instruction of the program stored in the flash ROM13, the control CPU 12 reads the rewriting instruction shown in FIG. 8 through the external connection interface 11. (Here, assume that this area starts from 0x00100000 in Figure 2).

在步骤S122中,控制CPU 12对图8中的重写起始地址进行检查,判定重写指令No.1和No.2指示闪速ROM 13中区块0x00010000到0x0001FFFF中的重写。In step S122, the control CPU 12 checks the rewriting start address in FIG. 8, and determines that the rewriting instructions No. 1 and No. 2 indicate rewriting in blocks 0x00010000 to 0x0001FFFF in the flash ROM 13.

接着,在步骤S123中,控制CPU 12在已读入重写指令的区域之外的任选区域(在此假设0x00110000到0x0011FFFF)内对步骤S122中判定的区块内的数据进行扩展。Next, in step S123, the control CPU 12 expands the data in the block determined in step S122 in an optional area (here, assume 0x00110000 to 0x0011FFFF) other than the area in which the rewrite command has been read.

另外,在步骤S124中,控制CPU 12根据图8中的重写指令No.1确定RAM 14中对闪速ROM 13中的0x00110030进行了扩展的地址0x00010030是重写起始地址,重写数目项的数目为0x04。In addition, in step S124, control CPU 12 determines that the address 0x00010030 in RAM 14 to 0x00110030 in flash ROM 13 has been extended according to rewriting instruction No.1 among Fig. The number is 0x04.

在步骤S125中,控制CPU 12根据图8中指令No.1的重写数据,改变地址0x00110030到0x43的内容。In step S125, the control CPU 12 changes the contents of addresses 0x00110030 to 0x43 according to the rewriting data of instruction No.1 in FIG. 8 .

接着,在步骤S126中,控制CPU 12将重写地址加1,变为0x00110031。在步骤S127中,控制CPU 12将重写数据项数目减1,变为0x03。在步骤S128中,控制CPU 12检查重写数据项数目是否为0,当该数目不是0时,其转入步骤S125的处理。Next, in step S126, the control CPU 12 adds 1 to the rewrite address to become 0x00110031. In step S127, the control CPU 12 decrements the number of rewritten data items by 1 to become 0x03. In step S128, the control CPU 12 checks whether the number of rewritten data items is 0, and when the number is not 0, it proceeds to the processing of step S125.

然后,控制CPU 12重复上述步骤S125到S128的处理过程,直到重写数据项数目变为0。Then, the control CPU 12 repeats the above-described processing of steps S125 to S128 until the number of rewrite data items becomes zero.

当重写数据项数目变为0时,控制CPU 12在步骤S129中判断步骤S122中确定的对重写区块的重写指令是否全部处理完。当区块上的重写指令未经过处理时,控制CPU 12转入步骤S124的处理,然后重复步骤S124到S129的处理过程,直到区块上的所有重写指令经过了处理。When the number of rewriting data items becomes 0, the control CPU 12 judges in step S129 whether all the rewriting instructions to the rewriting blocks determined in step S122 have been processed. When the rewrite command on the block has not been processed, the control CPU 12 proceeds to the processing of step S124, and then repeats the processing of steps S124 to S129 until all rewrite commands on the block have been processed.

与此同时,当重写区块上的所有重写指令全部经过处理之后,控制CPU 12在步骤S130中删除闪速ROM 13内于步骤S122时确定的区块。然后,控制CPU 12将RAM 14中区域0x00110000到0x0011FFFF内存储的新控制软件记录到闪速ROM 13的已删区块内。At the same time, after all the rewrite commands on the rewrite block are all processed, the control CPU 12 deletes the block determined in the step S122 in the flash ROM 13 in step S130. Then, the control CPU 12 records the new control software stored in the area 0x00110000 to 0x0011FFFF in the RAM 14 into the deleted block of the flash ROM 13.

接着,控制CPU 12在步骤S131中判断是否完成了对图8举例示出的重写指令的处理。当该处理未完成时,控制CPU进入步骤S122的处理过程。Next, the control CPU 12 judges in step S131 whether or not the processing of the rewrite command illustrated in FIG. 8 has been completed. When the processing is not completed, the control CPU proceeds to the processing of step S122.

然后,控制CPU 12重复上述步骤S122到S131的处理过程,直到完成了所有重写指令的处理。Then, the control CPU 12 repeats the processing of the above-mentioned steps S122 to S131 until the processing of all rewriting instructions is completed.

如上所述,依照第三实施例,在终端设备1的闪速ROM 13内存储的控制软件中,可以仅读取需要更新到终端设备1中的数据进行更新。As described above, according to the third embodiment, in the control software stored in the flash ROM 13 of the terminal device 1, only the data that needs to be updated in the terminal device 1 can be read and updated.

在第三实施例中,如图8所示,重写指令由重写起始地址801、重写数据项数目802和实际重写数据803组合构成。此外,如图10所示,重写指令可由重写起始地址1001、重写终止地址1002、以及实际重写数据1003构成。该情况下,例如,如图10所示,通过将重写起始地址0x00010030与重写终止地址0x00010033作比较,将重写数据项数目推导为0x04。因此,利用图10所示的重写指令,也可以获得与图8所示重写指令相同的效果。In the third embodiment, as shown in FIG. 8 , the rewrite instruction is composed of a combination of a rewrite start address 801 , a number of rewrite data items 802 and actual rewrite data 803 . Furthermore, as shown in FIG. 10 , the rewrite command may be composed of a rewrite start address 1001 , a rewrite end address 1002 , and actual rewrite data 1003 . In this case, for example, as shown in FIG. 10, by comparing the rewriting start address 0x00010030 with the rewriting end address 0x00010033, the number of rewriting data items is derived as 0x04. Therefore, the same effect as that of the rewrite command shown in FIG. 8 can also be obtained with the rewrite command shown in FIG. 10 .

因此,在第三实施例中,如图8所示,重写指令由重写起始地址801、重写数据项数目802和实际重写数据803组合而成。另外,如图11所示,重写指令可由重写起始地址1101、实际重写数据1102和表示重写终止的特定数据1103构成。该情况下,例如在图11的重写指令No.1中,将RAM 14内地址0x00110030中(其中,重写起始地址0x00010030上的程序经过扩展)的数据更新为0x43。另外,将地址0x00110031上的数据更新为0xBF,将地址0x00110032上的数据更新为0x00,将0x00110033上的数据更新为0x10。Therefore, in the third embodiment, as shown in FIG. 8 , the rewrite command is composed of a rewrite start address 801 , the number of rewrite data items 802 and actual rewrite data 803 . In addition, as shown in FIG. 11, the rewrite command may be composed of a rewrite start address 1101, actual rewrite data 1102, and specific data 1103 indicating the end of rewrite. In this case, for example, in the rewriting instruction No.1 of FIG. 11 , the data in the address 0x00110030 in the RAM 14 (wherein, the program on the rewriting start address 0x00010030 is expanded) is updated to 0x43. In addition, update the data at address 0x00110031 to 0xBF, update the data at address 0x00110032 to 0x00, and update the data at 0x00110033 to 0x10.

因此,由于0x10后面的数据是表示重写终止的专用数据,因此可以判定该特定数据后面的下一数据是下一重写起始地址。按照这种方式,通过重复上述过程,图11所示的重写指令能实现与图8所示重写指令相同的效果。Therefore, since the data following 0x10 is dedicated data indicating the end of rewriting, it can be determined that the next data following this specific data is the next rewriting start address. In this way, the rewrite command shown in FIG. 11 can achieve the same effect as the rewrite command shown in FIG. 8 by repeating the above-described process.

另外,在第三实施例中,在步骤S126中将重写地址加1,然后在步骤S127中将重写数据项数减1。但是,通过先将重写数据项数减1,然后在将重写地址加1,也可以获得相同效果。Also, in the third embodiment, the rewrite address is incremented by 1 in step S126, and then the number of rewrite data items is decremented by 1 in step S127. However, the same effect can also be obtained by first decrementing the number of rewriting data items by 1 and then adding 1 to the rewriting address.

(第四实施例)(fourth embodiment)

在第三实施例中,如图8所示,重写指令可由非易失性存储器内的重写起始地址801、重写数据项数目802和实际重写数据803组合而成。在第四实施例中,如图12所示,指令由包括重写指令命令的指令1201和用于执行该命令的数据1202组合而成。通过这种方式,可以获得与第三实施例相同的效果。In the third embodiment, as shown in FIG. 8 , the rewrite command may be composed of a rewrite start address 801 in the nonvolatile memory, a rewrite data item number 802 and actual rewrite data 803 . In the fourth embodiment, as shown in FIG. 12, a command is composed of a command 1201 including a rewrite command command and data 1202 for executing the command. In this way, the same effects as those of the third embodiment can be obtained.

另外,依照本发明第四实施例的终端装置的功能方框图的例子和存储器映象图的例子分别与图1和2所示的第一实施例的相同。In addition, an example of a functional block diagram and an example of a memory map of a terminal device according to a fourth embodiment of the present invention are the same as those of the first embodiment shown in FIGS. 1 and 2, respectively.

下面参照图13所示的流程图描述在提供有图12所示重写指令时的操作。The operation when the rewrite instruction shown in FIG. 12 is supplied will be described below with reference to the flowchart shown in FIG. 13 .

另外,在图12的重写指令的操作中,RAM内扩展和写回ROM与第二实施例中一样。另外,该重写表示利用对应于地址后面的数据表示的数据项数目的后续实际数据写到用指令后面的数据表示的地址中。In addition, in the operation of the rewrite command in FIG. 12, expansion in RAM and writing back to ROM are the same as in the second embodiment. In addition, this rewriting means writing to the address indicated by the data following the instruction with subsequent actual data corresponding to the number of data items indicated by the data following the address.

在步骤S141中,在提供图12所示的指令作为闪速ROM 13中存储程序上的重写指令时,控制CPU 12读取指令No.1。In step S141, when the instruction shown in FIG. 12 is supplied as a rewrite instruction on the program stored in the flash ROM 13, the control CPU 12 reads instruction No. 1.

接着,在步骤S142中,控制CPU 12检查读取指令是否是重写终止指令。当该指令不是重写终止指令时,控制CPU 12进入步骤S143的处理过程。Next, in step S142, the control CPU 12 checks whether the read command is a rewrite termination command. When the instruction is not a rewriting termination instruction, the control CPU 12 enters the process of step S143.

在步骤S143中,控制CPU 12检查读取指令是否是RAM 14中的扩展指令。当该指令是RAM 14中的扩展指令时,控制CPU 12进入步骤S144的处理过程,而当指令不是RAM 14中的扩展指令时,其进入步骤S145的处理过程。In step S143, the control CPU 12 checks whether the read instruction is an extended instruction in the RAM 14. When the instruction is an extended instruction in the RAM 14, the control CPU 12 enters the processing of step S144, and when the instruction is not an extended instruction in the RAM 14, it enters the processing of step S145.

在步骤S144中,当读取指令是图12中的指令No.1时,指令是RAM 14中的扩展指令。因此,控制CPU 12在RAM 14中的地址0x00110000到0x0001FFFF上对闪速ROM 13中的地址0x00010000到0x0001FFFF上的数据进行扩展。然后,控制CPU 12进入步骤S141的处理过程。In step S144, when the read command is command No. 1 in FIG. 12, the command is an extended command in the RAM 14. Therefore, the control CPU 12 expands the data at the addresses 0x00010000 to 0x0001FFFF in the flash ROM 13 at the addresses 0x00110000 to 0x0001FFFF in the RAM 14. Then, the control CPU 12 proceeds to the processing of step S141.

当读取指令是图12中的指令No.2时,控制CPU 12在步骤S141中读取指令。然后,控制CPU 12通过步骤S142到S143的处理进入S145的处理过程。When the read command is command No. 2 in FIG. 12, the control CPU 12 reads the command in step S141. Then, the control CPU 12 proceeds to the processing of S145 through the processing of steps S142 to S143.

在步骤S145中,控制CPU 12检查读取指令是否是数据重写指令。当读取指令是数据重写指令时,控制CPU 12进入步骤S146的处理。其间,当读取指令不是数据重写指令时,控制CPU 12进入步骤S151的处理过程。In step S145, the control CPU 12 checks whether the read command is a data rewrite command. When the read command is a data rewrite command, the control CPU 12 proceeds to the processing of step S146. Meanwhile, when the read command is not a data rewrite command, the control CPU 12 proceeds to the processing of step S151.

图12中的指令No.12是数据重写指令。因此,控制CPU 12进入步骤S146的处理过程。Command No. 12 in FIG. 12 is a data rewrite command. Therefore, the control CPU 12 proceeds to the processing of step S146.

在步骤S146中,控制CPU 12根据图12中的指令No.2确定RAM 14中的地址0x00110030是重写起始地址,并且重写数据项数目是0x04。In step S146, the control CPU 12 determines that the address 0x00110030 in the RAM 14 is the rewrite start address according to instruction No. 2 in FIG. 12, and the number of rewrite data items is 0x04.

接着,在步骤S147中,控制CPU 12根据图12中的指令No.2的重写数据,将地址0x00110030的内容改为0x43。然后控制CPU 12在步骤S148中将重写地址加1,变为0x00110031。Then, in step S147, the control CPU 12 changes the content of address 0x00110030 to 0x43 according to the rewriting data of instruction No.2 in FIG. 12 . Then the control CPU 12 adds 1 to the rewrite address in step S148 to become 0x00110031.

在步骤S149中,控制CPU 12将重写数据项数目减1,变为0x03。In step S149, the control CPU 12 decrements the number of rewritten data items by 1 to 0x03.

在步骤S150中,控制CPU 12检查重写数据项数目是否为0,并且当该数据不是0时,进入步骤S147的处理过程。In step S150, the control CPU 12 checks whether the number of rewritten data items is 0, and when the data is not 0, enters the processing procedure of step S147.

然后,控制CPU 12重复上述步骤S147到S150的处理过程,直到重写数据项数目变为0。当重写数据项的数目为0时,控制CPU 12进入S141的处理过程。Then, the control CPU 12 repeats the above-mentioned processing of steps S147 to S150 until the number of rewritten data items becomes zero. When the number of rewritten data items is 0, the control CPU 12 enters the process of S141.

在图12中的指令No.4的情况下,控制CPU 12在步骤S141中读取指令。然后控制CPU 12通过步骤S142、S143和S145的处理过程进入S151的处理过程。然后,在步骤S151中,控制CPU 12检查该读取指令是否是写回闪速ROM13的指令,当该指令是写回闪速ROM 13的指令时,其进入步骤S152的处理过程,而当该指令不是写回闪速ROM 13的指令时,其进入S141的处理过程。In the case of command No. 4 in FIG. 12, the control CPU 12 reads the command in step S141. Then control CPU 12 enters the processing procedure of S151 by the processing procedure of steps S142, S143 and S145. Then, in step S151, control CPU 12 checks whether this read instruction is the instruction of writing back flash ROM 13, when this instruction is the instruction of writing back flash ROM 13, it enters the processing procedure of step S152, and when this instruction When the instruction is not an instruction to write back to the flash ROM 13, it enters the processing procedure of S141.

图12中的指令No.4是写回闪速ROM 13的指令。因此,控制CPU 12进入步骤S152的处理。Instruction No. 4 among Fig. 12 is the instruction of writing back to flash ROM 13. Therefore, the control CPU 12 proceeds to the processing of step S152.

在步骤S152中,控制CPU 12擦除闪速ROM 13中由写回ROM的读取指令表示的区块,即在图12举例示出的指令No.4的情况下的0x00010000到0x0001FFFF。接着,控制CPU 12将RAM 14的0x00110000到0x0011FFFF中存储的新控制软件记录在闪速ROM 13的已擦除的区块中。然后,控制CPU 12进入步骤S141的处理过程。In step S152, the control CPU 12 erases the block in the flash ROM 13 indicated by the read command written back to the ROM, that is, 0x00010000 to 0x0001FFFF in the case of command No. 4 exemplarily shown in FIG. 12 . Next, the control CPU 12 records the new control software stored in 0x00110000 to 0x0011FFFF of the RAM 14 in the erased block of the flash ROM 13. Then, the control CPU 12 proceeds to the processing of step S141.

控制CPU 12重复前述处理过程,直到在步骤S142中判定步骤S141中读取的指令是重写终止指令。The control CPU 12 repeats the foregoing processing until it is determined in step S142 that the command read in step S141 is a rewriting termination command.

如上所述,根据第四实施例,在终端设备1的闪速ROM 13存储的控制软件中,可仅将需要更新的数据读入终端设备1。As described above, according to the fourth embodiment, of the control software stored in the flash ROM 13 of the terminal device 1, only data that needs to be updated can be read into the terminal device 1.

另外,在第四实施例中,图12举例示出的重写指令可通过图1所示的外部接口11提供,而且,可顺序地提供用于执行该重写处理过程的指令内容。此外,可将RAM 14中存储的指令一起给终端,以便根据所存储的指令执行重写处理。In addition, in the fourth embodiment, the rewriting command exemplified in FIG. 12 can be supplied through the external interface 11 shown in FIG. 1, and further, the content of the command for executing the rewriting process can be sequentially supplied. In addition, instructions stored in the RAM 14 can be given to the terminal together so that rewriting processing can be performed in accordance with the stored instructions.

此外,第四实施例描述了按照步骤S142、S143、S145和S151的顺序执行对步骤S141中读取的指令内容确定处理的情况,但可以以可选方式交换确定顺序。Furthermore, the fourth embodiment described the case where the determination processing of the instruction content read in step S141 is performed in the order of steps S142, S143, S145, and S151, but the determination order may be optionally exchanged.

另外,在第四实施例中,在步骤S148中将重写地址加1,然后在步骤S149中将重写数据项数目减1。但是,先将重写数据项的数目减1,然后再将重写地址加1,也能获得相同效果。Also, in the fourth embodiment, the rewrite address is incremented by 1 in step S148, and then the number of rewrite data items is decremented by 1 in step S149. However, the same effect can also be obtained by first reducing the number of rewriting data items by 1, and then adding 1 to the rewriting address.

(第五实施例)(fifth embodiment)

图14A和14B表示本发明第五实施例中的程序的模块结构,图14A表示校正程序错误之前的结构,而图14B表示校正了程序错误之后的结构。14A and 14B show the block structure of the program in the fifth embodiment of the present invention, FIG. 14A shows the structure before the program error is corrected, and FIG. 14B shows the structure after the program error is corrected.

换言之,图14A所示的程序由三个模块组成,即模块A1401、模块B1402和模块C1403。在图14A所示的程序中,即校正之前的程序中,模块A位于0x00000000到0x000001FF上,模块B位于0x00000200到0x0000021F上,模块C位于0x00000220到0x000005FF上。In other words, the program shown in FIG. 14A is composed of three modules, namely module A1401, module B1402 and module C1403. In the program shown in FIG. 14A , that is, the program before correction, module A is located at 0x00000000 to 0x000001FF, module B is located at 0x00000200 to 0x0000021F, and module C is located at 0x00000220 to 0x000005FF.

另外,在图14B所示的程序中,作为图14A中程序的校正结果,模块B1402发生了变化,其位于0x00000200到0x0000022F上,成为模块B’1404。模块A与图14A中相比未变化。模块C的内容未变化,但其位移到0x00000230到0x0000060F。In addition, in the program shown in FIG. 14B, as a result of the correction of the program in FIG. 14A, the block B1402 is changed, which is located at 0x00000200 to 0x0000022F, and becomes the block B'1404. Module A is unchanged from that in Figure 14A. The content of module C is unchanged, but its bits are shifted from 0x00000230 to 0x0000060F.

假设本发明第五实施例中终端设备1的功能方框图的例子和存储器映象图的例子分别与图1和2所示的相同。It is assumed that an example of a functional block diagram and an example of a memory map diagram of the terminal device 1 in the fifth embodiment of the present invention are the same as those shown in FIGS. 1 and 2, respectively.

在假设图14A的程序存储在闪速ROM 13中的前提下,下面描述在终端设备1中将图14A中的程序更新为图114B的程序的方法。在此,参照图16所示的流程图描述当终端设备1收到图15所示的重写指令时的操作。On the premise that the program in FIG. 14A is stored in the flash ROM 13, a method for updating the program in FIG. 14A to the program in FIG. 114B in the terminal device 1 will be described below. Here, the operation when the terminal device 1 receives the rewriting instruction shown in FIG. 15 will be described with reference to the flowchart shown in FIG. 16 .

另外,当图15中的指令1501是RAM 14中的扩展指令时,指令1501后面的数据1502是扩展源的起始地址1503,扩展源的起始地址1503后面的数据是扩展源的终止地址1504,而扩展源的终止地址1504后面的数据是扩展目的地址1505。之后,控制CPU 12利用这些数据将闪速ROM 13的数据扩展到RAM 14中。In addition, when the instruction 1501 in Fig. 15 is an extension instruction in the RAM 14, the data 1502 behind the instruction 1501 is the start address 1503 of the extension source, and the data after the start address 1503 of the extension source is the end address 1504 of the extension source , and the data following the end address 1504 of the extension source is the extension destination address 1505 . Afterwards, the control CPU 12 expands the data of the flash ROM 13 into the RAM 14 using these data.

由此,可利用地址信息而不是实际数据进行扩展数据的指定。由此可以减少重写指令的数据量,缩短包括数据传输时间在内的程序更新操作时间。Thereby, extension data can be specified using address information instead of actual data. Thereby, the data amount of the rewrite command can be reduced, and the program update operation time including the data transfer time can be shortened.

写回ROM 13与本发明第二实施例中描述的操作相同,而重写与本发明第四实施例中描述的操作相同。Writing back the ROM 13 is the same as the operation described in the second embodiment of the present invention, and rewriting is the same as the operation described in the fourth embodiment of the present invention.

在步骤S161中,在通过外部连接接口11将图15所示的指令1501提供为闪速ROM 13中存储程序的重写指令时,控制CPU 12读取指令No.1。In step S161, when the instruction 1501 shown in FIG. 15 is supplied through the external connection interface 11 as a rewriting instruction of the program stored in the flash ROM 13, the control CPU 12 reads instruction No. 1.

接着,在步骤S162中,控制CPU 12检查读取指令是否是重写终止指令。当该指令不是重写终止指令时,控制CPU 12进入步骤S163的处理过程。Next, in step S162, the control CPU 12 checks whether the read command is a rewrite termination command. When the instruction is not a rewriting termination instruction, the control CPU 12 enters the process of step S163.

在步骤S163中,控制CPU 12检查读取指令是否是RAM 14中的扩展指令。由于该指令是RAM 14中的扩展指令,控制CPU 12进入步骤S166的处理过程。当读取指令不是RAM 14中的扩展指令时,控制CPU进入步骤S164的处理过程。In step S163, the control CPU 12 checks whether the read command is an extended command in the RAM 14. Because the instruction is an extended instruction in the RAM 14, the control CPU 12 enters the processing of step S166. When the read instruction is not an extended instruction in the RAM 14, the control CPU enters the processing of step S164.

图15中的指令No.1是RAM 14中的扩展指令。因此,在步骤S166中,控制CPU 12根据指令No.1的数据确定扩展源的起始地址是闪速ROM 13中的0x00000000,终止地址是0x000001FF,而扩展目的地址是RAM 14中的0x00110000。Instruction No.1 in FIG. 15 is an extended instruction in RAM 14. Therefore, in step S166, the control CPU 12 determines that the starting address of the extension source is 0x00000000 in the flash ROM 13 according to the data of the instruction No. 1, the end address is 0x000001FF, and the extension destination address is 0x00110000 in the RAM 14.

接着,在步骤S167中,控制CPU 12依照步骤S166中确定的地址将闪速ROM 13的数据扩展到RAM 14中。Next, in step S167, the control CPU 12 expands the data of the flash ROM 13 into the RAM 14 according to the address determined in step S166.

在图15举例示出的指令No.1的情况下,将闪速ROM 13中0x00000000到0x000001FF上的数据、即图14A中的模块A1401扩展到RAM 14的0x00110000到0x001101FF中。In the case of instruction No.1 shown as an example in FIG. 15, the data on 0x00000000 to 0x000001FF in the flash ROM 13, that is, the module A1401 in FIG.

接着,控制CPU 12进入步骤S161的处理过程。Next, the control CPU 12 proceeds to the processing of step S161.

图15中的指令No.2是RAM中进行扩展的指令,其与指令No.1相同。因此,控制CPU 12按照与指令No.1相同的处理过程将数据从闪速ROM 13扩展到RAM 14中。Command No. 2 in FIG. 15 is a command expanded in RAM, and is the same as command No. 1. Therefore, the control CPU 12 expands the data from the flash ROM 13 to the RAM 14 according to the same processing procedure as the instruction No.1.

通过这种方式,图14A中的模块C1403在RAM 14的0x00110230到0x0011060F上扩展。In this way, module C1403 in Figure 14A is extended at 0x00110230 to 0x0011060F of RAM 14.

然后,在图15中的指令No.3的情况下,控制CPU 12在步骤S161读取指令,然后经由步骤S162和S163的处理过程进入步骤S164的处理过程。Then, in the case of command No. 3 in FIG. 15, the control CPU 12 reads the command in step S161, and then proceeds to the process of step S164 via the processes of steps S162 and S163.

在步骤S164中,控制CPU 12检查读取指令是否是数据重写指令。当该读取指令是数据重写指令时,控制CPU 12进入步骤S170的处理过程。其间,当该读取指令不是数据重写指令时,控制CPU 12进入步骤S165的处理过程。In step S164, the control CPU 12 checks whether the read command is a data rewrite command. When the read instruction is a data rewrite instruction, the control CPU 12 enters the processing of step S170. Meanwhile, when the read command is not a data rewrite command, the control CPU 12 proceeds to the processing of step S165.

图15中的指令No.3是数据重写指令。因此,控制CPU 12进入步骤S170的处理过程。在步骤S170中,控制CPU 12根据图15中的重写指令No.3确定RAM 14中的地址0x00110200是重写起始地址,并且重写数据项的数目为0x30。Command No. 3 in FIG. 15 is a data rewrite command. Therefore, the control CPU 12 proceeds to the processing of step S170. In step S170, the control CPU 12 determines that the address 0x00110200 in the RAM 14 is the rewrite start address according to the rewrite instruction No. 3 in FIG. 15, and the number of rewrite data items is 0x30.

接着,在步骤S171中,控制CPU 12根据图15中No.3的重写数据指令改变地址0x00110200的内容。Next, in step S171, the control CPU 12 changes the content of the address 0x00110200 according to the rewriting data instruction of No. 3 in FIG. 15 .

然后,在步骤S172中,控制CPU 12将重写地址加1变为0x00110201。接着,在步骤S173中,控制CPU 12将重写数据项的数目减1变为0x2F。Then, in step S172, the control CPU 12 adds 1 to the rewrite address to become 0x00110201. Next, in step S173, the control CPU 12 decrements the number of rewrite data items by 1 to 0x2F.

在步骤S174中,控制CPU 12检查重写数据项的数目是否为0,而在该数目不是0时,其进入步骤S171的处理过程。In step S174, the controlling CPU 12 checks whether the number of rewritten data items is 0, and when the number is not 0, it proceeds to the processing of step S171.

然后,控制CPU 12重复上述步骤S171到S174的处理过程,直到重写数据项的数目变为0。当重写数据项的数目变为0时,控制CPU 12进入S161的处理过程。Then, the control CPU 12 repeats the above-described processing of steps S171 to S174 until the number of rewritten data items becomes zero. When the number of rewritten data items becomes 0, the control CPU 12 proceeds to the processing of S161.

假设指令No.3给出的与0x03相对应的后续数据是图14B中的模块B’1403,当步骤S174中将重写数据项的数目判定为0时,在RAM 14的0x00110200到0x0011022F上对模块B’1404进行扩展。Assuming that the follow-up data corresponding to 0x03 provided by instruction No. 3 is the module B'1403 in Fig. 14B, when the number of rewriting data items is determined to be 0 in step S174, on 0x00110200 to 0x0011022F of RAM 14 Module B'1404 is extended.

如上所述,在RAM 14中图19所示的程序由地址0x00110000开始扩展。As mentioned above, in RAM 14, the program shown in Figure 19 begins to expand by address 0x00110000.

要注意的是,因为模块B因更新变为模块B’,并且容量增大,因此模块C的位置向后移位了模块B和模块B’之间的容量差。换言之,模块C在RAM 14内扩展时发生了移位,以便让闪速ROM 13中存储的更新目标模块B和后面的模块C的位置之间的相对值增大。It should be noted that since module B becomes module B' due to the update, and the capacity increases, the position of module C is shifted backward by the capacity difference between module B and module B'. In other words, the module C is shifted when expanding in the RAM 14 so that the relative value between the positions of the update target module B and the following module C stored in the flash ROM 13 increases.

通过这种方式,即使在模块B由于更新和容量变大而变为模块B’时,也可以避免模块B’与模块C的重叠。In this way, even when module B becomes module B' due to renewal and capacity increase, overlapping of module B' and module C can be avoided.

此外,当有一重写部分的程序代码(包括直接数据)的数量(模块B)时,可以无需重写而移位一部分代码(模块C),进而可在无需重写部分(模块B’)的后续代码(模块C)的信息的情况下重写程序。因此,可以减少从终端设备1的外部传输的重写指令。换言之,可以利用较少数据量移位模块C。结果,可以缩短包括数据传输时间在内的程序的更新操作时间。In addition, when there is an amount of program code (including direct data) of the rewriting part (module B), a part of the code (module C) can be shifted without rewriting, and thus can be shifted without rewriting the part (module B') Rewrite the program with the information of the subsequent code (module C). Therefore, rewriting instructions transmitted from the outside of the terminal device 1 can be reduced. In other words, the module C can be shifted with a smaller amount of data. As a result, the update operation time of the program including the data transfer time can be shortened.

接着,在图15的指令No.4的情况下,控制CPU 12在步骤S161中读取了指令之后,通过步骤S162、S163和S164进入步骤S165的处理过程。Next, in the case of command No. 4 in FIG. 15, after the control CPU 12 has read the command in step S161, it proceeds to the processing of step S165 through steps S162, S163 and S164.

在步骤S165中,控制CPU 12判断读取指令是否是ROM中进行写回的指令,并且当读取指令是ROM中的写回指令时,其进入步骤S168的处理过程。In step S165, the control CPU 12 judges whether the read command is a write-back command in the ROM, and when the read command is a write-back command in the ROM, it enters the process of step S168.

当该读取指令不是ROM写回指令时,控制CPU 12进入步骤S161的处理过程。When the read instruction is not a ROM write-back instruction, the control CPU 12 enters the processing of step S161.

图15中的指令No.4是ROM写回指令。因此,控制CPU 12进入步骤S168的处理过程。Command No. 4 in FIG. 15 is a ROM write-back command. Therefore, the control CPU 12 proceeds to the processing of step S168.

在步骤S168中,在图15举例示出的指令No.4的情况下,控制CPU 12根据读取的ROM写回指令,确定RAM 14中存储的新控制软件地址0x00110000到0x0O11FFFF,以及闪速ROM 13的写回区块,即0x00000000到0x0000FFFF。In step S168, in the case of instruction No.4 shown in Figure 15, the control CPU 12 determines the new control software address 0x00110000 to 0x0011FFFF stored in the RAM 14 according to the read ROM write-back instruction, and the flash ROM 13 write-back blocks, namely 0x00000000 to 0x0000FFFF.

接着,在步骤S169中,控制CPU 12删掉步骤S168中确定的闪速ROM 13的区块0x00000000到0x0000FFFF。然后,控制CPU12将RAM 14内存储在0x00110000到0x0011FFFF中的新控制软件记录到闪速ROM 13的已删除区块中。Next, in step S169, the control CPU 12 deletes the blocks 0x00000000 to 0x0000FFFF of the flash ROM 13 determined in step S168. Then, the control CPU 12 records the new control software stored in the RAM 14 at 0x00110000 to 0x0011FFFF in the deleted block of the flash ROM 13.

控制CPU 12进入步骤S161的处理过程。Control CPU 12 enters the processing procedure of step S161.

然后,控制CPU 12顺序地重复前述处理过程,直到在步骤S162中将步骤S161中读取的指令判定为重写终止指令。Then, the control CPU 12 sequentially repeats the aforementioned processing until the command read in step S161 is judged as a rewriting termination command in step S162.

如上所述,根据第五实施例,在无需下载图14所示的整个校正程序的情况下,可更新终端中闪速ROM 13内存储的控制软件。结果,由于重写指令的减少实现了软件更新时间的缩短。As described above, according to the fifth embodiment, the control software stored in the flash ROM 13 in the terminal can be updated without downloading the entire correction program shown in FIG. 14 . As a result, shortening of software update time is realized due to reduction of rewriting instructions.

另外,依照第五实施例,当模块B的容量因更新而增大时,可在RAM 14进行扩展的过程中移位模块C,以增大闪速ROM 13中存储的更新目标的模块B与后面的模块C的位置之间的相对值。由此,可以减少从设备外部传送的重写指令。结果,就可以缩短包括数据传输时间在内的重写更新操作时间。In addition, according to the fifth embodiment, when the capacity of the module B is increased due to updating, the module C can be shifted during the expansion of the RAM 14 to increase the module B and the update target stored in the flash ROM 13. The relative value between the position of the following module C. Thus, it is possible to reduce rewrite instructions transmitted from outside the device. As a result, the rewrite update operation time including the data transfer time can be shortened.

另外,虽然第五实施例描述了程序由三个模块组成的情况,但模块数目和模块容量并不限于上面所述的模块数目和容量。In addition, although the fifth embodiment describes the case where the program is composed of three modules, the number of modules and the module capacity are not limited to those described above.

此外,虽然图15中的“RAM扩展”由闪速ROM 13中作为扩展源的起始地址1503和终止地址1504、RAM中作为扩展目的的起始地址1505组合而成,但如图17所示,通过将扩展源的起始地址1703和后面的扩展数据项数目1704、以及RAM中作为扩展目的的起始地址1705组合起来,也能获得相同效果。In addition, although the "RAM extension" in FIG. 15 is composed of the start address 1503 and the end address 1504 in the flash ROM 13 as the extension source, and the start address 1505 in the RAM as the extension destination, as shown in FIG. 17 , the same effect can also be obtained by combining the start address 1703 of the extension source, the number of subsequent extension data items 1704, and the start address 1705 in the RAM as the extension destination.

另外,在图15中,利用绝对地址指定RAM 14中对闪速ROM 13内的程序进行扩展的区域。但是,由于RAM 14中的区域仅用作操作区域,因此终端设备1中的控制CPU 13可设定RAM 14内的任选区域。In addition, in FIG. 15, the area in which the program in the flash ROM 13 is expanded in the RAM 14 is designated by an absolute address. However, since the area in the RAM 14 is used only as an operation area, the control CPU 13 in the terminal device 1 can set an optional area in the RAM 14.

该情况下,在RAM 14中,可利用与任选区域起始地址的移位值进行扩展时的地址指定或指定过程中RAM 14的重写。换言之,在图18所示的重写指令中,“RAM 14的扩展”由闪速ROM 13中作为扩展源的起始地址1803、扩展数据项的数目1804和与任选区域的起始地址的移位值1805组合而成。In this case, in the RAM 14, it is possible to use the shift value from the start address of the optional area to specify the address when expanding or to rewrite the RAM 14 during the specified process. In other words, in the rewrite instruction shown in FIG. 18, "extension of the RAM 14" consists of the start address 1803 in the flash ROM 13 as the extension source, the number of expansion data items 1804, and the relationship with the start address of the optional area. The shift value 1805 is combined.

例如,指令No.2表示在任选区域的起始地址加0x00000230中,扩展以闪速ROM 13中的地址0x00000220开始的、与0x3E0相对应的后续数据。For example, instruction No. 2 indicates that in the start address of the optional area plus 0x00000230, the subsequent data corresponding to 0x3E0 starting from address 0x00000220 in the flash ROM 13 is expanded.

另外,“重写”由相对任选区域中起始地址的移位值1806、重写数据项的数目1807和与该数据项数目相对应的实际重写数据1808组合而成。例如,在指令No.3中,与0x30相对应的数据从任选区域的起始地址加上0x0000200的地址开始重写。In addition, "rewrite" is composed of a shift value 1806 relative to the start address in the optional area, the number of rewrite data items 1807, and actual rewrite data 1808 corresponding to the number of data items. For example, in instruction No.3, the data corresponding to 0x30 is rewritten from the start address of the optional area plus the address of 0x0000200.

写回ROM 13的指令指示基于闪速ROM 13的已删区块进行写回。因此,该指令仅指示写回区块的头部。例如,在指令No.4中,将0x00000000指示为写回区块的头部,在删掉了图2所示存储器映象图的区块0x00000000到0x0000FFFF后,将从RAM任选区域中的头部到该任选区域的头部加0x0000FFFF的区域写回闪速ROM 13。The command to write back the ROM 13 instructs to write back based on the deleted block of the flash ROM 13. Therefore, this instruction only instructs to write back the header of the block. For example, in instruction No.4, 0x00000000 is indicated as the header of the write-back block, after deleting the block 0x00000000 to 0x0000FFFF of the memory map shown in Figure 2, the header in the RAM optional area The area to which the head of the optional area is added with 0x0000FFFF is written back to the flash ROM 13.

另外,第五实施例描述了按照步骤S162、S163、S164和S165的顺序对步骤S161中读取的指令内容进行确定处理的情况,但也可以以可选方式改变确定顺序。In addition, the fifth embodiment described the case where determination processing is performed on the instruction content read in step S161 in the order of steps S162, S163, S164, and S165, but the determination order may also be changed in an optional manner.

另外,在第五实施例中,在步骤S172中将重写地址加1,然后在步骤S173中将重写数据项的数目减1。但是,先将重写数据项的数目减1,然后再将重写地址加1,也能获得相同效果。In addition, in the fifth embodiment, the rewrite address is incremented by 1 in step S172, and then the number of rewrite data items is decremented by 1 in step S173. However, the same effect can also be obtained by first reducing the number of rewriting data items by 1, and then adding 1 to the rewriting address.

(第六实施例)(sixth embodiment)

图20A和20B表示本发明第六实施例中的程序的模块结构,图20A表示校正程序错误之前的结构,而图20B校正了程序错误之后的结构。20A and 20B show the block structure of the program in the sixth embodiment of the present invention, FIG. 20A shows the structure before the program error is corrected, and FIG. 20B shows the structure after the program error is corrected.

换言之,图20A所示的程序由三个模块组成,即模块A2001、模块B2002和模块C2003。模块A位于0x00000000到0x000001FF上,模块B位于0x00000200到0x0000021F上,模块C位于0x00000220到0x000005FF上。In other words, the program shown in FIG. 20A is composed of three modules, namely module A2001, module B2002 and module C2003. Module A is located at 0x00000000 to 0x000001FF, module B is located at 0x00000200 to 0x0000021F, and module C is located at 0x00000220 to 0x000005FF.

在图20B所示的程序中,作为图20A所示程序的校正结果,模决A2001发生了变化。In the program shown in FIG. 20B, module A2001 is changed as a result of correction of the program shown in FIG. 20A.

具体而言,模块A2001变为模块A’2004位于0x000001FF上。模块B2002变为模块B’2005位于0x00000200到0x0000022F上。模块C内容未变化,但其位置移到0x00000230到0x0000060F。Specifically, module A2001 becomes module A'2004 at 0x000001FF. Module B2002 becomes module B'2005 at 0x00000200 to 0x0000022F. The content of module C is unchanged, but its location is moved from 0x00000230 to 0x0000060F.

图21A表示未校正程序错误的模块A2001的部分内容,图21B表示校正了程序错误的部分模块A’2001。Fig. 21A shows a part of module A2001 whose program error has not been corrected, and Fig. 21B shows a part of module A'2001 whose program error has been corrected.

图22表示第六实施例中终端设备1的控制CPU 12的转移(branch)命令的例子。FIG. 22 shows an example of a branch command of the control CPU 12 of the terminal device 1 in the sixth embodiment.

作码2201准备将在操作码2201后的操作数2202转移(branch)作为地址。The operation code 2201 prepares to branch the operand 2202 following the operation code 2201 as an address.

具体而言,操作码0xEA准备将在该操作码后面的操作数32位转移(branch)作为绝对地址。另外,操作码0xE9在该操作码后面设定出8位作为相对值,并转移到用该操作码中存储的地址和该相对值的总和表示的地址。Specifically, opcode 0xEA prepares to branch the operand 32 bits following this opcode as an absolute address. In addition, the operation code 0xE9 sets 8 bits after the operation code as a relative value, and transfers to the address indicated by the sum of the address stored in the operation code and the relative value.

换言之,如图21A所示,当地址(2101)0x00000010(2103的数据(2102))是0xEA(2104)时,这部分是将地址0x00000011到0x00000014(2105)存储的数据(2106)译为可转移00000318的32位地址的命令。In other words, as shown in Figure 21A, when the address (2101) 0x00000010 (data (2102) of 2103) is 0xEA (2104), this part is to translate the data (2106) stored in the address 0x00000011 to 0x00000014 (2105) into transferable 00000318 for the 32-bit address command.

此外,如图21A所示,当地址0x000001F8(2107)的内容是0xE9(2108)时,其是将地址0x000001F9(2109)上的数据0x38设定为相对值、然后转移作为0x000001F8与该相对值的总和的0x00000230的命令。In addition, as shown in FIG. 21A, when the content of the address 0x000001F8 (2107) is 0xE9 (2108), it is to set the data 0x38 on the address 0x000001F9 (2109) as a relative value, and then transfer as 0x000001F8 and the relative value Sum of 0x00000230 commands.

图21B表示图20A所示控制程序的程序错误经过校正的图20B所示的控制程序。Fig. 21B shows the control program shown in Fig. 20B in which the program error of the control program shown in Fig. 20A has been corrected.

具体而言,如图20B所示,模块B’2005的容量比模块B2002的容量大0x10位。结果,模块B2002后面的模块C2003的位置移位了0x10位。因此,0x00000010(2103)内存储的绝对地址转移命令的转移目的变为0x00000328。另外,0x000001F8(2109)中存储的相对地址转移命令的转移目的变为0x00000240。Specifically, as shown in Fig. 20B, the capacity of the module B'2005 is 0x10 bits larger than that of the module B2002. As a result, the position of module C2003 following module B2002 is shifted by 0x10 bits. Therefore, the transfer destination of the absolute address transfer command stored in 0x00000010 (2103) becomes 0x00000328. In addition, the transfer destination of the relative address transfer command stored in 0x000001F8 (2109) becomes 0x00000240.

下面描述第六实施例中的终端设备。本发明第六实施例的终端设备1的功能性方框图的例子和存储器映象图的例子分别与第一实施例并分别按照图1和2所示相同。此外,假设0x00110000到0x0011FFFF用作控制CPU 12校正控制程序的操作区域。The terminal device in the sixth embodiment is described below. An example of a functional block diagram and an example of a memory map of the terminal device 1 of the sixth embodiment of the present invention are the same as those of the first embodiment and shown in FIGS. 1 and 2, respectively. Furthermore, it is assumed that 0x00110000 to 0x0011FFFF are used as an operation area where the control CPU 12 corrects the control program.

下面描述在闪速ROM 13中记录了图20A程序的情况下,终端设备1将图20A所示的程序更新为图20B所示的程序的方法。在此,将参照图24所示的流程图描述为终端设备1提供图23所示的重写指令时的操作。In the case where the program of FIG. 20A is recorded in the flash ROM 13, the method for updating the program shown in FIG. 20A by the terminal device 1 to the program shown in FIG. 20B will be described below. Here, the operation when the rewriting instruction shown in FIG. 23 is given to the terminal device 1 will be described with reference to the flowchart shown in FIG. 24 .

另外,在对图23的每个指令进行操作的过程中,重写与第五实施例的相同。In addition, in the process of operating each instruction of FIG. 23, rewriting is the same as that of the fifth embodiment.

此外,在RAM 14中进行扩展的情况下,数据2302位于指令2301 No.1的后面部分内。数据2302中布置了扩展源的起始地址2303,在扩展源中的起始地址2303后面进行扩展的数据项数目2304,以及在扩展的数据项数目2304后面扩展目的的地址2305。Also, in the case of expansion in the RAM 14, the data 2302 is located in the rear part of the instruction 2301 No. 1. In the data 2302 are arranged the start address 2303 of the extension source, the number of data items 2304 to be extended after the start address 2303 in the extension source, and the address 2305 of the extension destination after the number of data items 2304 to be extended.

控制CPU 12利用这些信息将数据从闪速ROM 13扩展到RAM 14中。The control CPU 12 expands data from the flash ROM 13 into the RAM 14 using these information.

在写回ROM 13的情况下,指令2301 No.6后面的数据2302的头部表示要记录到闪速ROM 13中目标区块的起始地址2306。在删除了以头部地址2306起始的区块后,将已被以可选方式确定为RAM 14操作区的区域内的数据记录在闪速ROM 13内以头部地址2306起始的已删区块中。Under the situation of writing back ROM 13, the header of the data 2302 behind instruction 2301 No. 6 represents to be recorded into the starting address 2306 of the target block in the flash ROM 13. After deleting the block starting with the head address 2306, the data in the area of the RAM 14 operation area will be determined in an optional manner to be recorded in the deleted block starting with the head address 2306 in the flash ROM 13. in the block.

相对地址中的变化,指令No.4后面的数据2302的起始部分是其与RAM 14中扩展程序用的任选区域内的头部的移位值2307。其指示对在用该起始地址和移位值2307的总和指示的地址中存储的操作码进行解释,并更新与该解释操作码相对应的操作数。Relative to the change in the address, the initial part of the data 2302 behind the instruction No. 4 is its shift value 2307 with the head in the optional area for the expansion program in the RAM 14. It instructs to interpret the opcode stored in the address indicated by the sum of the start address and the shift value 2307, and to update the operand corresponding to the interpreted opcode.

首先,在步骤S181中,当通过外部连接接口11将图23所示的指令提供为闪速ROM 13中存储程序的重写指令时,控制CPU 12读取指令No.1。First, in step S181, when the command shown in FIG. 23 is supplied as a rewriting command of the program stored in the flash ROM 13 through the external connection interface 11, the control CPU 12 reads command No. 1.

接着,在步骤S182中,控制CPU 12检查读取指令是否是重写终止指令。当该指令不是重写终止指令时,控制CPU 12进入步骤S183的处理过程。Next, in step S182, the control CPU 12 checks whether the read command is a rewrite termination command. When the instruction is not a rewriting termination instruction, the control CPU 12 proceeds to the processing of step S183.

在步骤S183中,控制CPU 12检查读取指令是否是RAM 14中的扩展指令。如果该指令是在RAM 14中进行扩展的指令,控制CPU 12进入步骤S186的处理过程,而如果该读取指令不是RAM 14中的扩展指令时,其进入步骤S184的处理过程。In step S183, the control CPU 12 checks whether the read command is an extended command in the RAM 14. If this instruction is the instruction that carries out expansion in RAM 14, control CPU 12 enters the processing procedure of step S186, and if when this read instruction is not the expansion instruction in RAM 14, it enters the processing procedure of step S184.

图23中的指令No.1是RAM 14中的扩展指令。因此,在步骤S186中,控制CPU 12基于指令No.1的数据,确定扩展源的地址是闪速ROM 13中的0x00000000,要扩展的数据项数目是0x200字节,扩展目的地址是0x00110000,作为RAM 14中前一操作区域的起始地址0x00110000加移位0x00000000的总和。Instruction No.1 in FIG. 23 is an extended instruction in RAM 14. Therefore, in step S186, the control CPU 12 determines that the address of the extension source is 0x00000000 in the flash ROM 13 based on the data of the instruction No.1, the number of data items to be extended is 0x200 bytes, and the extension destination address is 0x00110000, as The starting address 0x00110000 of the previous operation area in RAM 14 plus the sum of shifting 0x00000000.

接着,在步骤S187中,控制CPU 12根据步骤S186中确定的地址和数据项数目将数据从ROM 13扩展到RAM 14中。Next, in step S187, the control CPU 12 expands the data from the ROM 13 into the RAM 14 according to the address and the number of data items determined in step S186.

在指令No.1是图23中所示指令的情况下,在RAM 14的0x00110000到0x00110FF上扩展0x00000000到0x000001FF(即图20A中的模块A2001)中的数据。In the case that instruction No. 1 is the instruction shown in FIG. 23 , the data in 0x00000000 to 0x000001FF (that is, module A2001 in FIG. 20A ) is expanded on 0x00110000 to 0x00110FF of RAM 14.

然后,在步骤S195中,控制CPU 12在RAM 14的除操作区域0x00110000到0x0011FFFF以外的任选区域中记下闪速ROM 13中区域0x00000000到0x000001FF的移位量是0x00000000,然后进入步骤S181的处理过程。Then, in step S195, the control CPU 12 writes down the displacement amount of the area 0x00000000 to 0x000001FF in the flash ROM 13 in the optional area except the operation area 0x00110000 to 0x0011FFFF of the RAM 14 is 0x00000000, then enters the processing of step S181 process.

之后,由于图23中的指令No.2与指令NO.1一样,是在RAM中进行扩展的指令,于是控制CPU 12按照与前述过程相同的方式执行数据从闪速ROM 13到RAM 14的扩展过程。Afterwards, because instruction No.2 among Fig. 23 is the same as instruction No.1, is the instruction that expands in RAM, so controls CPU 12 to carry out the expansion of data from flash ROM 13 to RAM 14 according to the mode same as aforementioned process process.

通过这种方式,图20A中的模块C2003在RAM 14的0x00110230到0x0011060F上扩展。In this way, module C2003 in Figure 20A is extended at 0x00110230 to 0x0011060F of RAM 14.

此外,象上面描述的过程一样,在步骤S195中,控制CPU 12记录闪速ROM13中区域0x00000220到0x000005FF的移位量是0x00000010。Further, like the procedure described above, in step S195, the control CPU 12 records that the shift amount of the area 0x00000220 to 0x000005FF in the flash ROM 13 is 0x00000010.

通过前述过程,获得了图25中所示的移位区域起始地址2501和终止地址2502以及该区域的移位量2503的记录。Through the aforementioned process, records of the shift area start address 2501 and end address 2502 and the shift amount 2503 of the area shown in FIG. 25 are obtained.

移位区域的起始地址2501和终止地址2502实际上是该移位区域的起始地址和终止地址。由此就消除了利用实际数据描述移位区域的要求,于是减少了数据量。The start address 2501 and end address 2502 of the shift area are actually the start address and end address of the shift area. This eliminates the need to describe the shifted area with actual data, thus reducing the amount of data.

然后,在指令是图23中的指令No.3的情况下,控制CPU 12在步骤S181中读到该指令,然后通过步骤S182和S183的处理过程进入步骤S184的处理过程。Then, in the case that the command is command No. 3 in FIG. 23, the control CPU 12 reads the command in step S181, and then proceeds to the process of step S184 through the processes of steps S182 and S183.

在步骤S184中,控制CPU 12检查读取指令是否是数据重写指令。当该读取指令是数据重写指令时,控制CPU 12进入步骤S190的处理过程,而当该读取指令不是数据重写指令时,其进入步骤S196的处理过程。In step S184, the control CPU 12 checks whether the read command is a data rewrite command. When the read command is a data rewrite command, the control CPU 12 proceeds to the processing of step S190, and when the read command is not a data rewrite command, it proceeds to the process of step S196.

图23中的指令No.3是数据重写指令。因此,控制CPU 12进入步骤S190的处理。Command No. 3 in FIG. 23 is a data rewrite command. Therefore, the control CPU 12 proceeds to the processing of step S190.

在步骤S190中,控制CPU 12利用图23中的重写指令No.3确定通过将RAM 14中操作区域的起始地址0x00110000加上移位0x00000200获得的地址0x00110200是重写起始地址,并且重写数据项的数目是0x30。In step S190, the control CPU 12 determines that the address 0x00110200 obtained by adding the shift 0x00000200 to the start address 0x00110000 of the operating area in the RAM 14 is the rewrite start address by using the rewrite instruction No. 3 in FIG. The number of write data items is 0x30.

之后,在步骤S191中,控制CPU 12根据图23中的指令No.3的重写数据改变地址0x002202000的内容。After that, in step S191, the control CPU 12 changes the content of address 0x002202000 according to the rewrite data of command No. 3 in FIG. 23 .

然后,在步骤S192中,控制CPU 12将该重写地址加上1成为0x00110201。Then, in step S192, the control CPU 12 adds 1 to the rewrite address to become 0x00110201.

在步骤193中,控制CPU 12将该重写数据项的数目减掉1,变为0x2F。In step 193, the control CPU 12 subtracts 1 from the number of the rewritten data items to become 0x2F.

在步骤S194中,控制CPU 12检查重写数据项的数目是否为0,当该数目不是0时,其进入步骤S191的处理过程。In step S194, the controlling CPU 12 checks whether the number of rewritten data items is 0, and when the number is not 0, it proceeds to the processing of step S191.

然后,控制CPU 12重复上述步骤S191到S194的处理过程,直到重写数据项的数目变为0。Then, the control CPU 12 repeats the above-described processing of steps S191 to S194 until the number of rewritten data items becomes zero.

当重写数据项的数目变为0时,控制CPU 12进入步骤S181的处理过程。When the number of rewritten data items becomes 0, the control CPU 12 proceeds to the processing of step S181.

在此,假设与指令No.3给出的0x30相对应的后续数据是图20B中的模块B’2005,当在步骤S194中判定重写数据项的数目变为0时,在RAM 14的0x00110200到0x0011022F上扩展模块B’2005。Here, assuming that the subsequent data corresponding to 0x30 given by instruction No. 3 is module B'2005 in FIG. to 0x0011022F on extension module B'2005.

通过前述处理过程,图19所示的程序从RAM 14中的地址0x00110000开始扩展。Through the aforementioned process, the program shown in Figure 19 starts to expand from the address 0x00110000 in the RAM 14.

图26表示处于该点的RAM 14的状态。地址(2601)0x00110010(2603)和0x001101F8(2605)分别具有外围数据(2602)、0xEA(2604)和0xE9(2606)。Figure 26 shows the state of the RAM 14 at this point. Addresses (2601) 0x00110010 (2603) and 0x001101F8 (2605) have peripheral data (2602), 0xEA (2604) and 0xE9 (2606), respectively.

然后,在指令是图23中的指令No.4的情况下,控制CPU 12在步骤S181中读取指令,然后通过步骤S182、S183和S184的处理过程进入S196的处理过程。Then, in the case that the command is command No. 4 in FIG. 23, the control CPU 12 reads the command in step S181, and then proceeds to the process of S196 through the processes of steps S182, S183, and S184.

在步骤S196中,控制CPU 12检查读取指令是否是地址改变指令。当该读取指令是地址改变指令时,控制CPU 12进入S197的处理。当该读取指令不是地址改变指令时,控制CPU 12进入S185的处理。In step S196, the control CPU 12 checks whether the read command is an address change command. When the read command is an address change command, the control CPU 12 proceeds to the processing of S197. When the read instruction is not an address change instruction, the control CPU 12 proceeds to the processing of S185.

图23中的指令No.4是地址改变指令。因此,控制CPU 12进入S197的处理过程。Command No. 4 in Fig. 23 is an address change command. Therefore, the control CPU 12 proceeds to the processing of S197.

在步骤S197中,控制CPU 12判定由该读取地址改变指令表示的移位值0x00000010(2307)是地址0x00110010(其要加到RAM 14中操作区域的起始地址0x00110000上)的地址改变指令。In step S197, the control CPU 12 determines that the shift value 0x00000010 (2307) represented by the read address change command is an address change command of address 0x00110010 (which is to be added to the start address 0x00110000 of the operating area in the RAM 14).

此外,控制CPU 12利用图22所示的操作码和0x00110010后面的4位操作数,将图26中所示的在地址0x00110010(2603)内存储的操作码0xEA(2604)解释为到地址0x00000318的转移命令。Further, the control CPU 12 interprets the opcode 0xEA (2604) stored in the address 0x00110010 (2603) shown in FIG. 26 as an address to address 0x00000318 using the opcode shown in FIG. Transfer order.

此外,控制CPU 12利用图25所示的模块移位信息记录,确认包括0x00000318在内的区块0x00000220到0x000005FFF具有移位量0x00000010。因此,控制CPU 12算出校正程序中的转移目的地址是通过将未校正的转移目的地址0x00000318加上移位量0x00000010获得的0x00000328。Further, the control CPU 12 confirms that blocks 0x00000220 to 0x000005FFF including 0x00000318 have a shift amount of 0x00000010 using the module shift information record shown in FIG. 25 . Therefore, the control CPU 12 calculates that the branch destination address in the correction program is 0x00000328 obtained by adding the shift amount 0x00000010 to the uncorrected branch destination address 0x00000318.

然后,在步骤S198中,控制CPU 12更新地址(2701)0x00110010(2703)到0x00000328的操作码(数据)(2702)0xEA(2704)后面的字节操作数。Then, in step S198, the control CPU 12 updates the byte operands behind the opcode (data) (2702) 0xEA (2704) of addresses (2701) 0x00110010 (2703) to 0x00000328.

控制CPU 12进入S181的处理过程。Control CPU 12 to enter the processing procedure of S181.

此外在图23的指令No.5中,控制CPU 12在步骤S181中读取指令,然后通过步骤S182、S183、S184和S196的处理过程进入S197的处理过程。Furthermore, in command No. 5 of FIG. 23, the control CPU 12 reads the command in step S181, and then proceeds to the process of S197 through the processes of steps S182, S183, S184, and S196.

在步骤S197中,控制CPU 12判断用读取地址改变指令表示的移位值0x000001F8是否是要被加到RAM 14的操作区域的起始地址0x00110000上的地址0x001101F8的地址改变指令。In step S197, the control CPU 12 judges whether the shift value 0x000001F8 indicated by the read address change command is an address change command to be added to the address 0x001101F8 on the start address 0x00110000 of the operation area of the RAM 14.

例如,控制CPU 12利用图22所示的操作码和0x001101F8后面的1位操作数,将存在图27的地址(2701)0x001101F8(2705)中的操作码(2702)0xE9(2706)解释为对于地址0x00000230的转移命令,所述地址0x00000230是通过将0x38加到0x000001F8上获得的。此外,控制CPU 12利用图25所示的移位记录识别出包括0x00000230的区块0x00000220到0x000005FF具有移位量0x00000010。For example, the control CPU 12 interprets the opcode (2702) 0xE9 (2706) stored in the address (2701) 0x001101F8 (2705) of FIG. 27 as the address The transfer command of 0x00000230, the address 0x00000230 is obtained by adding 0x38 to 0x000001F8. Further, the control CPU 12 recognizes that blocks 0x00000220 to 0x000005FF including 0x00000230 have a shift amount of 0x00000010 using the shift record shown in FIG. 25 .

因此,控制CPU 12能够判定校正程序中的转移目的地址是通过将移位量0x0000010加到未校正的转移地址0x00000230上获得的0x00000240,并算出有着操作码的0x00001F8的相对地址是0x48。Therefore, the control CPU 12 can determine that the branch destination address in the correction program is 0x00000240 obtained by adding the shift amount 0x0000010 to the uncorrected branch address 0x00000230, and calculates that the relative address of 0x00001F8 with the opcode is 0x48.

然后,在步骤S198中,控制CPU 12根据步骤S197中确定的转移目的地址,将图28所示地址(2801)0x001101F8(2805)的操作码(数据)(2802)0xE9(2806)后面的1字节操作数更新为0x48。Then, in step S198, the control CPU 12 transfers 1 word after the operation code (data) (2802) 0xE9 (2806) of address (2801) 0x001101F8 (2805) shown in Figure 28 according to the transfer destination address determined in step S197 The section operand is updated to 0x48.

因此,当操作码所用的操作数因模块B的容量变化而移位时,控制CPU 12能够根据图25所示的模块移位信息记录自动校正操作数。因此,就不必指示从外部获取操作数的校正内容,从而减少了指令的数据量。Therefore, when the operand used for the operation code is shifted due to the capacity change of the module B, the control CPU 12 can automatically correct the operand based on the module shift information record shown in FIG. 25 . Therefore, it is not necessary to instruct the corrected content of the operand fetched from the outside, thereby reducing the data amount of the instruction.

接着,控制CPU 12进入过程S181。Next, the control CPU 12 proceeds to process S181.

之后,在指令是图23中的指令No.6的情况下,控制CPU 12在步骤S181中读取指令,然后经由步骤S182、S183、S184和S196进入步骤S185的处理过程。Afterwards, in the case that the command is command No. 6 in FIG. 23, the control CPU 12 reads the command in step S181, and then proceeds to the processing of step S185 via steps S182, S183, S184, and S196.

在步骤S185中,控制CPU 12检查读取指令是否是写回ROM的指令,当该读取指令是写回ROM 13的指令时,其进入步骤S188的处理过程,而当该读取指令不是写回ROM 13的指令时,其进入步骤S181的处理过程。In step S185, the control CPU 12 checks whether the read instruction is an instruction to write back to the ROM, and when the read instruction is an instruction to write back to the ROM 13, it enters the processing of step S188, and when the read instruction is not to write When returning the instruction of ROM 13, it enters the processing procedure of step S181.

图23中的指令No.6是写回ROM 13的指令。因此,控制CPU 12进入步骤S188的处理过程。Instruction No.6 among Fig. 23 is the instruction of writing back ROM 13. Therefore, the control CPU 12 proceeds to the processing of step S188.

在步骤S188中,控制CPU 12确定闪速ROM 13中用写回ROM 13的读取指令指示的区块。例如,在指令是图23举例示出的指令No.6的情况下,控制CPU 12将地址0x00000000到0x0000FFFF确定为这个区块。In step S188, the control CPU 12 determines the block in the flash ROM 13 indicated by the read command to write back to the ROM 13. For example, in the case where the command is command No. 6 exemplarily shown in FIG. 23, the control CPU 12 determines addresses 0x00000000 to 0x0000FFFF as this block.

接着,在步骤S189中,控制CPU 12删掉步骤S188中确定的闪速ROM 13的0x00000000到0x0000FFFF上的区块。然后,控制CPU 12将存在RAM 14的操作区域0x00110000到0x0011FFFF中的新控制软件记录到闪速ROM 13的已删区块上。Next, in step S189, the control CPU 12 deletes the blocks at 0x00000000 to 0x0000FFFF of the flash ROM 13 determined in step S188. Then, the control CPU 12 records the new control software stored in the operation area 0x00110000 to 0x0011FFFF of the RAM 14 onto the deleted block of the flash ROM 13.

控制CPU 12进入步骤S181的处理过程。Control CPU 12 enters the processing procedure of step S181.

然后,控制CPU 13重复前述处理过程,直到在步骤S182中将步骤S181中读取的指令判定为重写终止指令。Then, the control CPU 13 repeats the foregoing processing until the command read in step S181 is judged as a rewriting termination command in step S182.

如上所述,依照第六实施例,可在无需下载如图20B所示的整个校正程序的情况下,更新终端的闪速ROM 13内存储的控制软件。As described above, according to the sixth embodiment, the control software stored in the flash ROM 13 of the terminal can be updated without downloading the entire correction program as shown in FIG. 20B.

另外,虽然第六实施例描述了程序由三个模块组成的情况,但模块数量和模块容量并不限于上面描述的模块数量和容量。In addition, although the sixth embodiment describes the case where the program is composed of three modules, the number of modules and the module capacity are not limited to those described above.

虽然第六实施例中将示出的图22作为转移命令的操作码的例子,但根据终端设备1所用的控制CPU 12的类型,利用不同于图22所示的操作码也能获得相同效果。Although FIG. 22 will be shown in the sixth embodiment as an example of the operation code of the transfer command, depending on the type of control CPU 12 used in the terminal device 1, the same effect can be obtained by using an operation code other than that shown in FIG. 22.

另外,第六实施例描述了利用图25所示的模块移位信息记录来校正绝对值转移和相对值转移操作数的情况。但是,还可适用函数调用命令以及转移命令。In addition, the sixth embodiment describes the case where the absolute value transfer and relative value transfer operands are corrected using the block shift information record shown in FIG. 25 . However, function call commands and transfer commands are also applicable.

此外,依照第六实施例,当采用了转移命令和函数调用命令(每个都具有相对指定地址)、且它们都超过相对地址指定转移命令中可用的地址范围时,取消了对通过外部接口下载用于指示从相对地址指定转移命令或相对地址指定函数调用命令相对转化成绝对地址指定转移命令或绝对地址指定函数调用命令的数据、以变为更新程序的要求。于是减少了通过外部接口指示的数据量。结果,可以缩短包括数据传输时间在内的程序更新操作时间。Furthermore, according to the sixth embodiment, when a branch command and a function call command (each having a relative specified address) are used and they both exceed the address range available in the relative address specified branch command, support for downloading through the external interface is canceled. Data for indicating a relative conversion from a relative address-specified branch command or a relative address-specified function call command to an absolute address-specified branch command or an absolute address-specified function call command to become a request for updating a program. Thus, the amount of data indicated through the external interface is reduced. As a result, the program update operation time including the data transfer time can be shortened.

此外,在设有由事件如警报、键压力和本发明的处理模块存在地址组成的查询表配置的情况下,可利用图25所示的模块移位信息记录,在查询表上校正处理模块的存在地址。In addition, in the case where there is a look-up table configuration consisting of events such as alarms, key presses, and address of the presence of processing modules of the present invention, the module shift information record shown in FIG. 25 can be used to correct the location of the processing modules on the look-up table. Address exists.

在校正查询表的情况下,可由外部或利用终端设备1中预先装入的地址指示查询表位置。在装入查询表地址时,可在无需外部指令的情况下自动校正查询表。In the case of calibrating the look-up table, the look-up table position can be indicated externally or by using an address preloaded in the terminal device 1 . When loading the look-up table address, the look-up table can be corrected automatically without external instructions.

另外,在第六实施例中,可利用如绝对值转移和相对值转移之类的地址(操作数)进行用于改变其中存储着命令的地址的指令。但是,控制CPU 12在接收仅仅表示地址的指令的过程中,可自动判断绝对值转移或相对值转移之类的命令是否存在于该地址中,并且在存在该命令时,利用图25所示的模块移位信息记录校正操作数。In addition, in the sixth embodiment, an instruction for changing an address in which a command is stored can be performed using an address (operand) such as an absolute value branch and a relative value branch. However, the control CPU 12 can automatically judge whether an command such as an absolute value transfer or a relative value transfer exists in the address in the process of receiving an instruction indicating only an address, and when the command exists, utilize the command shown in FIG. 25 The block shift information records the correction operand.

于是可以省掉从外部获取指令。此外,在不知道存储了绝对值转移或相对值转移之类的命令的情况下,可以自动校正命令中采用的操作数。It is thus possible to dispense with fetching instructions from the outside. In addition, operands employed in commands can be automatically corrected without knowing that commands such as absolute value transfers or relative value transfers are stored.

另外,通过从开头分解程序,可以提取转移(函数调用)命令,并校正该命令中使用的地址。于是减少了从外部获取的指令。Also, by disassembling the program from the beginning, it is possible to extract a branch (function call) instruction, and correct an address used in the instruction. Thus, the instruction fetched from the outside is reduced.

该情况下,当程序和数据部分结合得很复杂时,由于难以将程序部分分开,因此可以提前从外部指定程序部分,然后仅分解该指定部分,再重新计算地址。In this case, since it is difficult to separate the program part when the program and data parts are combined, it is possible to designate the program part from the outside in advance, disassemble only the designated part, and then recalculate the address.

通过这种方式,就消除了从外部指定转移(函数调用)命令的位置的需要,因此可以减少从外部获取的指令。In this way, the need to externally designate the position of a branch (function call) command is eliminated, so that instructions fetched externally can be reduced.

此外,第六实施例描述了按照步骤S182、S183、S184、S196和S185的顺序执行对步骤S181中读取的指令内容进行确定处理的情况,但还可以可选方式改变确定顺序。Furthermore, the sixth embodiment described the case where the determination processing of the instruction content read in step S181 is performed in the order of steps S182, S183, S184, S196, and S185, but the determination order may also be optionally changed.

另外,在第六实施例中,在步骤S192中将重写地址加1,然后在步骤S193中将重写数据项的数目减1。但是,先将重写数据项的数目减1,然后将重写地址加1,也可以获得相同效果。Also, in the sixth embodiment, the rewrite address is incremented by 1 in step S192, and then the number of rewrite data items is decremented by 1 in step S193. However, the same effect can also be obtained by first reducing the number of rewriting data items by 1, and then adding 1 to the rewriting address.

再有,第六实施例中,于步骤S186中确定了扩展源的地址、要扩展的数据项数目、扩展目的地址以后,在步骤S189中将数据从闪速ROM 13扩展到RAM 14中,在步骤S195中记录该移位。但是,先记录移位,然后将数据从闪速ROM 13扩展到RAM 14中也能取得相同效果。Furthermore, in the sixth embodiment, after determining the address of the expansion source, the number of data items to be expanded, and the address of the expansion destination in step S186, the data is expanded from the flash ROM 13 to the RAM 14 in step S189. This shift is recorded in step S195. However, the same effect can be achieved by first recording the shift and then expanding the data from the flash ROM 13 into the RAM 14.

本申请基于2002年10月8日申请的日本专利申请2002-294499和2003年10月6日申请的2003-347561,在此专门通过参考将其整个内容结合进来。This application is based on Japanese Patent Applications 2002-294499 filed on October 8, 2002 and 2003-347561 filed on October 6, 2003, the entire contents of which are hereby expressly incorporated by reference.

工业应用性Industrial Applicability

依照本发明,在更新终端的非易失性存储器内存储的软件以便校正的过程中,可在无需将所有校正软件下载到终端中的情况下校正软件,并且有利的是能有效地更新终端中的软件。According to the present invention, in the process of updating the software stored in the nonvolatile memory of the terminal for correction, the software can be corrected without downloading all correction software to the terminal, and it is advantageous to efficiently update the software in the terminal. software.

Claims (27)

1.一种程序更新方法,其包括:1. A program update method, comprising: 在更新可重写非易失性存储器内存储的程序过程中,其中所述可重写非易失性存储器由多个区块组成,并且这些区块包括存储着程序的更新目标部分的区块,于RAM内对存储着所述程序的更新目标部分的区块内的程序部分进行扩展;In updating a program stored in a rewritable nonvolatile memory, wherein the rewritable nonvolatile memory is composed of a plurality of blocks, and the blocks include a block storing an update target portion of the program , expanding the program part in the block storing the update target part of the program in the RAM; 根据通过外部接口指示的重写指令,仅更新在所述RAM内经过扩展的所述程序部分的所述更新目标部分,updating only the update target portion of the program portion expanded in the RAM according to a rewrite instruction instructed through an external interface, 将更新了的所述程序部分一起写回所述非易失性存储器,以及writing the updated portion of the program back to the non-volatile memory together, and 当所述更新目标部分随着更新而容量发生改变时,所述重写指令是,将后续部分扩展于所述RAM时,移动所述后续部分的地址位置的指令,由此改变存储于所述非易失性存储器时的所述更新目标部分和所述更新目标部分的所述后续部分之间的相对位置。When the capacity of the update target portion changes due to the update, the rewrite command is an instruction to move the address position of the subsequent portion when expanding the subsequent portion in the RAM, thereby changing the address position stored in the The relative position between the update target portion and the subsequent portion of the update target portion in the nonvolatile memory. 2.根据权利要求1所述的程序更新方法,其中当所述更新目标部分由于更新而增大了容量时,所述重写指令是,在所述RAM的扩展过程中用于移位所述后续部分、以便增加所述非易失性存储器内存储的所述更新目标部分和所述更新目标部分的后续部分之间的相对位置关系的指令。2. The program update method according to claim 1, wherein when the capacity of the update target portion is increased due to update, the rewrite instruction is used to shift the a subsequent portion, an instruction for increasing a relative positional relationship between the update target portion and a subsequent portion of the update target portion stored in the nonvolatile memory. 3.根据权利要求2所述的程序更新方法,其中所述重写指令包括确定所述后续部分和在所述RAM内扩展所述后续部分的起始地址的地址信息。3. The program updating method according to claim 2, wherein said rewriting instruction includes address information determining said subsequent portion and a start address of extending said subsequent portion within said RAM. 4.根据权利要求3所述的程序更新方法,其中确定所述后续部分的地址信息包括所述后续部分在所述非易失性存储器中或所述RAM中的起始地址和数据项数目。4. The program updating method according to claim 3, wherein determining the address information of the subsequent part comprises a start address and a number of data items of the subsequent part in the nonvolatile memory or in the RAM. 5.根据权利要求3所述的程序更新方法,其中确定所述后续部分的地址信息包括在所述非易失性存储器或所述RAM内所述后续部分的起始地址和终止地址。5. The program updating method according to claim 3, wherein determining the address information of the subsequent portion includes a start address and an end address of the subsequent portion in the nonvolatile memory or the RAM. 6.根据权利要求2所述的程序更新方法,其中所述后续部分在所述RAM中的移位信息记录在所述RAM中不同于程序扩展区域的另一区域内,当所述非易失性存储器或所述RAM的地址由程序指令指示时,根据所述移位信息校正所指示的所述地址内存储的绝对地址值。6. The program update method according to claim 2, wherein the shift information of the subsequent part in the RAM is recorded in another area of the RAM different from the program extension area, when the nonvolatile When the address of the volatile memory or the RAM is indicated by a program instruction, the absolute address value stored in the indicated address is corrected according to the shift information. 7.根据权利要求6所述的程序更新方法,其中所述移位信息包括确定所述后续部分位置的地址信息和在所述RAM内扩展所述后续部分的起始地址。7. The program updating method according to claim 6, wherein said shift information includes address information determining a position of said subsequent part and a start address of extending said subsequent part in said RAM. 8.根据权利要求7所述的程序更新方法,其中确定所述后续部分的地址信息包括所述后续部分在所述非易失性存储器或所述RAM中的起始地址和数据项数目,或者所述后续部分在所述非易失性存储器或所述RAM内的起始地址和终止地址。8. The program updating method according to claim 7, wherein determining the address information of the subsequent part comprises a starting address and a number of data items of the subsequent part in the nonvolatile memory or the RAM, or A start address and an end address of the subsequent part in the non-volatile memory or the RAM. 9.根据权利要求7所述的程序更新方法,其中在所述RAM内扩展所述后续部分时的所述后续部分的起始地址是与根据在所述非易失性存储器或所述RAM内任选区域的起始地址的相对地址。9. The program updating method according to claim 7, wherein the start address of the subsequent part when expanding the subsequent part in the RAM is the same as that in the nonvolatile memory or the RAM according to Relative address to the start address of the optional area. 10.根据权利要求6所述的程序更新方法,其中重写指令在所述非易失性存储器或所述RAM内指示地址,依照所述移位信息校正该指示的所述地址内存储的绝对地址指定转移命令使用的绝对地址值。10. The program updating method according to claim 6, wherein a rewriting instruction indicates an address in said nonvolatile memory or said RAM, and corrects the absolute value stored in said indicated address according to said shift information. address specifies the absolute address value used by the branch command. 11.根据权利要求6所述的程序更新方法,其中重写指令在所述非易失性存储器或所述RAM内指示地址,依照所述移位信息校正该指示的所述地址内存储的绝对地址指定函数调用命令使用的绝对地址值。11. The program updating method according to claim 6, wherein a rewriting instruction indicates an address in said nonvolatile memory or said RAM, and corrects an absolute value stored in said address indicated by said shift information in accordance with said shift information. address specifies the absolute address value used by the function call command. 12.根据权利要求6所述的程序更新方法,其中重写指令在所述非易失性存储器或所述RAM内指示地址,依照所述移位信息校正该指示的所述地址内存储的相对地址值。12. The program updating method according to claim 6, wherein a rewriting instruction indicates an address in said nonvolatile memory or said RAM, and corrects the relative value stored in said indicated address according to said shift information. address value. 13.根据权利要求6所述的程序更新方法,其中重写指令在所述非易失性存储器或所述RAM内指示地址,并依照所述移位信息校正指示的所述地址内存储的相对地址指定转移命令使用的相对地址值。13. The program updating method according to claim 6, wherein a rewriting instruction indicates an address in said nonvolatile memory or said RAM, and corrects a relative value stored in said address indicated in accordance with said shift information. address specifies the relative address value used by the branch command. 14.根据权利要求6所述的程序更新方法,其中重写指令在所述非易失性存储器或所述RAM内指示地址,依照所述移位信息校正指示的所述地址内存储的相对地址指定函数调用命令使用的相对地址值。14. The program updating method according to claim 6, wherein a rewriting instruction indicates an address within said nonvolatile memory or said RAM, and a relative address stored in said address indicated is corrected according to said shift information Specifies the relative address value used by the function call command. 15.根据权利要求12所述的程序更新方法,其中在依照所述移位信息校正所述程序的相对地址值的过程中,在所校正的所述相对地址值超过了允许相对地址指定的范围时,将所述相对地址值转换成绝对地址值。15. The program updating method according to claim 12, wherein in the process of correcting the relative address value of the program according to the shift information, the corrected relative address value exceeds a range allowing relative address designation , convert the relative address value into an absolute address value. 16.根据权利要求13所述的程序更新方法,其中在依照所述移位信息校正所述程序的相对地址值、并将所校正的所述相对地址值校正成绝对地址值的过程中,利用未经校正的所述相对地址值将相对地址指定转移命令转换成绝对地址指定转移命令。16. The program updating method according to claim 13, wherein in the process of correcting the relative address value of the program according to the shift information and correcting the corrected relative address value into an absolute address value, using The uncorrected relative address value converts a relative address specifying branch command into an absolute address specifying branch command. 17.根据权利要求14所述的程序更新方法,其中在依照所述移位信息校正所述程序的相对地址值、并将所校正的所述相对地址值转换成绝对地址值的过程中,利用未经校正的所述相对地址值将相对地址指定函数调用命令转换成绝对地址指定函数调用命令。17. The program updating method according to claim 14, wherein in the process of correcting the relative address value of the program according to the shift information and converting the corrected relative address value into an absolute address value, using The uncorrected relative address value converts a relative address specifying function call command into an absolute address specifying function call command. 18.根据权利要求1所述的程序更新方法,其中所述重写指令包括所述程序部分在所述非易失性存储器或所述RAM中扩展的起始地址、要重写的数据项数目以及后续的实际重写数据。18. The program updating method according to claim 1, wherein the rewriting instruction includes a starting address of the expansion of the program part in the nonvolatile memory or the RAM, the number of data items to be rewritten and the subsequent actual rewriting of the data. 19.根据权利要求1所述的程序更新方法,其中所述重写指令包括所述程序部分在所述非易失性存储器中或在所述RAM中扩展的起始地址、后续的实际重写数据以及表示重写终止的特定数据。19. The program updating method according to claim 1, wherein said rewriting instruction includes a start address of said program part expanding in said nonvolatile memory or in said RAM, subsequent actual rewriting data and specific data indicating the termination of the rewrite. 20.根据权利要求3所述的程序更新方法,其中在所述重写指令的地址指定过程中,先利用绝对值进行地址指定,然后利用根据前面刚刚指定的地址的相对地址进行后续的地址指定。20. The program updating method according to claim 3, wherein in the process of specifying the address of the rewrite instruction, an absolute value is first used for address specification, and then a relative address according to the address just specified before is used for subsequent address specification . 21.根据权利要求3所述的程序更新方法,其中在所述重写指令的地址指定过程中,先利用绝对值进行地址指定,之后在由指定地址完成了后续重写处理时,利用根据地址的相对地址进行后续的地址指定。21. The program updating method according to claim 3, wherein in the process of specifying the address of the rewrite instruction, the address is specified using an absolute value first, and then when the subsequent rewriting process is completed by the specified address, the address is specified according to the address. Subsequent address specification for the relative address. 22.根据权利要求3所述的程序更新方法,其中在所述重写指令的地址指定过程中,先利用提前确定的地址作为参考进行地址指定,后续指定是利用前面刚刚指定的、作为参考的地址的相对地址指定。22. The program update method according to claim 3, wherein in the process of specifying the address of the rewriting instruction, the address specified in advance is used as a reference to specify the address, and the subsequent specification is to use the previously specified address as a reference A relative address specification for an address. 23.根据权利要求3所述的程序更新方法,其中在所述重写指令的地址指定过程中,先利用绝对值进行地址指定,然后利用提前确定的作为参考的地址进行后续地址指定,后续地址指定是根据在由所指定的地址完成后续重写处理时的地址的相对地址指定。23. The program update method according to claim 3, wherein in the address designation process of the rewrite instruction, an absolute value is first used for address designation, and then a subsequent address designation is performed using an address determined in advance as a reference, and the subsequent address Designation is based on relative address designation of the address when the subsequent rewriting process is completed by the designated address. 24.一种终端设备,其包括:24. A terminal device comprising: 可重写非易失性存储器,其多个区块内存储着程序;Rewritable non-volatile memory with programs stored in multiple blocks; RAM;RAM; 用于接收所述程序的重写指令的外部接口;以及an external interface for receiving a rewriting instruction of the program; and 控制器,其将对存储着所述程序的更新目标部分的所述区块内的程序部分扩展于RAM,依照所述重写指令仅对所述RAM内经过扩展的所述程序部分的所述更新目标部分进行更新,然后一起将更新后的所述程序部分写所述回非易失性存储器,a controller that expands, in RAM, the program portion in the block storing the update target portion of the program, and performs only the expanded program portion in the RAM in accordance with the rewrite command. updating the target part to update, and then writing the updated program part back to the non-volatile memory together, 其中,当所述更新目标部分随着更新而容量发生改变时,所述重写指令是,将后续部分扩展于所述RAM时,移动所述后续部分的地址位置的指令,由此改变存储于所述非易失性存储器时的所述更新目标部分和所述更新目标部分的所述后续部分之间的相对位置。Wherein, when the capacity of the update target part changes along with the update, the rewrite instruction is an instruction for moving the address position of the subsequent part when expanding the subsequent part in the RAM, thereby changing the address position stored in the RAM. A relative position between the update target portion of the nonvolatile memory and the subsequent portion of the update target portion. 25.根据权利要求24所述的终端设备,其中所述外部接口是有线连接接口。25. The terminal device according to claim 24, wherein the external interface is a wired connection interface. 26.根据权利要求24所述的终端设备,其中所述外部接口是无线连接接口。26. The terminal device according to claim 24, wherein the external interface is a wireless connection interface. 27.根据权利要求24所述的终端设备,其中所述外部接口是存储卡接口,所述控制器从插入存储卡接口的存储卡中读出重写指令。27. The terminal device according to claim 24, wherein the external interface is a memory card interface, and the controller reads the rewriting instruction from a memory card inserted into the memory card interface.
CNB2003801003168A 2002-10-08 2003-10-08 Program updating method and terminal device Expired - Fee Related CN100339823C (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002294499 2002-10-08
JP294499/2002 2002-10-08
JP347561/2003 2003-10-06

Publications (2)

Publication Number Publication Date
CN1692330A CN1692330A (en) 2005-11-02
CN100339823C true CN100339823C (en) 2007-09-26

Family

ID=35346982

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2003801003168A Expired - Fee Related CN100339823C (en) 2002-10-08 2003-10-08 Program updating method and terminal device

Country Status (1)

Country Link
CN (1) CN100339823C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7554855B2 (en) * 2006-12-20 2009-06-30 Mosaid Technologies Incorporated Hybrid solid-state memory system having volatile and non-volatile memory
DE102010039021B4 (en) * 2010-08-06 2023-02-23 Robert Bosch Gmbh Method for reconfiguration of software parameters in a microcontroller as well as microcontroller and control unit
CN104102521A (en) * 2014-07-25 2014-10-15 浪潮(北京)电子信息产业有限公司 Method and device for updating nonvolatile storage
JP6254517B2 (en) * 2014-12-22 2017-12-27 富士通フロンテック株式会社 Media handling device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134860A (en) * 1991-10-31 1993-06-01 Fujitsu Ltd Executable file correction method
JPH0844551A (en) * 1994-07-28 1996-02-16 Hitachi Ltd Information processing device
JPH08153005A (en) * 1994-11-29 1996-06-11 Oki Electric Ind Co Ltd Patch processing system
US5603056A (en) * 1993-09-13 1997-02-11 Kabushiki Kaisha Toshiba Disk drive control computer and method for rewriting control program in flash EEPROM with serial communication using unassigned pins of SCSI or ATA connector
JP2002014833A (en) * 2000-06-30 2002-01-18 Konica Corp Rewriting system for flash memory and controller and image forming device and program updating system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134860A (en) * 1991-10-31 1993-06-01 Fujitsu Ltd Executable file correction method
US5603056A (en) * 1993-09-13 1997-02-11 Kabushiki Kaisha Toshiba Disk drive control computer and method for rewriting control program in flash EEPROM with serial communication using unassigned pins of SCSI or ATA connector
JPH0844551A (en) * 1994-07-28 1996-02-16 Hitachi Ltd Information processing device
JPH08153005A (en) * 1994-11-29 1996-06-11 Oki Electric Ind Co Ltd Patch processing system
JP2002014833A (en) * 2000-06-30 2002-01-18 Konica Corp Rewriting system for flash memory and controller and image forming device and program updating system

Also Published As

Publication number Publication date
CN1692330A (en) 2005-11-02

Similar Documents

Publication Publication Date Title
CN1253790C (en) Display device and driving method thereof
CN1218316C (en) Information recording method for recording data on information recording medium and disc recording apparatus for recording data on disc
CN1643600A (en) Information recording medium, recording apparatus, reproducing apparatus, recording method, and reproducing method allowing updating of defect list
CN1271630C (en) Method of manufacturing information recording medium, information recording method, and information recording apparatus
CN1193783A (en) memory card
CN1118148C (en) Nonlinearity-caused distortion compensating system
CN1705934A (en) File-update apparatus
CN1539144A (en) Information recording medium, information recording method, information recording device, information reproducing method, and information reproducing device
CN1498367A (en) Information processing device, memory management device, memory management method, and information processing method
CN1846268A (en) Write-once recording medium, recording method, recording apparatus, reproducing method, and reproducing apparatus
CN1547718A (en) Content management method, content management device, content playback device and content storage device
CN1805049A (en) Method of data access in nonvolatile storage in embedded system
CN1890624A (en) Electronic device, control method thereof, host device, and control method thereof
CN1300802C (en) Semiconductor storing device
CN1194295C (en) Program changing device, method and computer program for treating program changing
CN100339823C (en) Program updating method and terminal device
CN1920776A (en) Information processing apparatus
CN1114153C (en) Microprocessor for supporting reduction of program codes in size
CN1758222A (en) Program processing apparatus
CN1577266A (en) Program converting method, program and storage medium
CN1942964A (en) Optical disc, recording device, reading device and method
CN1167297A (en) Device for producing multi-kind assembly source program from extenden tree-shape structure figure by use of same rule
CN1287295C (en) Information processing device and method, storage medium, program and camera device
CN1836445A (en) Information processing device and method, program, and recording medium
CN101065725A (en) Command supply device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070926

Termination date: 20091109