CN108897564A - A kind of method for upgrading software and embedded system of embedded system - Google Patents

A kind of method for upgrading software and embedded system of embedded system Download PDF

Info

Publication number
CN108897564A
CN108897564A CN201810581933.2A CN201810581933A CN108897564A CN 108897564 A CN108897564 A CN 108897564A CN 201810581933 A CN201810581933 A CN 201810581933A CN 108897564 A CN108897564 A CN 108897564A
Authority
CN
China
Prior art keywords
upgrading
embedded system
application layer
compressed package
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810581933.2A
Other languages
Chinese (zh)
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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Technology Guangzhou Ltd
Comba Telecom Systems China Ltd
Comba Telecom Systems Guangzhou Co Ltd
Tianjin Comba Telecom Systems 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 Comba Telecom Technology Guangzhou Ltd, Comba Telecom Systems China Ltd, Comba Telecom Systems Guangzhou Co Ltd, Tianjin Comba Telecom Systems Co Ltd filed Critical Comba Telecom Technology Guangzhou Ltd
Priority to CN201810581933.2A priority Critical patent/CN108897564A/en
Publication of CN108897564A publication Critical patent/CN108897564A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the present invention provides the method for upgrading software and embedded system of a kind of embedded system, and the mode that software upgrading is carried out to solve existing embedded system there is technical issues that at high cost, easy because power-off causes to upgrade.The embedded system includes nonvolatile memory, which has boot section, Operational Zone and download area, wherein, boot section executes program for storing upgrading, Operational Zone upgrades compressed package for storing for storing application layer program, download area, the method includes:Determine need to be implemented updating operation when, pass through operation boot section storage upgrading execute process control execute updating operation, wherein execute updating operation include:The upgrading compressed package of download area storage is unziped it to obtain new version application layer program, and uses the application layer program of new version application layer program covering Operational Zone storage.

Description

A kind of method for upgrading software and embedded system of embedded system
Technical field
The present invention relates to the method for upgrading software and embedded system of electronic technology field more particularly to a kind of embedded system System.
Background technique
The embedded systems such as single-chip microcontroller are typically used on middle-size and small-size product, inside be generally integrated non-volatile memories Device (such as flash memory Flash) and memory (such as random access memory ram).Due to cost considerations, non-easy in embedded system The storage resource of the property lost memory and memory is very limited.
In embedded system, application layer program is commonly stored in the nonvolatile memory, is adopted with nonvolatile memory For Flash, upgraded to the application layer program of embedded system usually has following several ways in the prior art:
Mode 1:Active and standby two pieces of Flash are equipped with for embedded system, first upgrade the application layer program in standby Flash, then Switch active and standby Flash, original standby Flash is switched as main Flash, original main Flash is switched to standby Flash;
Mode 2:The application layer program stored in Flash is first loaded into memory operation, then directly downloads new version Application layer program is written in Flash;
Mode 3:First downloading new version application layer program is run into memory, then replicates the new version application layer in memory Program is into Flash.
However, by actual use discovery, above-mentioned mode 1 increases embedded system due to needing optional equipment Flash The cost of system in above-mentioned mode 2,3, due to needing to load application layer program with memory, thus needs larger using amount of storage Memory, higher cost, also, in above-mentioned mode 2,3, if powering off in escalation process, the data in memory can lose It loses, causes software that can not start or upgrade file failed download.
As it can be seen that the mode that existing embedded system carries out software upgrading causes to rise there are at high cost, easy because of power-off The technical issues of grade failure.
Summary of the invention
The embodiment of the present invention mentions a kind of method for upgrading software of embedded system and embedded system supplies, existing to solve Embedded system carry out software upgrading mode there is technical issues that it is at high cost, be easy because power-off cause upgrading.
In a first aspect, providing a kind of method for upgrading software of embedded system, the embedded system includes non-volatile Memory, the non-volatile memory configuration have boot section, Operational Zone and download area, and the boot section is held for storing upgrading Line program, the Operational Zone is for storing application layer program, and the download area is for storing upgrading compressed package, the method packet It includes:
Determining that the upgrading by running the boot section storage executes process control when needing to be implemented updating operation Execute the updating operation, wherein described to execute the updating operation and include:Upgrading compression to download area storage Packet is unziped it to obtain new version application layer program, and is covered the Operational Zone using the new version application layer program and deposited The application layer program of storage.
In one possible implementation, the embedded system further includes memory, the memory configurations have for The global buffer that global buffering is realized in the embedded system carries out the upgrading compressed package of download area storage Decompression covers answering for the Operational Zone storage using the new version application layer program to obtain new version application layer program With layer program, including:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein The data that each decompression obtains are stored in the global buffer in turn;
After the completion of each decompression, the data cover formula that the global buffer stores is stored to the Operational Zone, To form the new version application layer program in the Operational Zone.
In one possible implementation, the nonvolatile memory is also configured with upgrade information area, the upgrading The information area is used to store the check information of the upgrading compressed package, and the check information of the upgrade information area storage is described in downloading It is determined when upgrading compressed package to the download area by the embedded system, the execution updating operation further includes:
The upgrading compressed package that the download area stores is unziped it with obtain new version application layer program it Before, determine whether the check information recorded in the upgrading compressed package is consistent with the check information of upgrade information area storage;
If it is not, then stopping executing the updating operation.
In one possible implementation, the upgrade information area is also used to store upgrading instruction information, the upgrading Instruction information is used to indicate whether to need to be implemented the updating operation, in the liter by running the boot section storage Before grade executes the program execution updating operation, the method also includes:
Upgrade request is received, and the upgrading compressed package is downloaded to the download area according to the upgrade request;
After the upgrading compressed package is completed in downloading, adjusting the upgrading instruction information is that instruction needs to be implemented the upgrading Operation, to indicate that information determination needs to be implemented the updating operation according to the upgrading in embedded system starting.
Second aspect, provides a kind of embedded system, and the embedded system includes nonvolatile memory and processor, The non-volatile memory configuration has boot section, Operational Zone and download area, and the boot section executes program for storing upgrading, The Operational Zone is for storing application layer program, and the download area is for storing upgrading compressed package;
Wherein, the processor is when determination needs to be implemented updating operation, by running described in the boot section storage Upgrading executes process control and executes the updating operation, and the processor executes the updating operation and includes:To the download area The upgrading compressed package of storage is unziped it to obtain new version application layer program, and uses the new version application layer journey Sequence covers the application layer program of the Operational Zone storage.
In one possible implementation, the embedded system further includes memory, the memory configurations have for The global buffer of global buffering is realized in the embedded system, the processor passes through the institute for running the boot section storage It states upgrading and executes the process control execution updating operation, including:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein The data that each decompression obtains are stored in the global buffer in turn;
After the completion of each decompression, the data cover formula that the global buffer stores is stored to the Operational Zone, To form the new version application layer program in the Operational Zone.
In one possible implementation, the nonvolatile memory is also configured with upgrade information area, the upgrading The information area is used to store the check information of the upgrading compressed package, and the check information of the upgrade information area storage is described in downloading It is determined when upgrading compressed package to the download area by the embedded system, the processor is deposited by running the boot section The upgrading of storage executes process control and executes the updating operation, further includes:
The upgrading compressed package that the download area stores is unziped it with obtain new version application layer program it Before, determine whether the check information recorded in the upgrading compressed package is consistent with the check information of upgrade information area storage;
If it is not, then stopping executing the updating operation.
In one possible implementation, the upgrade information area is also used to store upgrading instruction information, the upgrading Indicate that information is used to indicate whether to need to be implemented the updating operation, the processor is also used to by running the boot section Before the upgrading of storage executes the process control execution updating operation, answered described in the Operational Zone storage by running It is executed with layer process control:
Upgrade request is received, and the upgrading compressed package is downloaded to the download area according to the upgrade request;
After the upgrading compressed package is completed in downloading, adjusting the upgrading instruction information is that instruction needs to be implemented the upgrading Operation indicates that information determines according to the upgrading when executing program designation starting with the upgrading described in the operation for embedded system Need to be implemented the updating operation.
The third aspect provides a kind of embedded system, and the embedded system includes nonvolatile memory, described non-easy The property lost memory is configured with boot section, Operational Zone and download area, wherein the boot section is configured with upgrade execution module, described Operational Zone is configured with application layer module, and the download area is used for for storing upgrading compressed package, the upgrade execution module:
When determination needs to be implemented updating operation, the updating operation is executed, wherein executing the updating operation includes: The upgrading compressed package of download area storage is unziped it to obtain new version application layer module, and using described new Version application layer module updates the application layer module of the Operational Zone configuration.
In one possible implementation, the embedded system further includes memory, the memory configurations have for The global buffer of global buffering is realized in the embedded system, the upgrade execution module is specifically used for:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein The data that each decompression obtains are stored in the global buffer in turn;
After the completion of each decompression, the data cover formula that the global buffer stores is stored to the Operational Zone, To form the new version application layer module in the Operational Zone.
In one possible implementation, the nonvolatile memory is also configured with upgrade information area, the upgrading The information area is used to store the check information of the upgrading compressed package, and the check information of the upgrade information area storage is described in downloading It is determined when upgrading compressed package to the download area by the embedded system, the upgrade execution module is also used to:
The upgrading compressed package that the download area stores is unziped it with obtain new version application layer module it Before, determine whether the check information recorded in the upgrading compressed package is consistent with the check information of upgrade information area storage;
If it is not, then stopping executing the updating operation.
In one possible implementation, the upgrade information area is also used to store upgrading instruction information, the upgrading Indicate that information is used to indicate whether to need to be implemented the updating operation, the application layer module of the Operational Zone configuration is used for:
Before the upgrade execution module executes the updating operation, upgrade request is received, and ask according to the upgrading Ask the downloading upgrading compressed package to the download area;
After the upgrading compressed package is completed in downloading, adjusting the upgrading instruction information is that instruction needs to be implemented the upgrading Operation, to indicate that information determination needs to be implemented the updating operation according to the upgrading in embedded system starting.
Fourth aspect provides a kind of nonvolatile memory, wherein:
The non-volatile memory configuration has boot section, Operational Zone and download area, and the boot section is for storing upgrading Execution program, the Operational Zone is for storing application layer program, and the download area is for storing upgrading compressed package, when described non-easy The program of the property lost memory storage in embedded system when running, so that embedded system executes side described in first aspect Method.
In the embodiment of the present invention, the non-volatile memory configuration of embedded system has boot section, Operational Zone and download area, Boot section executes program for storing to upgrade, and Operational Zone upgrades compressed package for storing for storing application layer program, download area, Determining that the upgrading execution process control stored by operation boot section executes updating operation, i.e., when needing to be implemented updating operation It is executed by the process control of operation boot section storage:The upgrading compressed package of download area storage is unziped it to obtain new edition This application layer program, and use the application layer program of new version application layer program covering Operational Zone storage.
Due to having carried out partition to nonvolatile memory, the data of the memory block not upgraded in escalation process will not be by It to influence, still is able to operate normally, for example, the operation that the upgrading of boot section executes program is unaffected.In this way, being just not required to Upgrading is executed program in upgrading to be loaded into memory, reduce the demand to memory storage amount in embedded system, save About cost.
Further, due to upgrading compressed package and the original application layer program in Operational Zone be all stored in always it is non-volatile In memory, thus even if powering off, the loss of vital data in embedded system will not be led to, after a loss of power, only Upgrading can be smoothly completed by needing to restart execution updating operation.Also, due to not needing to add entire application layer program It is downloaded in memory or additional nonvolatile memory, reduces the demand in escalation process to amount of storage in embedded system, Cost is saved.
Further, the upgrading compressed package of downloading is smaller compared to unpressed new version application layer program occupied space, Reduce the demand in escalation process to amount of storage in embedded system, saves cost.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Inventive embodiments for those of ordinary skill in the art without creative efforts, can also be according to mentioning The attached drawing of confession obtains other attached drawings.
Fig. 1 is a kind of flow diagram of the method for upgrading software of embedded system in the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
In addition, the terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates may exist Three kinds of relationships, for example, A and/or B, can indicate:Individualism A exists simultaneously A and B, these three situations of individualism B.Separately Outside, character "/" herein typicallys represent the relationship that forward-backward correlation object is a kind of "or" in the case where not illustrating. In addition, it is necessary to understand, in the description of the embodiment of the present invention, the vocabulary such as " first ", " second " are only used for distinguishing description Purpose is not understood to indicate or imply relative importance, can not be interpreted as indication or suggestion sequence.
Embodiment one
The embodiment of the present invention provides a kind of method for upgrading software of embedded system.Wherein, embedded system for example can be with Refer to single-chip microcontroller, may also mean that other types of embedded system in the prior art.
In the embodiment of the present invention, embedded system, which includes at least, nonvolatile memory, which can To integrate in embedded systems.Specifically, which can be flash memory (Flash), may be programmed read-only deposit Reservoir (Programmable read-only memory, PROM), electrically-alterable ROM (EAROM) (Electrically Alterable read only memory, EAROM), erasable programmable read-only memory (Erasable programmable Read only memory, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically erasable Programmable read only memory, EEPROM) etc..
In the embodiment of the present invention, the non-volatile memory configuration in embedded system has multiple memory blocks, such as can To be configured with boot section, Operational Zone and download area.In a kind of possible embodiment, which can also match It is equipped with upgrade information area.In the specific implementation process, can by each memory block store different data make it is embedded System is based on each memory block and realizes specific function.
For example:
1, boot section for store upgrading execute program, the upgrading execute program can guide embedded system start and Indicate that embedded system executes updating operation, all codes that the upgrading of boot section storage executes program only call guidance section Interior code can not call the code in other sections, run the program stored in boot section when embedded system starts first;
2, for storing application layer program, application layer program can indicate Implementation of Embedded System business function for Operational Zone; After the program of storage executes in boot section, the program for running Operational Zone storage is jumped;
3, download area for storing upgrading compressed package, the upgrading compressed package is obtained to after the compression of new version application layer program , compared to unpressed new version application layer program, it is smaller to upgrade compressed package the space occupied;In a kind of possible embodiment party In formula, upgrade in compressed package other than including new version application layer program, head can also record the upgrading compressed package Data volume size and check value;
4, upgrade information area is for storing instruction information relevant to upgrading and/or check information.
By embedded system include memory space for the Flash of 256KB for, the inner space of the Flash can use Division mode as shown in Table 1:
Table 1
Memory block title Memory block explanation Memory block size
Boot section Storage upgrading executes program 8KB
Operational Zone Store application layer program 160KB
Download area Storage upgrading compressed package 80K
Upgrade information area Store instruction information relevant to upgrading and/or check information 2KB
In table 1, the size that the upgrading of boot section storage executes program is typically not greater than 8KB, and upgrade information area usually accounts for With minimum erasing space (such as 2KB) of Flash.Also, the inner space of the Flash is in addition to being allocated to shown in table 1 Each memory block outside, there may also be remaining spaces.
In the embodiment of the present invention, when in operating status after embedded system unlatching, i.e. operation for embedded system application When layer program, embedded system can receive the upgrade request for being used to indicate and being upgraded, which for example can be The host remote of management embedded system is sent to embedded system.
After receiving upgrade request, embedded system can download upgrading compressed package to non-volatile according to upgrade request Download area in memory.
During downloading upgrades compressed package, embedded system can determine the verification of downloaded upgrading compressed package Information, these check informations are stored in the upgrade information area of nonvolatile memory.Wherein, check information may include upgrading The data volume size of compressed package and/or the check value (such as cryptographic Hash) for upgrading compressed package.For example, embedded system upgrades in downloading It will record the data volume size of upgrading compressed package after compressed package, and calculating the check value of upgrading compressed package and recording this Check value.
After upgrading compressed package is completed in downloading, the upgrading of the adjustable upgrade information area storage of embedded system indicates information Updating operation is needed to be implemented for instruction, in turn, embedded system is allowed to determine needs according to upgrading instruction information when starting Execute updating operation.
In a kind of possible embodiment, embedded system is that instruction needs to be implemented updating operation in adjustment instruction information Before, first the upgrading compressed package of downloading can also be verified, determine in upgrading compressed package the check information that records whether with The check information of upgrade information area storage is consistent, no if consistent just adjustment instruction information is that instruction needs to be implemented updating operation It does not adjust then.
It is after instruction needs to be implemented updating operation in adjustment instruction information, embedded system can be in the embodiment of the present invention It is resetted, or is resetted after preset time immediately, or resetted in the time that upgrade request is specified, or according to independent The reset instruction received is resetted.
And when being started after embedded system reset, the upgrading of operation boot section first executes program.
Operation upgrading executes in program process, and embedded system first can indicate letter according to the upgrading of upgrade information area storage Breath determines the need for executing updating operation, if upgrading instruction information instruction needs to be implemented updating operation, embedded system Updating operation is executed, otherwise embedded system upgrading out of service executes program, then operation is stored in the application layer of Operational Zone Program.
Determining that embedded system executes program control by the upgrading of operation boot section storage when needing to be implemented updating operation System executes updating operation, specifically, executes updating operation and includes at least:
The upgrading compressed package of download area storage is unziped it to obtain new version application layer program, and uses new version Application layer program covers the application layer program of Operational Zone storage.That is, covering Operational Zone using new version application layer program Originally the application layer program of storage, realizes the software upgrading of embedded system.
In a kind of possible embodiment, during embedded system executes updating operation, stored to download area Upgrading compressed package unzip it to obtain new version application layer program before, can also include to upgrading compressed package test The operation of card, i.e. embedded system can determine what whether the check information recorded in upgrading compressed package stored with upgrade information area Check information is consistent, if unanimously just unziping it operation, otherwise embedded system stops executing updating operation, then runs It is stored in the application layer program of Operational Zone.
In the embodiment of the present invention, embedded system further includes memory, which has for real in embedded system The global buffer of existing global buffering, that is, the global buffer is the buffer area of a multiplexing, is run each in embedded system The global buffer can be used when program, for example, in addition to the global buffer can be used when operation upgrades and executes program Outside, it can also use the global buffer when running application layer program.By configuring global buffer, memory source is realized Efficient utilization.
In a kind of possible embodiment, the upgrading compressed package of download area storage is decompressed when executing updating operation Contracting is to obtain new version application layer program, and the tool of the application layer program using new version application layer program covering Operational Zone storage Body embodiment can be:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein each time The data that decompression obtains are stored in the global buffer in turn, also, after the completion of each decompression, by global buffer The data cover formula of storage is stored to Operational Zone, to form new version application layer program in Operational Zone.
For example, during gradation decompresses upgrading compressed package, the data of 1KB are only decompressed every time, by more The decompression to entire upgrading compressed package is completed in secondary decompression.It is the compression of 3KB with compressed new version application layer program Data instance, embedded system decompress the first KB data in 3KB first, decompress first part of ephemeral data storage of acquisition In global buffer, then first part of ephemeral data cover type is stored into Operational Zone, then, embedded system erasing is complete First part of ephemeral data in office buffer area, and start to decompress the 2nd KB data in 3KB, second part for decompressing acquisition faces When data be stored in global buffer, then second part of ephemeral data cover type is stored into Operational Zone, it is then, embedded System wipes second part of ephemeral data in global buffer, and starts to decompress the 3rd KB data in 3KB, and decompression obtains Third part ephemeral data be stored in global buffer, then third part ephemeral data cover type is stored into Operational Zone, This three parts of ephemeral datas form new version application layer program in Operational Zone.
Referring to Figure 1, Fig. 1 show the method for upgrading software of embedded system in the embodiment of the present invention one kind it is possible The flow diagram of embodiment.It should be noted that the flow chart is only used for understanding the method for the embodiment of the present invention, and not For limiting the method in the embodiment of the present invention.In the specific implementation process, each step shown in FIG. 1 can be according to practical need It is deleted, or increases new step.
Step 101, step 102, step 103, step 104 and step in a kind of possible embodiment, in Fig. 1 110 can be by embedded system by operation be stored in Operational Zone process control execute, step 105, step 106, step Rapid 107, step 108, step 109, which can be, passes through what the process control that operation boot section stores executed by embedded system.
Embodiment two
Based on the same inventive concept, the embodiment of the present invention provides a kind of embedded system, which includes non-easy The property lost memory and processor, the non-volatile memory configuration have boot section, Operational Zone and download area, and the boot section is for depositing Storage upgrading executes program, and the Operational Zone is for storing application layer program, and the download area is for storing upgrading compressed package.
Wherein, which is determining that the upgrading by running boot section storage is held when needing to be implemented updating operation Line program control executes the updating operation, which executes the updating operation and include:To the upgrading pressure of download area storage Contracting packet is unziped it to obtain new version application layer program, and is covered the Operational Zone using the new version application layer program and stored Application layer program.
In a kind of possible embodiment, which further includes memory, which has for embedding at this The global buffer of global buffering is realized in embedded system, which executes journey by running the upgrading of boot section storage Sequence control executes the updating operation, including:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein each The data that secondary decompression obtains are stored in the global buffer in turn;
After the completion of each decompression, the data cover formula which stores is stored to the Operational Zone, with The new version application layer program is formed in the Operational Zone.
In a kind of possible embodiment, which is also configured with upgrade information area, the upgrade information Area is used to store the check information of the upgrading compressed package, and the check information of upgrade information area storage is to download the upgrading compressed package It is determined when to the download area by the embedded system, which executes program by running the upgrading of boot section storage Control executes the updating operation, further includes:
Before the upgrading compressed package stored to the download area is unziped it to obtain new version application layer program, really Whether the check information recorded in the fixed upgrading compressed package is consistent with the check information of upgrade information area storage;If it is not, then stopping Only execute the updating operation.
In a kind of possible embodiment, which is also used to store upgrading instruction information, upgrading instruction Information is used to indicate whether to need to be implemented the updating operation, which is also used in the liter by running boot section storage Before grade execution process control executes the updating operation, the application layer program control by running Operational Zone storage is executed:
Upgrade request is received, and the upgrading compressed package is downloaded to the download area according to the upgrade request;Completing in downloading should After upgrading compressed package, upgrading instruction information is adjusted as instruction and needs to be implemented the updating operation, in the operation for embedded system Indicate that information determination needs to be implemented the updating operation according to the upgrading when upgrading executes program designation starting.
In a kind of possible embodiment, receives upgrade request, downloading upgrading compressed package, determines check information and adjustment These operations of upgrading instruction information can be embedded system and pass through the application of Operational Zone storage in operation nonvolatile memory Layer process control executes.
Embodiment three
Based on the same inventive concept, the embodiment of the present invention provides a kind of embedded system, which includes non-easy The property lost memory, the non-volatile memory configuration have boot section, Operational Zone and download area, wherein the boot section is configured with liter Grade execution module, the Operational Zone are configured with application layer module, and the download area is for storing upgrading compressed package.
The upgrade execution module of boot section configuration is used for:When determination needs to be implemented updating operation, upgrading behaviour is executed Make, wherein executing the updating operation includes:The upgrading compressed package of download area storage is unziped it to obtain new version Application layer module, and the application layer module that the Operational Zone configures is updated using the new version application layer module.
In a kind of possible embodiment, which further includes memory, which has for embedding at this The global buffer of global buffering is realized in embedded system, which is specifically used for:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein each The data that secondary decompression obtains are stored in the global buffer in turn;Also, after the completion of each decompression, which is buffered The data cover formula of area's storage is stored to the Operational Zone, to form the new version application layer module in the Operational Zone.
In a kind of possible embodiment, which is also configured with upgrade information area, the upgrade information Area is used to store the check information of the upgrading compressed package, and the check information of upgrade information area storage is to download the upgrading compressed package It is determined when to the download area by the embedded system, which is also used to:
Before the upgrading compressed package stored to the download area is unziped it to obtain new version application layer module, really Whether the check information recorded in the fixed upgrading compressed package is consistent with the check information of upgrade information area storage;If it is not, then stopping Only execute the updating operation.
In a kind of possible embodiment, which is also used to store upgrading instruction information, upgrading instruction Information is used to indicate whether to need to be implemented the updating operation, and the application layer module of Operational Zone configuration is used for:
Before the upgrade execution module executes the updating operation, upgrade request is received, and download according to the upgrade request The upgrading compressed package is to the download area;After the upgrading compressed package is completed in downloading, upgrading instruction information is adjusted as instruction needs The updating operation is executed, needs to be implemented upgrading behaviour to indicate that information determines according to the upgrading in embedded system starting Make.
Example IV
Based on the same inventive concept, the embodiment of the present invention provides a kind of nonvolatile memory, wherein this is non-volatile to deposit Reservoir is configured with boot section, Operational Zone and download area, which executes program for storing upgrading, and the Operational Zone is for storing Application layer program, the download area is for storing upgrading compressed package, when the program of nonvolatile memory storage is in embedded system When being run on system, so that embedded system executes the method for upgrading software of embedded system described in embodiment one kind.
In the specific implementation process, the nonvolatile memory can be Flash, PROM, EAROM, EPROM, EEPROM etc., also, the nonvolatile memory can integrate in embedded systems.
In the embodiment of the present invention, the non-volatile memory configuration of embedded system has boot section, Operational Zone and download area, Boot section executes program for storing to upgrade, and Operational Zone upgrades compressed package for storing for storing application layer program, download area, Determining that the upgrading execution process control stored by operation boot section executes updating operation, i.e., when needing to be implemented updating operation It is executed by the process control of operation boot section storage:The upgrading compressed package of download area storage is unziped it to obtain new edition This application layer program, and use the application layer program of new version application layer program covering Operational Zone storage.
Due to having carried out partition to nonvolatile memory, the data of the memory block not upgraded in escalation process will not be by It to influence, still is able to operate normally, for example, the operation that the upgrading of boot section executes program is unaffected.In this way, being just not required to Upgrading is executed program in upgrading to be loaded into memory, reduce the demand to memory storage amount in embedded system, save About cost.
Further, due to upgrading compressed package and the original application layer program in Operational Zone be all stored in always it is non-volatile In memory, thus even if powering off, the loss of vital data in embedded system will not be led to, after a loss of power, only Upgrading can be smoothly completed by needing to restart execution updating operation.Also, due to not needing to add entire application layer program It is downloaded in memory or additional nonvolatile memory, reduces the demand in escalation process to amount of storage in embedded system, Cost is saved.
Further, the upgrading compressed package of downloading is smaller compared to unpressed new version application layer program occupied space, Reduce the demand in escalation process to amount of storage in embedded system, saves cost.
Further, upgrading compressed package is decompressed by several times with preset decompression data volume in the embodiment of the present invention Contracting, the global buffer that the ephemeral data that each decompression obtains is stored in memory in turn.Due to decompressing acquisition every time Ephemeral data it is smaller, thus when original memory just can satisfy upgrading in embedded system, stores the demand of temporary file, It does not need additionally to expand memory.
Also, in the embodiment of the present invention, configuration global buffer executes journey for storing ephemeral data, in addition to operation upgrades It can be used when sequence outside the global buffer, can also use the global buffer when running other programs.By configuring energy The global buffer being enough multiplexed realizes the efficient utilization of memory source, reduces the demand to amount of storage in embedded system, Cost is saved.
It further, further include verifying upgrading compressed package before decompression upgrades compressed package in the embodiment of the present invention Operation, by the verifying to upgrading compressed package, the upgrading compressed package that can be avoided service failure, which carries out upgrading, leads to embedded system The risk of operation troubles occurs for system.
The apparatus embodiments described above are merely exemplary, wherein units/modules as illustrated by the separation member It may or may not be physically separated, the component shown as units/modules may or may not be Physical unit/module, it can it is in one place, or may be distributed in multiple network unit/modules.It can basis It is actual to need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill people Member is without paying creative labor, it can understands and implements.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that:It still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of method for upgrading software of embedded system, the embedded system include nonvolatile memory, feature exists In the non-volatile memory configuration has boot section, Operational Zone and download area, and the boot section executes journey for storing upgrading Sequence, the Operational Zone upgrade compressed package for storing for storing application layer program, the download area, the method includes:
Determining that the upgrading by running the boot section storage executes process control and executes when needing to be implemented updating operation The updating operation, wherein described to execute the updating operation and include:To the download area storage the upgrading compressed package into Row decompression covers the Operational Zone storage using the new version application layer program to obtain new version application layer program Application layer program.
2. the method as described in claim 1, which is characterized in that the embedded system further includes memory, the memory configurations There is the global buffer for realizing global buffering in the embedded system, to the upgrading pressure of download area storage Contracting packet unzips it to obtain new version application layer program, and covers the Operational Zone using the new version application layer program The application layer program of storage, including:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein each time The data that decompression obtains are stored in the global buffer in turn;
After the completion of each decompression, the data cover formula that the global buffer stores is stored to the Operational Zone, with The new version application layer program is formed in the Operational Zone.
3. method according to claim 1 or 2, which is characterized in that the nonvolatile memory is also configured with upgrade information Area, the upgrade information area are used to store the check information of the upgrading compressed package, the verification letter of the upgrade information area storage It is determined when breath downloads the upgrading compressed package to the download area by the embedded system, it is described to execute the upgrading behaviour Work further includes:
Before unziping it the upgrading compressed package that the download area stores to obtain new version application layer program, really Whether the check information recorded in the fixed upgrading compressed package is consistent with the check information of upgrade information area storage;
If it is not, then stopping executing the updating operation.
4. method as claimed in claim 3, which is characterized in that the upgrade information area is also used to store upgrading instruction information, The upgrading instruction information is used to indicate whether to need to be implemented the updating operation, be stored described by running the boot section The upgrading execute before program executes the updating operation, the method also includes:
Upgrade request is received, and the upgrading compressed package is downloaded to the download area according to the upgrade request;
After the upgrading compressed package is completed in downloading, adjusting the upgrading instruction information is that instruction needs to be implemented the upgrading behaviour Make, to indicate that information determination needs to be implemented the updating operation according to the upgrading in embedded system starting.
5. a kind of embedded system, the embedded system includes nonvolatile memory and processor, which is characterized in that described Non-volatile memory configuration has boot section, Operational Zone and download area, and the boot section executes program for storing upgrading, described Operational Zone is for storing application layer program, and the download area is for storing upgrading compressed package;
Wherein, the processor passes through the upgrading for running the boot section storage when determination needs to be implemented updating operation It executes process control and executes the updating operation, the processor executes the updating operation and includes:The download area is stored The upgrading compressed package unzip it to obtain new version application layer program, and covered using the new version application layer program Cover the application layer program of the Operational Zone storage.
6. embedded system as claimed in claim 5, which is characterized in that the embedded system further includes memory, described interior It deposits configured with for realizing the global buffer of global buffering in the embedded system, the processor passes through described in operation The upgrading of boot section storage executes process control and executes the updating operation, including:
With preset decompression data volume, the upgrading compressed package of download area storage is unziped it by several times, wherein each time The data that decompression obtains are stored in the global buffer in turn;
After the completion of each decompression, the data cover formula that the global buffer stores is stored to the Operational Zone, with The new version application layer program is formed in the Operational Zone.
7. such as embedded system described in claim 5 or 6, which is characterized in that the nonvolatile memory is also configured with liter The grade information area, the upgrade information area are used to store the check information of the upgrading compressed package, the upgrade information area storage It is determined when check information downloads the upgrading compressed package to the download area by the embedded system, the processor is logical The upgrading execution process control execution updating operation for running the boot section storage is crossed, further includes:
Before unziping it the upgrading compressed package that the download area stores to obtain new version application layer program, really Whether the check information recorded in the fixed upgrading compressed package is consistent with the check information of upgrade information area storage;
If it is not, then stopping executing the updating operation.
8. embedded system as claimed in claim 7, which is characterized in that the upgrade information area is also used to store upgrading instruction Information, the upgrading indicate that information is used to indicate whether to need to be implemented the updating operation, and the processor is also used to passing through Before running the upgrading execution process control execution updating operation of the boot section storage, passes through and run the operation The application layer program of area's storage, which controls, to be executed:
Upgrade request is received, and the upgrading compressed package is downloaded to the download area according to the upgrade request;
After the upgrading compressed package is completed in downloading, adjusting the upgrading instruction information is that instruction needs to be implemented the upgrading behaviour Make, indicates that information determines need according to the upgrading when executing program designation starting with the upgrading described in the operation for embedded system Execute the updating operation.
9. a kind of embedded system, the embedded system includes nonvolatile memory, which is characterized in that described non-volatile Memory is configured with boot section, Operational Zone and download area, wherein the boot section is configured with upgrade execution module, the operation Area is configured with application layer module, and the download area is used for for storing upgrading compressed package, the upgrade execution module:
When determination needs to be implemented updating operation, the updating operation is executed, wherein executing the updating operation includes:To institute The upgrading compressed package for stating download area storage is unziped it to obtain new version application layer module, and uses the new version Application layer module updates the application layer module of the Operational Zone configuration.
10. a kind of nonvolatile memory, it is characterised in that:
The non-volatile memory configuration has boot section, Operational Zone and download area, and the boot section is executed for storing upgrading Program, the Operational Zone is for storing application layer program, and the download area is for storing upgrading compressed package, when described non-volatile The program of memory storage in embedded system when running, so that embedded system is executed such as any one of claim 1-4 The method.
CN201810581933.2A 2018-06-07 2018-06-07 A kind of method for upgrading software and embedded system of embedded system Pending CN108897564A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810581933.2A CN108897564A (en) 2018-06-07 2018-06-07 A kind of method for upgrading software and embedded system of embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810581933.2A CN108897564A (en) 2018-06-07 2018-06-07 A kind of method for upgrading software and embedded system of embedded system

Publications (1)

Publication Number Publication Date
CN108897564A true CN108897564A (en) 2018-11-27

Family

ID=64344178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810581933.2A Pending CN108897564A (en) 2018-06-07 2018-06-07 A kind of method for upgrading software and embedded system of embedded system

Country Status (1)

Country Link
CN (1) CN108897564A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743375A (en) * 2018-12-27 2019-05-10 广东省气象计算机应用开发研究所 The noninductive update method of automatic weather station firmware based on wireless network divided stator frame
CN109918188A (en) * 2019-03-27 2019-06-21 网易(杭州)网络有限公司 Switching method, device, electronic equipment and the storage medium of game mode
CN111124461A (en) * 2019-12-12 2020-05-08 青岛海尔科技有限公司 Method and device for OTA (over the air) upgrade of single chip microcomputer and single chip microcomputer
CN111240723A (en) * 2020-03-13 2020-06-05 乐普医学电子仪器股份有限公司 Method for upgrading embedded program
CN111367541A (en) * 2018-12-25 2020-07-03 北京兆易创新科技股份有限公司 eMMC and eMMC upgrading method
CN113031998A (en) * 2021-02-26 2021-06-25 芜湖美的厨卫电器制造有限公司 Method, processor, electronic device and storage medium for system upgrade
WO2022241589A1 (en) * 2021-05-16 2022-11-24 华为技术有限公司 Controller software architecture, controller software upgrading method, controller, and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN105786510A (en) * 2016-02-29 2016-07-20 深圳市美贝壳科技有限公司 Upgrading and partitioning system and security upgrading method for single-chip microcomputer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN105786510A (en) * 2016-02-29 2016-07-20 深圳市美贝壳科技有限公司 Upgrading and partitioning system and security upgrading method for single-chip microcomputer

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367541A (en) * 2018-12-25 2020-07-03 北京兆易创新科技股份有限公司 eMMC and eMMC upgrading method
CN109743375A (en) * 2018-12-27 2019-05-10 广东省气象计算机应用开发研究所 The noninductive update method of automatic weather station firmware based on wireless network divided stator frame
CN109918188A (en) * 2019-03-27 2019-06-21 网易(杭州)网络有限公司 Switching method, device, electronic equipment and the storage medium of game mode
CN111124461A (en) * 2019-12-12 2020-05-08 青岛海尔科技有限公司 Method and device for OTA (over the air) upgrade of single chip microcomputer and single chip microcomputer
CN111124461B (en) * 2019-12-12 2023-08-18 青岛海尔科技有限公司 Method and device for upgrading OTA (over the air) of singlechip and singlechip
CN111240723A (en) * 2020-03-13 2020-06-05 乐普医学电子仪器股份有限公司 Method for upgrading embedded program
CN113031998A (en) * 2021-02-26 2021-06-25 芜湖美的厨卫电器制造有限公司 Method, processor, electronic device and storage medium for system upgrade
WO2022241589A1 (en) * 2021-05-16 2022-11-24 华为技术有限公司 Controller software architecture, controller software upgrading method, controller, and device

Similar Documents

Publication Publication Date Title
CN108897564A (en) A kind of method for upgrading software and embedded system of embedded system
CN101425018B (en) Embedded firmware upgrading method and device based on sectional form
EP3189415B1 (en) Method for adapting firmware of a wireless communication device
EP2998861B1 (en) Implementing and deleting method and device for intelligent terminal multi-operation system
JP4791061B2 (en) Firmware version management method and information processing apparatus for computer system
US11360758B2 (en) Communication processing device, information processing device, and communication processing device control method
US9710340B2 (en) Replacement of a corrupt driver variable record
CN106055346A (en) Vehicle control storage methods and systems
CN110196729B (en) Application program updating method, device and apparatus and storage medium
CN111796848A (en) Bootloader software updating method and device, embedded controller and storage medium
CN107643898A (en) Terminal staging method and device
CN101330695A (en) Mobile terminal as well as system upgrade method and device thereof
EP2199994A1 (en) Portable electronic device
CN103392174B (en) Based on the system of flash memory storage, partition method and device
CN102508782A (en) Data read-write method, data read-write device, memory bank and network equipment
CN103761126A (en) Method and device for upgrading application program
CN112199109B (en) Firmware upgrading method, device, equipment and medium
JP7231807B2 (en) Communication device and information processing method
CN103488492A (en) Reader equipment and firmware update method and device thereof
US20070079279A1 (en) Embedded device with software registry
JP7239413B2 (en) EMBEDDED COMMUNICATION BOARD, COMMUNICATION TERMINAL, AND FIRMWARE UPDATE METHOD
CN112860287A (en) System program upgrading method and device, computer equipment and storage medium
US20050138320A1 (en) Memory allocation unit
CN109976940A (en) A kind of soft start network equipment
EP3324655A1 (en) Method for managing a patch of a sofware component in a euicc

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200107

Address after: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou, Guangzhou economic and Technological Development Zone, Guangdong Province, No. 10

Applicant after: Jingxin Communication System (China) Co., Ltd.

Address before: 510663 Shenzhou Road, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangdong, 10

Applicant before: Jingxin Communication System (China) Co., Ltd.

Applicant before: Jingxin Communication System (Guangzhou) Co., Ltd.

Applicant before: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

TA01 Transfer of patent application right
CB02 Change of applicant information

Address after: 510663 No.10, Shenzhou Road, Guangzhou Science City, Guangzhou Economic and Technological Development Zone, Guangdong Province

Applicant after: Jingxin Network System Co.,Ltd.

Address before: 510663 No.10, Shenzhou Road, Guangzhou Science City, Guangzhou Economic and Technological Development Zone, Guangdong Province

Applicant before: Comba Telecom System (China) Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20181127

RJ01 Rejection of invention patent application after publication