Embedded software update methods and systems for digital devices
Abstract
A method and apparatus of updating an embedded software operative in a digital device by a software patch comprises first preparing said embedded software. The method also comprises designating at least one Flash block of a Flash memory in said digital device as Flash update block for software update programming, designating at least one area in RAM memory in said digital device as RAM update buffer for Flash programming, preparing Flash erasing function and Flash writing function, designating a memory area in said digital device as patch area, loading said embedded software into said digital device. The method then comprises generating a software patch, adapted to provide a predetermined function, transmitting said software patch to said digital device through a communications link, receiving said software patch by said digital device, updating at least one Flash block of said embedded software in the unit of Flash block said software patch.
Claims
exact text as granted — not AI-modified1 . A method of updating an embedded software operative in a digital device by a software patch, comprising:
preparing said embedded software comprising:
designating at least one Flash block of a Flash memory in said digital device as Flash update block for software update programming;
designating at least one area in RAM memory in said digital device as RAM update buffer for Flash programming;
preparing Flash erasing function and Flash writing function;
designating a memory area in said digital device as patch area;
loading said embedded software into said digital device;
generating a software patch, adapted to provide a predetermined function; transmitting said software patch to said digital device through a communications link; receiving said software patch by said digital device; updating at least one Flash block of said embedded software in the unit of Flash block with said software patch.
2 . The method of claim 1 , wherein said updating at least one Flash block comprises at least one of the following:
allocating a jump instruction at the beginning of the program part of the embedded software to be updated, for jumping to said patch area when running a new update code in said patch area; overwriting some part of the program part of the embedded software to be updated with a new update code, and allocating, at the end of the part, a jumping instruction for jumping to said patch area when running the new update code in said patch area; overwriting the program part of the embedded software to be updated with the new update code.
3 . The method of claim 1 , wherein said step of preparing Flash erasing function and Flash writing function further comprises:
putting at least one function of said Flash erasing function and said Flash writing function into RAM memory.
4 . The method of claim 3 , wherein said step of putting Flash programming functions into RAM memory comprises at least one of the following:
using a software function for copying said Flash programming functions into RAM memory, and using a software compiler for allocating said Flash programming functions into RAM memory
5 . The method of claim 3 , wherein said Flash function is run in one of the following ways:
a) in said RAM memory; b) in at least one software interrupt handler routine; c) in highest priority task of software operation system of said embedded software.
6 . The method of claim 1 , wherein said updating further comprises:
erasing said Flash update block; copying data from said Flash block into said Flash update block, except the part to be updated; writing update data into the part to be updated in said Flash update block; erasing said Flash block; copying data from said Flash update block into said Flash block;
7 . The method of claim 1 , wherein said updating at least one Flash block further comprises:
erasing said Flash update block; copying data in from Flash block into said Flash update block, except the part to be updated; erasing said Flash block; copying data from said Flash update block into said Flash block; writing update data into the part to be updated in said Flash block;
8 . The method of claim 6 , wherein said copying data from a first Flash block to a second Flash block comprises:
checking whether said data can fit into said RAM update buffer, and if not, separating said data into multiple parts to ensure each part of said data can fit into said RAM update buffer; for each part, performing the steps of:
reading said data from said first Flash block and writing said data into said RAM update buffer;
reading said data from said RAM update buffer and writing said data into said second Flash block.
9 . The method of claim 7 , wherein said copying data from a first Flash block to a second Flash block comprises:
checking whether said data can fit into said RAM update buffer, and if not, separating said data into multiple parts to ensure each part of said data can fit into said RAM update buffer; for each part, performing the steps of:
reading said data from said first Flash block and writing said data into said RAM update buffer;
reading said data from said RAM update buffer and writing said data into said second Flash block.
10 . The method of claim 1 , wherein said preparing said embedded software further comprises:
allocating at least one update programming checking routine at or close to the bootstrap code (program execution start point), to check whether there are any patch programming tasks that have not been completed for software update, and if yes, executing patch programming for software update to complete the tasks; returning execution to the original program for system power-on.
11 . The method of claim 10 , further comprising:
using at least one bit of Flash memory as patch programming flag to indicate patch programming status.
12 . The method of claim 1 , wherein said step of generating a software patch further comprises:
using at least one of the following information to generate said software patch:
Object file of the new program code;
Software function and variable map file generated by software compiler.
13 . The method of claim 1 , wherein said step of transmitting said software patch further comprises:
using at least one SMS message to carry data of said software patch.
14 . The method of claim 1 , wherein said step of preparing said embedded software further comprises:
pre-installing identification information of patch server into said digital device.
15 . The method of claim 1 , further comprising:
registering an identification number and other related information of the digital device on the patch server, using at least one of the following methods:
registering the digital device information by the digital device user on a web site by entering the information of the digital device and the corresponding identification number;
sending by the digital device user of a message to the patch server including the product information and the product identification number.
16 . The method of claim 1 , further comprising:
said digital device sending at least one message to the patch server for at least one of the following:
for reporting patching status;
for inquiring available patch information.
17 . The method of claim 1 , wherein said step of generating a software patch further comprises:
adding at lest one of the following data to said software patch for data error detection: CRC (“Cyclic Redundancy Codes”) data; Checksum data.
18 . The method of claim 1 , wherein said step of generating a software patch further comprises: encrypting said software patch before patch transmission.
19 . The method of claim 18 , further comprising:
encrypting said software patch using at least one of the following information:
identification information of said software patch;
identification information of said digital device;
time information;
dynamically generated secret data.
20 . The method of claim 18 , further comprising the following steps:
said digital device generating secret-data and sending said secret-data to a patch generator; said patch generator receiving said secret-data to encrypt said software patch using said secret-data; said patch generator sending encrypted software patch generated to said digital device; said digital device receiving said encrypted software patch and uses said secret-data generated to decrypt said received encrypted software patch.
21 . The method of claim 1 , wherein said step of generating a software patch further comprises:
putting the information of the difference between the new code and the original code into said software patch to reduce transmission amount.
22 . A method of updating an embedded software operative in a digital device by using a software patch, comprising:
designating at least one Flash block of a FLASH memory in said digital device as Flash update block for software update programming; designating at least one area in a RAM memory in said digital device as RAM update buffer for Flash programming; designating a patch area in said digital device; preparing said embedded software; preparing said software patch; loading said embedded software into said digital device; preparing said software patch for transmission to said digital device through a communication link.
23 . The method of claim 22 , further comprising:
encrypting said software patch prior to transmission, with an encryption key generation function.
24 . A method of updating an embedded software operative in a digital device, comprising:
receiving a software patch by said digital device through a communications link; updating at least one predetermined Flash block of a FLASH memory of said digital device containing said embedded software, in the unit of Flash block with said software patch, by at least one of the following:
a) allocating, at the beginning of the program part to be updated, a jumping instruction for jumping to said patch area for running the new code in said patch area;
b) overwriting some part of the program part to be updated with the new update code, and at the end of the part, allocating a jumping instruction for jumping to said patch area for running the new code in said patch area;
c) overwriting the program part to be updated with the new update code.
25 . The method of claim 24 , wherein said software patch is encrypted and has an encryption key generation function, which is placed in a predetermined safe place for safekeeping.
26 . A method of updating an embedded software operative in a digital device, comprising:
receiving a software patch by said digital device through a communication link; designating a first Flash block in said Flash memory; designating a second Flash block (“Update Buffer Block”) in a Flash memory of said digital device; copying good code that does not need to be updated from said first Flash block to a first predetermined location of said Update Buffer Block; writing said software patch (“Program Update Code”) to a second predetermined location of said Update Buffer Block; erasing said first Flash block; copying said entire Update Buffer Block to said first Flash block, wherein said first Flash block is now updated.
27 . A method of updating an embedded software operative in a digital device, comprising:
receiving a software patch by said digital device through a communication link; designating a first Flash block in said Flash memory; designating a second Flash block (“Update Buffer Block”) in said Flash memory of said digital device; copying good code from a first Flash block to a first predetermined location of said Update Buffer Block; erasing said first Flash block; copying said entire Update Buffer Block to said first Flash block; writing said software patch (“Program Update Code”) to a predetermined location of said first Flash block, wherein said first Flash block is now updated with the Program Update Code.
28 . A method of updating an embedded software operative in a digital device, said method comprising:
providing a Flash memory in said digital device; storing said embedded software as program code in said Flash memory (“Program Code Area”); designating a patch area within said Flash memory; receiving a software patch by said digital device through a communication link; programming said software patch into said patch area as update program code; inserting a jump instruction to a location in said Program Code Area, which is the beginning of a portion of said program code to be updated, said jump instruction causing execution of said program code to be jumped to said update program code.
29 . A method of updating an embedded software operative in a digital device, said method comprising:
providing a Flash memory in said digital device; storing said embedded software in said Flash memory (“Program Code Area”); designating a patch area within said Flash memory; receiving a software patch by said digital device through a communication link; programming a first portion of said software patch as a first portion of updated program code into said Program Code Area; programming at least a second portion of said software patch into said patch area as a second portion of updated program code; inserting a jump instruction to a location in said Program Code Area, which is the end of said first portion of said updated program code, said jump instruction causing execution to jump to said second portion of said updated program code after execution of said first portion of said updated program code.
30 . A method of updating an embedded software operative in a digital device, said method comprising:
providing a Flash memory in said digital device; storing said embedded software in said Flash memory (“Program Code Area”); designating a patch area within said Flash memory; receiving a software patch by said digital device through a communication link; programming said software patch as updated program code into said Program Code Area; if said updated program code can be fully contained in said Program Code Area, inserting a jump instruction to the end of said updated program code, said jump instruction causing execution to jump to the remaining of said Program Code Area after execution of said updated program code.
31 . A method of managing software error information in a software program operative in a digital device, said method comprising:
allocating an area in non-volatile memory for use by an error database in said digital device; inserting a plurality of software traces into said software program, said traces monitoring operating condition of said software program and outputting error information when encountering software errors; transmitting said error information to said error database; processing said error information in said error database; retrieving said error information from said error database for analysis.
32 . The method of claim 31 , wherein said retrieving said error information comprises transmitting said error information via SMS messages from said digital device.
33 . The method of claim 31 , further comprising:
collecting reset information for system resets in said digital device; transmitting said reset information to said error database; processing said reset information in said error database; retrieving said reset information from said error database for analysis.
34 . The method of claim 33 , wherein said retrieving said reset information comprises transmitting said reset information via SMS messages from said digital device.
35 . The method of claim 33 , wherein said reset information comprises at least one of the following:
call stack information; reset type information; time stamp.Join the waitlist — get patent alerts
Track US2005063242A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.