1. Field of the Invention
The present invention relates to portable terminal devices, and more particularly, to a software updating method for updating software stored in a nonvolatile memory provided in a portable terminal on the basis of differential data acquired via wireless communication.
2. Description of the Related Art
Nowadays, portable terminals, such as cellular phones, are widely used. In order to add functions to, improve the performance of, correct failures of, and the like for such portable terminals, it is necessary to update software such as programs stored in memories of the portable terminals. Firmware over-the-air (FOTA) technology for implementing software updating for a portable terminal via wireless communication by using a rewritable nonvolatile memory, such as a flash memory, for storing software is available (see, for example, Japanese Unexamined Patent Application Publication No. 2006-309516).
As functions of software for portable terminals become more complicated, a necessary memory capacity increases. Thus, the cost of memory devices increases, and the increase in the cost of memory devices affects product prices.
In order to solve the above-mentioned problem, a method for loading software that has been compressed in advance into a memory and decompressing the compressed software when the software is to be executed has been suggested. According to this method, the size of the software itself is reduced. Thus, a certain level of effect in terms of a reduction in a necessary memory capacity can be expected. However, since extra time is necessary for decompressing compressed software, a reduction in a starting time is not expected.
Rewritable nonvolatile semiconductor memories, such as flash memories, are used as memory devices for portable terminals.
Thus, a flash memory is used for storing a program for a portable terminal. In the case that booting (booting up) is performed from such a flash memory, a program in a program area is temporarily transferred from the flash memory to a random-access memory (RAM), and the program is executed in the RAM.
In the case where code that has been compressed in advance is stored in a flash memory, the size of the code to be loaded from the flash memory into a RAM is reduced. Thus, a free space of the memory increases, and the increased free space can be used as a storage area.
However, since it is necessary to decompress compressed code when booting is to be executed, it takes a long time to start software.
In the case of updating software constituted by compressed code by using FOTA, the following sequence is executed:
1) decompress compressed code in a flash memory and transfer the decompressed code to a RAM as the original code,
2) update software in accordance with the decompressed software and a differential file acquired via wireless communication, and
3) compress the updated software in a portable terminal and write the compressed updated software back to the flash memory.