CN104375863A - Program online upgrading method in embedded system - Google Patents

Program online upgrading method in embedded system Download PDF

Info

Publication number
CN104375863A
CN104375863A CN201410648243.6A CN201410648243A CN104375863A CN 104375863 A CN104375863 A CN 104375863A CN 201410648243 A CN201410648243 A CN 201410648243A CN 104375863 A CN104375863 A CN 104375863A
Authority
CN
China
Prior art keywords
root
upgrading
program
district
online upgrading
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
CN201410648243.6A
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201410648243.6A priority Critical patent/CN104375863A/en
Publication of CN104375863A publication Critical patent/CN104375863A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a program online upgrading method in an embedded system. The program online upgrading requirement always exists in the embedded system. If upgrading is failed due to accidents in the upgrading process, serious consequences may be caused. For example, if a program in a power line communication module of a smart power grid is crashed, serious faults of an electric power system will be caused. By means of the program online upgrading method, equal standby operation and ping-pong operation are adopted for key components of the program, crashing, caused by failed upgrading, of the program can be avoided, the upgrading time is shortened, and therefore influences on the system are reduced.

Description

A kind of method of online upgrading program in embedded system
Technical field
The present invention relates to embedded system and field of power line communication, especially the on-line software updating of suitable power line communication module.
Background technology
In various embedded system, usually use one piece of nonvolatile memory (commonly flash) as the storage space of program (or title software).Due to edition upgrading (revision mistake, increase function etc.), this part program wants online upgrading unavoidably.Program generally can be divided into two parts: application function district (being called for short APP district herein), system start and upgrade functional areas (being called for short ROOT) district.
Inevitably run into accident in escalation process and interrupt, such as power down, communication disruption etc.This situation is dealt with improperly and systemic-function disappearance can be caused even to collapse, and consequence is serious.Such as, power line communication module can be used in the monitor network of intelligent grid, once cause afunction because upgrading failure, can cause electric power system fault and even paralysis.
For the upgrading of APP, if break in midway, can redo and not have too large impact; To the upgrading of ROOT, when needing to ensure to break in midway, system still can be run.So the robustness of the upgrading of ROOT will be ensured, reduce the erasable time to ROOT as far as possible simultaneously.Why to reduce the erasable of ROOT, be because system can not have response to external world during this period of time, be likely to miss the event that some are important.This is risky to operating system, such as intelligent grid.
Common a kind of way is, adopt a Ge Zhu ROOT district and a backup ROOT district, each upgrading is wanted successively all to carry out single job to the two.Method object herein, the while of ensureing robustness, reduces the operation of ROOT further.
Summary of the invention
In order to reduce the impact on system in ROOT escalation process as far as possible, a kind of method is proposed: adopt the ROOT district that two pieces reciprocity, ping-pong operation and use herein.
Concrete grammar is:
The program space is divided into an APP district, Liang Ge ROOT district.The upgrading of APP adopts common methods.The upgrading of ROOT uses and adopts ping-pong.Please refer to Fig. 1, step is: (1) originally program uses first ROOT (being called for short ROOT0 herein), and another (being called for short ROOT1) is idle; (2) during first time upgrading ROOT, ROOT0 is constant, upgrades ROOT1 until success; (3) system uses ROOT1 and APP to run; (4) during second time upgrading ROOT, ROOT1 is constant, upgrades ROOT0 until success; (5) system uses ROOT0 and APP to run; (6) if after this upgrade ROOT again, roughly the same (2) ~ (5) step, so repeatedly.
Simplify because ROOT district generally compares, and the general volume ratio of nonvolatile memory (such as NOR flash) is comparatively large now, so the space hold that multiplex one piece of ROOT district causes is smaller.And the beneficial effect that it brings is: (1) ensures to have at least one piece of ROOT to be available all the time, ensure that the robustness of system.(2) each upgrading ROOT only need carry out erasable to a ROOT, at utmost shortens the time that system external does not respond; And common way is one, primary area backup area, each upgrading all will be carried out erasable to the two, and the time is longer by contrast, and operate more complicated, the probability of makeing mistakes is larger.
Here the code comprising system and start and upgrade made a general reference in general embedded system in abbreviation " ROOT district ", from starting here during system electrification.
Accompanying drawing explanation
Program space State Transferring when Fig. 1 is each upgrading ROOT;
Fig. 2 is the relay processes of case Program function call when normally running;
Fig. 3 is operating process when upgrading ROOT in case.
Embodiment
Early-stage preparations: owing to being select a use in two ROOT, so need to ensure can correctly hit ROOT used at present when function call.Here function call is divided three classes---within APP, within ROOT, between APP and ROOT.First two does not need extra consideration, and the third can use relay function between call-and-return, makes the ROOT that the jump address of program can correctly be hit.As the procedure division of Fig. 2, after system electrification, first group of jump instruction can select that address effective from two base address of ROOT, jumps to this ROOT according to this address.Two base address root0_base and root1_base just deposit in the latter half of jump instruction, and immediately thereafter be the relay function call_relay () called and the relay function ret_relay () returned.When working procedure calls between APP and certain ROOT, the calculating of jump address can be carried out through these two functions, obtain correct jump address by according to rootX_base thus hit ROOT used in calculating.What in figure, arrow line represented is calls from APP the process that ROOT returns again; From ROOT call APP process can the rest may be inferred.
The flow process upgrading certain ROOT please refer to Fig. 3.ROOT1 is upgraded to run ROOT0.Can run in normal operation and upgrade demand, so start the renewal to ROOT1.Restart as accident, although then ROOT1 upgrades unsuccessful but still can run from ROOT0; Later long-range meeting continues to require online updating until complete.After ROOT1 refreshes, can arrange the mark successfully upgraded in the root1_base in redirect district that powers on, it is invalid then the mark of root0_base to be set to.Because this one-phase last first puts root1_base to put root0_base effectively more invalid, even if so meet accident power-off during this, the two at least has one is effective, thus still can normally run after ensureing to restart.
Above embodiment and case study on implementation are only be described invention, but the present invention is not limited thereto.For those skilled in the art, also protection scope of the present invention is considered as not departing from the various improvement outside inventive concept scope.

Claims (4)

1. a kind of method of online upgrading program in embedded system, is characterized in that, be divided into two class regions in the program space---APP district and ROOT district.The former adopts conventional update mode to upgrade; The latter adopts two pieces of reciprocity ROOT districts, needs only to upgrade one of them when upgrading ROOT district at every turn, and another is constant, if be updated successfully, uses new ROOT district, otherwise uses original ROOT district, again upgrade after treating.
2. the method for online upgrading program according to claim 1, is characterized in that: Liang Kuai ROOT district is reciprocity, regardless of principal and subordinate.
3. the method for online upgrading program according to claim 1, is characterized in that: Liang Kuai ROOT district is not when upgrading, and the program in a piece is in operation, and the program of another block is not run (free time); When upgrading, idle that will be upgraded.
4. the method for online upgrading program according to claim 1, it is characterized in that: every block ROOT is arranged and upgrades successfully mark, time program brings into operation (power on or restart), can determine which ROOT is up-to-date and effective thus, and jump to this ROOT district and continue to run.
CN201410648243.6A 2014-11-17 2014-11-17 Program online upgrading method in embedded system Pending CN104375863A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410648243.6A CN104375863A (en) 2014-11-17 2014-11-17 Program online upgrading method in embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410648243.6A CN104375863A (en) 2014-11-17 2014-11-17 Program online upgrading method in embedded system

Publications (1)

Publication Number Publication Date
CN104375863A true CN104375863A (en) 2015-02-25

Family

ID=52554803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410648243.6A Pending CN104375863A (en) 2014-11-17 2014-11-17 Program online upgrading method in embedded system

Country Status (1)

Country Link
CN (1) CN104375863A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005492A (en) * 2015-08-17 2015-10-28 上海斐讯数据通信技术有限公司 Embedded equipment and software upgrading method
CN105511976A (en) * 2015-12-01 2016-04-20 长城信息产业股份有限公司 Embedded system application program self-recovery operation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043634A (en) * 2009-10-23 2011-05-04 康佳集团股份有限公司 Embedded system and embedded software upgrading method
CN102075564A (en) * 2010-12-23 2011-05-25 李华嵩 Remote software upgrading technique
CN102486733A (en) * 2010-12-03 2012-06-06 中兴通讯股份有限公司 Method and device for upgrading boot program
CN103152206A (en) * 2013-03-25 2013-06-12 安科智慧城市技术(中国)有限公司 Method and system for updating multiple devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043634A (en) * 2009-10-23 2011-05-04 康佳集团股份有限公司 Embedded system and embedded software upgrading method
CN102486733A (en) * 2010-12-03 2012-06-06 中兴通讯股份有限公司 Method and device for upgrading boot program
CN102075564A (en) * 2010-12-23 2011-05-25 李华嵩 Remote software upgrading technique
CN103152206A (en) * 2013-03-25 2013-06-12 安科智慧城市技术(中国)有限公司 Method and system for updating multiple devices

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彭井花 等: "基于GPRS的嵌入式系统软件的远程在线升级", 《现代电子技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005492A (en) * 2015-08-17 2015-10-28 上海斐讯数据通信技术有限公司 Embedded equipment and software upgrading method
CN105005492B (en) * 2015-08-17 2018-06-19 上海斐讯数据通信技术有限公司 A kind of embedded device and a kind of method for upgrading software
CN105511976A (en) * 2015-12-01 2016-04-20 长城信息产业股份有限公司 Embedded system application program self-recovery operation method and device

Similar Documents

Publication Publication Date Title
CN106569847B (en) Method for vehicle-mounted system to realize IAP remote upgrade based on mobile network
CN104090796B (en) A kind of embedded device method for updating program and system
CN102033790B (en) Method and device for upgrading embedded-type system BOOTROM
CN104750515A (en) Firmware version upgrading method and system
CN103488498A (en) Computer booting method and computer
US20140344620A1 (en) Shutdown method, startup method, and communication terminal
CN102110000A (en) Method, device and equipment for controlling software for auto-updating
CN105278998A (en) Single-chip microcomputer hardware upgrading method
CN104166577B (en) A kind of method and apparatus of mobile terminal system upgrading
CN102023876A (en) Embedded system capable of upgrading software on line and online upgrading method
CN109240720B (en) Firmware upgrading method of android system and storage device
CN102073517A (en) Upgrading and backup method and device for embedded system
CN106775610B (en) Electronic equipment starting method and electronic equipment
JP2010541105A (en) Firmware image update and management
CN101594613A (en) The method of terminal equipment and upgrading thereof, system
CN101950254B (en) Software updating method and system thereof
CN102243594A (en) Method for safely and remotely upgrading embedded Linux system software
CN111078471B (en) System fault recovery method and device for display device and computer storage medium
CN102722408B (en) Method and apparatus for communication equipment software update
CN102567135A (en) Refreshing/recovering method and electronic equipment
CN111767172A (en) Self-repairing method for set top box based on watchdog and bootloader
CN102073508A (en) Method and apparatus for upgrading terminals and software thereof
CN102855149A (en) Chip operating system update method, device and system
CN104375863A (en) Program online upgrading method in embedded system
CN104750516A (en) Upgrading method for terminal equipment operating system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150225

RJ01 Rejection of invention patent application after publication