CN1536488A - Method of network up-grade embedded system firm ware - Google Patents

Method of network up-grade embedded system firm ware Download PDF

Info

Publication number
CN1536488A
CN1536488A CNA031161863A CN03116186A CN1536488A CN 1536488 A CN1536488 A CN 1536488A CN A031161863 A CNA031161863 A CN A031161863A CN 03116186 A CN03116186 A CN 03116186A CN 1536488 A CN1536488 A CN 1536488A
Authority
CN
China
Prior art keywords
firmware
program
firmware program
flash
bsp
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
CNA031161863A
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.)
SHANGHAI JIAODA DATONG ELECTRONIC INFORMATION CO Ltd
Original Assignee
SHANGHAI JIAODA DATONG ELECTRONIC INFORMATION 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 SHANGHAI JIAODA DATONG ELECTRONIC INFORMATION CO Ltd filed Critical SHANGHAI JIAODA DATONG ELECTRONIC INFORMATION CO Ltd
Priority to CNA031161863A priority Critical patent/CN1536488A/en
Publication of CN1536488A publication Critical patent/CN1536488A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method to upgrade system firmware by network, where the system includes ROM (read-only memory) to store system BSP (board supporting program), FLASH (flash memory) to store system firmware and RAM (random access memory) to real-timely run program, and the method includes the following steps: write effective program position mark in primary memory space of FLASH and divide the following memory space into a first firmware program position and a second one; load the firmware program in the first or second firmware program position in BSP according to effective program position mark; execute the loaded first or second firmware program in RAM.

Description

The method of network upgrade embedded system firmware
Technical field
The present invention relates to embedded system, particularly, relate to the embedded system firmware upgrade method.
Background technology
As everyone knows, the firmware in the embedded system needs upgrading every now and then, so as after product issue still scalable its function or revise its mistake, this upgrading has many use FLASH (flash memory) to carry out.Yet along with popularizing of network, the function of an embedded system network enabled firmware updating has had outstanding meaning.This be because, industrial network environment complexity, wide coverage, field maintemance cost height, even under wireless environment embedded system device all in moving, in uncertain place, may not find each equipment to carry out field maintemance, so the network upgrade firmware just become very necessary.It makes plant maintenance and upgrading under the network environment become easily quick, also lays good basis for the systemic-function extensibility.
As shown in Figure 1, but the embedded system of present network upgrade firmware, generally comprise ROM (ROM (read-only memory)), FLASH (flash memory) and RAM (random access memory) several sections, wherein, ROM (ROM (read-only memory)) is used for the BSP (Board Support Program circuit board hardware supported program) of storage system, it is first program that system powers on and carries out, and the effect of BSP (circuit board hardware supported program) provides the system hardware driving, in addition the firmware among the Flash (flash memory) is loaded among the RAM (random access memory) and goes, carry out this firmware then; Flash is used for the firmware of storage system, and its inside has generally included embedded OS and application program two parts; RAM (random access memory) is the place of system's real time execution program.
Because BSP (circuit board hardware supported program) is relevant with the hardware composition in the system usually, as long as hardware is constant, BSP (circuit board hardware supported program) just need not become, and therefore also need not upgrade; And the preparation of operating system, the concrete function code of application program is the main object of system upgrade often, and therefore, the firmware of the usefulness redaction that so-called firmware upgrade just is meant is replaced this part content, like this, has just reached purpose of upgrading after system restarts.
But the success ratio of network upgrade firmware is lower at present, and reason has following three aspects:
1) instability of network: which kind of network environment no matter, all exist a lot of labile factors, write Flash (flash memory) if use the limit to download new firmware limit, just in case network breaks suddenly, the new firmware among the Flash (flash memory) just becomes incomplete segment.Restarting the back just can not true(-)running, and total system is rendered as the deadlock state.
2) write the instability of Flash (flash memory): general Flash (flash memory) has a characteristic, reading exactly can be unlimited, and the number of times of writing is limited, for example good 100,000 times, and 1,000 times of difference, just can not write again above writing the number of times upper limit, and the success ratio that the Flash (flash memory) of a lot of brands writes is not high, reads out verification again after must having write, yet the such data of firmware are just in case make mistakes, rewrite surpassing certain number of times have to abandon, and causes the imperfect and system in case of system halt of firmware equally.
3) meet accident in escalation process power down or restart because of other labile factors of the equipment that is upgraded stops finishing of upgrading, causes the imperfect and system in case of system halt of firmware equally.
Summary of the invention
The method that the purpose of this invention is to provide a kind of network upgrade embedded system firmware is utilized the double copies technology that the success ratio of network upgrade is improved a lot, thereby can greatly be brought into play the extensibility of embedded system and function capable of long-distance maintenance.
For achieving the above object, the invention provides a kind of method of network upgrade embedded system firmware, this system comprises the ROM (ROM (read-only memory)) that is used for storage system BSP (circuit board hardware supported program), the RAM (random access memory) that is used for the FLASH (flash memory) of storage system firmware and is used for the real time execution program, this method may further comprise the steps: the foremost at FLASH (flash memory) writes the effective procedure tick lables, and will be divided into first firmware program position and second firmware program position thereafter; At BSP (circuit board hardware supported program) according to the effective procedure tick lables with the firmware program first or second firmware program position of packing into; In RAM (random access memory), carry out this first or second firmware program of packing into.
Describedly pack into the step of first or second firmware program position of firmware program is also comprised the step that reads the effective procedure tick lables at BSP (circuit board hardware supported program).
The present invention also comprises when the first and second two firmware program positions are all invalid makes BSP (circuit board hardware supported program) start the step of download firmware program.
The step of described download firmware program comprises: start the reception firmware program; After receiving successfully, reads firmware program the effective procedure tick lables; According to the active position sign with the firmware program burning that receives corresponding first or the second place; Restarting systems.
Above-mentioned steps also is included in the step that the effective procedure tick lables is rewritten in firmware program burning success back.
Description of drawings
Fig. 1 is that the structure of present embedded system is formed synoptic diagram.
Fig. 2 is that the structure of embedded system of the present invention is formed synoptic diagram.
Fig. 3 is BSP of the present invention (circuit board hardware supported program) FB(flow block).
Fig. 4 is a download firmware mission flow diagram of the present invention.
Embodiment
The present invention is directed to the low basic reason of firmware upgrade success ratio, be that labile factor causes the incomplete characteristic of firmware, designed the method for double copies handoff technique network upgrade firmware, consult Fig. 2, its basic thought is to adopt the method that enlarges Flash (flash memory) capacity, promptly just adopts the Flash (flash memory) of the twice size that definitely can admit maximum sized firmware in hardware design.Concrete steps comprise Flash (flash memory) are divided into two, the foremost is with imitating the program point sign, rewrite BSP (circuit board hardware supported program) then, before loading process originally, add and judge that effective zone bit decides the logic of loading which piece firmware, and behind network download new edition firmware, also add when being burnt to Flash (flash memory) and judge that the decision of effective marker position is burnt to the logic of that idle piece program point, like this, though various labile factors still exist, but be unlikely to cause just in case burning failure just must only need retry once all right to the on-the-spot more misery of exchange device.
Fig. 3 is the process flow diagram of BSP of the present invention (circuit board hardware supported program), as seen from the figure, BSP of the present invention (circuit board hardware supported program) is after powering on and carrying out hardware initialization, add a step of reading the effective procedure tick lables, arrange among the figure, 0x55 represents that first firmware in the firmware program position is effective, 0xAA represents that second firmware in the firmware program position is effective, when the value of reading next stepping when the 0x55 goes into to load first firmware program, and with pack into RAM (random access memory) and carry out this first firmware program of this firmware; In like manner, when then pack into when the 0xAA second firmware program and carrying out and the corresponding program in RAM (random access memory) thereafter of the value of reading; In addition, show also among the figure that when reading other value that is different from above-mentioned 0x55 or 0xAA, program then enters the task module of the firmware that waits for downloads.
Fig. 4 is a download firmware mission flow diagram of the present invention, in general must realize in firmware.As seen from the figure, download firmware program of the present invention comprises successively: start; Initialization; Download and wait for; The judgement of download command validity; Receive firmware program, and go to the step of reading the effective procedure tick lables after judgement receives successfully, wherein setting system after receiving for example three failures will restart; The main thought of following steps is that a new firmware is write free block, rewrites the active position sign then and makes it to point to next free block, and therefore, be that to write firmware unsuccessful or with imitating the unsuccessful execution that does not influence original firmware of tick lables.As implied above, because the existence of many labile factors,,, then can only abandon afterwards handling so in program, set the number of times that reattempts on failure for example show in the process flow diagram for three times.
Though the inventive method need be paid higher Flash (flash memory) cost, but it has but guaranteed the high success rate of system upgrade, and for the upgrading network equipment that has thousands of, even have only 1% mortality, the expense of on-the-spot more exchange device is just inestimable, and more need not talk and will find that equipment under wireless network environment and vehicle environment is the thing of trouble how.

Claims (5)

1, a kind of method of network upgrade embedded system firmware, this system comprises the ROM (ROM (read-only memory)) that is used for storage system BSP (circuit board hardware supported program), the RAM (random access memory) that is used for the FLASH (flash memory) of storage system firmware and is used for the real time execution program, this method may further comprise the steps:
Foremost at FLASH (flash memory) writes the effective procedure tick lables, and will be divided into first firmware program position and second firmware program position thereafter;
At BSP (circuit board hardware supported program) according to the effective procedure tick lables with the firmware program first or second firmware program position of packing into;
In RAM (random access memory), carry out this first or second firmware program of packing into.
2, the method for claim 1 is characterized in that, describedly at BSP (circuit board hardware supported program) pack into the step of first or second firmware program position of firmware program is also comprised the step that reads the effective procedure tick lables.
3, the method for claim 1 is characterized in that, also comprises when the first and second two firmware program positions are all invalid making BSP (circuit board hardware supported program) start the step of download firmware program.
4, method as claimed in claim 3 is characterized in that, the step of described download firmware program comprises: start the reception firmware program; After receiving successfully, reads firmware program the effective procedure tick lables; According to the active position sign with the firmware program burning that receives corresponding first or the second place; Restarting systems.
5, method as claimed in claim 4 is characterized in that, also is included in the step that the effective procedure tick lables is rewritten in firmware program burning success back.
CNA031161863A 2003-04-04 2003-04-04 Method of network up-grade embedded system firm ware Pending CN1536488A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA031161863A CN1536488A (en) 2003-04-04 2003-04-04 Method of network up-grade embedded system firm ware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA031161863A CN1536488A (en) 2003-04-04 2003-04-04 Method of network up-grade embedded system firm ware

Publications (1)

Publication Number Publication Date
CN1536488A true CN1536488A (en) 2004-10-13

Family

ID=34320265

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA031161863A Pending CN1536488A (en) 2003-04-04 2003-04-04 Method of network up-grade embedded system firm ware

Country Status (1)

Country Link
CN (1) CN1536488A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100386728C (en) * 2006-03-24 2008-05-07 清华大学 On-line software updating method of implantation medical equipment
CN102243587A (en) * 2010-05-14 2011-11-16 康佳集团股份有限公司 Method for upgrading read only memory (ROM) program in embedded system
CN102722420A (en) * 2011-10-25 2012-10-10 中国电力科学研究院 Self-diagnosis terminal, detection method and remote maintenance system
CN102752742B (en) * 2005-06-13 2016-05-18 高通股份有限公司 For managing the Apparatus and method for of the firmware verification on wireless device
CN106383692A (en) * 2016-08-25 2017-02-08 中山市天启智能科技有限公司 Single-chip microcomputer embedded equipment OTA upgrade method
WO2019148791A1 (en) * 2018-01-30 2019-08-08 江苏华存电子科技有限公司 Method for fast activation of firmware of flash memory, and short structure stored in flash memory
CN112069056A (en) * 2020-07-31 2020-12-11 江苏航天龙梦信息技术有限公司 UEFI firmware rich debugging method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752742B (en) * 2005-06-13 2016-05-18 高通股份有限公司 For managing the Apparatus and method for of the firmware verification on wireless device
CN100386728C (en) * 2006-03-24 2008-05-07 清华大学 On-line software updating method of implantation medical equipment
CN102243587A (en) * 2010-05-14 2011-11-16 康佳集团股份有限公司 Method for upgrading read only memory (ROM) program in embedded system
CN102722420A (en) * 2011-10-25 2012-10-10 中国电力科学研究院 Self-diagnosis terminal, detection method and remote maintenance system
WO2013060064A1 (en) * 2011-10-25 2013-05-02 中国电力科学研究院 Terminal for collecting electricity information and remote maintenance system
CN102722420B (en) * 2011-10-25 2014-12-03 中国电力科学研究院 Self-diagnosis terminal, detection method and remote maintenance system
CN106383692A (en) * 2016-08-25 2017-02-08 中山市天启智能科技有限公司 Single-chip microcomputer embedded equipment OTA upgrade method
WO2019148791A1 (en) * 2018-01-30 2019-08-08 江苏华存电子科技有限公司 Method for fast activation of firmware of flash memory, and short structure stored in flash memory
CN112069056A (en) * 2020-07-31 2020-12-11 江苏航天龙梦信息技术有限公司 UEFI firmware rich debugging method
CN112069056B (en) * 2020-07-31 2023-09-01 江苏航天龙梦信息技术有限公司 UEFI firmware enrichment debugging method

Similar Documents

Publication Publication Date Title
EP1084469B1 (en) Patching rebased and realigned executable files
CN101763894B (en) Semiconductor storage device and storage controlling method
AU757143B2 (en) Recoverable software installation process and apparatus for a computer system
CN101799763B (en) Method, device and system for patching kernel on line
CN1266597C (en) System for mounting and starting network application program
US20030163664A1 (en) Method and apparatus for updating a distributed program
GB2257538A (en) Air conditioning control.
CN100461105C (en) Update and repair method of intellectualized equipment and system thereof
CN1208718C (en) Computer system including memory access controller for using non-system memory storage resources during system boot time
CN101872306B (en) Embedded system for realizing software updating and software backup and implementation method thereof
US6948059B1 (en) Component loader for industrial control device providing resource search capabilities
CN106874357B (en) Resource customization method and device for Web application
CN100430894C (en) TV system software updating method with power-off protection
CN1536488A (en) Method of network up-grade embedded system firm ware
CN102053569A (en) Self refresh method and self-refresh device used for automotive electronic controller
CN106970778B (en) FPGA-based embedded device online configuration method and system
CN1786910A (en) BIOS on-line upgrading method
US7814261B2 (en) Flash memory and method of dynamically loading firmware operation module in optical drive
US6675198B1 (en) Network and network terminal
CN1658161A (en) System with primary application and spare program and starting method
CN100533404C (en) Method and system for prompting downloading data to single-chip target memory from computer
WO2007064524A2 (en) Adaptive data dictionary language, extendable for a security system
CN1317767A (en) Control method and electronic device thereof
CN1610894A (en) Method and apparatus for modifying the contents of a revision identification register
CN102867061A (en) System management method and system management device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication