CN104007996B - The authentic firmware upgrading of a kind of dcs realizes method - Google Patents

The authentic firmware upgrading of a kind of dcs realizes method Download PDF

Info

Publication number
CN104007996B
CN104007996B CN201410267711.5A CN201410267711A CN104007996B CN 104007996 B CN104007996 B CN 104007996B CN 201410267711 A CN201410267711 A CN 201410267711A CN 104007996 B CN104007996 B CN 104007996B
Authority
CN
China
Prior art keywords
aku
upgrade file
program
upgrading
jump
Prior art date
Application number
CN201410267711.5A
Other languages
Chinese (zh)
Other versions
CN104007996A (en
Inventor
齐翔
何国远
王鹏
齐羽心
孔宁
Original Assignee
南京融教科技有限公司
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 南京融教科技有限公司 filed Critical 南京融教科技有限公司
Priority to CN201410267711.5A priority Critical patent/CN104007996B/en
Publication of CN104007996A publication Critical patent/CN104007996A/en
Application granted granted Critical
Publication of CN104007996B publication Critical patent/CN104007996B/en

Links

Abstract

The invention provides a kind of authentic firmware upgrade method being applied in dcs, any controller node or main frame in system can be made to be owned by program upgrading ability, the extended capability of hardware device, system customization can be improved greatly, reduce later maintenance upgrade cost.Realize in the application the difference is that: target program bag receives with traditional method, and the packet of reception is first stored in stand-by program district, after target program bag receives and CRC check is passed through, parameter information labelling is generated in IAP mark zone, and call Bootloader to realize program upgrading, even if there is unpredictable failure in any link, old program will not be replaced, and greatly improves the stability of system.

Description

The authentic firmware upgrading of a kind of dcs realizes method

Technical field

The present invention relates to a kind of program firmware upgrade new method being applied to dcs field.

Background technology

Development along with electronic industry, node unit in dcs is more and more various, logic function is also done more complicated and more complicated, once find that the system being currently running Bug occurs or needs to change the situation of agreement newly added equipment, if there is no one reliablely and stablely on-the-spot program firmware more new tool, the vicious cycle of then system dismounting depot repair system heavy dressing work will be faced.Although present a lot of distributed systems both provide program firmware updating function, but the problem due to mechanism, this method often can be only done the upgrading to main frame, cannot be general in different types of node, and some system is once there is unexpected failure of upgrading in midway, the thorough inefficacy of system, the maintenance cost greatly added will be caused, can not embody the advantage of development in science and technology.As it is shown in figure 1, the dcs of a standard frequently include one can with the system host of PC communication, one or more bus, in bus carry several control or detection node.Whole distributed system also needs to formulate the transmission response transparent transmission mechanism of host computer-node, host computer-main frame, any one node in distributed system realizes program upgrading realizing upper function.

Summary of the invention

Goal of the invention: for above-mentioned prior art, it is provided that the authentic firmware upgrading of a kind of dcs realizes method, it is achieved the reliable upgrading of each node and main frame in dcs.

Technical scheme: the authentic firmware upgrading of a kind of dcs realizes the FLASH branch of method, main frame and each node and all includes Bootloader district, operation program area, stand-by program district, upgrading label area and data parameter region;Firmware upgrade realizes method and comprises the steps:

Step 1), upgrade file is 2 by host computer by sizenByte is divided into some AKUs, and each AKU also includes upgrade file version number, upgrade file total bag number, the total CRC check of upgrade file and current AKU sequence number;Wherein n is the integer of 1~8;

Step 2), during upgrading, the local firmware program of main frame or each node receives each AKU of sending of host computer and is stored in respective stand-by program district, generating upgrading task flagging in upgrading label area after having received all AKUs, described upgrading task flagging includes the byte number that upgrade file version number, upgrade file total bag number, the total CRC check of upgrade file and upgrade file often wrap;

Step 3), by main frame or each node reset being carried out the Bootloader of starting device, after described Bootloader reads the upgrading task flagging of its upgrading label area, judge whether described stand-by program district exists upgrade file: if there is upgrade file, jump to step 4), if being absent from upgrade file, jump to step 8);

Step 4), judge that whether upgrade file is effective by CRC check: if upgrade file effectively, jumps to step 5);If upgrade file is invalid, jump to step 8);

Step 5), jump to step 6 after wiping the file in described main frame or each node operator district), if occurring, erasing is abnormal, jumps to step 3);

Step 6), jump to step 7 after the AKU in described stand-by program district is write described local runtime program area), if occurring, write is abnormal, jumps to step 3);

Step 7), jump to step 8 after wiping the upgrading task flagging of label area of upgrading in described main frame or each node), if occurring, erasing is abnormal, jumps to step 3);

Step 8), whether effective detect described operation program area target program: if effectively, jumping to step 9), if invalid, after time delay, jump to step 3);

Step 9), described main frame or each node configuration operation program environment complete upgrading.

Further, the local firmware program of main frame or each node adopts breakpoint transmission agreement receive each AKU and be stored in described stand-by program district.

As the preferred version of the present invention, described step 2) comprise the following specific steps that:

Step 2.1), after application program receives any one AKU, carry out the judgement of AKU version number: if the upgrade file version number received is different from current operation program version, jump to step 2.2), if version number is identical, do not upgrade;

Step 2.2), determine whether breakpoint transmission bag: if the AKU being currently received and the AKU version number received in history upgrading task, upgrade file total bag number, the total CRC check of upgrade file are identical, then this AKU received is breakpoint transmission bag and jumps to step 2.3);If difference, be new upgrading task, then more the upgrade file version number in new historical upgrading task, upgrade file total bag number, the total CRC check information of upgrade file, and the upgrade file first starting to ask for new liter level task wraps;

Step 2.3), ask for desired AKU by the upgrading task of record to host computer;If receiving desired AKU, jump to step 2.4), if the AKU received is not expectation AKU, continue up a machine request expectation AKU;

Step 2.4), the AKU received is write in FLASH stand-by program district by AKU sequence number;Wherein after often writing an AKU, in from stand-by program district, read this AKU, to judge that whether write is successful: if unsuccessful, again ask this AKU to host computer;If success, jump to step 2.5);

Step 2.5), carry out AKU and receive judgement: if receiving, send upgrading to host computer and complete information and jump to described step 3), the inwhole complete reception of AKU then continues to expect AKU to host request.

As the preferred version of the present invention, described step 8) in, delay time is 100~500ms.

Beneficial effect: the inventive method is different from traditional method to be in that: in all scalable nodes, the Bootloader of prepackage is only in order to realize program ver-ify and replacement function, Bootloader is positioned at the startup address of Flash, Bootloader is first carried out after system reset, start to read upgrading label, judge whether there is the complete upgrade file that can pass through program ver-ify in stand-by program district, if having, progressively the data of backup area are write Operational Zone, and finally replace the first bag, prevent unexpected generation, then read Operational Zone the first bag and determine whether legal startup code, if the arbitrary process replaced occurs unexpected, Bootloader still can from newly performing upgrading, do not occur at the incomplete situation of the replacement in program replacement process.If upgrade file has been replaced just can wipe upgrading label, prepare the application program in startup optimization district.

This distributed node firmware upgrade method receives without the program package based on communications protocol, program package receives and realizes in the application, and the packet of reception is first stored in stand-by program district, when receiving that program package is complete and after CRC check passes through, parameter information labelling is generated in upgrading label area, and call Bootloader to realize program upgrading, escalation process can realize breakpoint transmission, even and if send out failure unpredictable in any link, old program will not be replaced, program more new task has been may proceed under extreme case, Flash read-write has the delay protection of 100~500ms time abnormal, it is prevented from Flash and is write bad at short notice, greatly improve the stability of system.

Accompanying drawing explanation

Fig. 1 is the distributed system framework that the present invention applies;

The IAP subregion that Fig. 2 is the present invention divides;

Fig. 3 is Bootloader handling process;

Fig. 4 is that application program needs embedded reception processing data packets;

Fig. 5 is AKU and FLASH corresponding relation;

Fig. 6 is upgrading control field definition.

Detailed description of the invention

Below in conjunction with accompanying drawing the present invention done and further explain.

The authentic firmware upgrading of a kind of dcs realizes method, as in figure 2 it is shown, the FLASH branch of main frame and each node all includes Bootloader district, operation program area, stand-by program district, upgrading label area and data parameter region;And the FLASH space of common IAP upgrading only divides Bootloader district and runs program area.

Comprise the steps: as it is shown on figure 3, firmware upgrade realizes method

Step 1), upgrade file is 2 by host computer by sizenByte is divided into some AKUs, and each AKU also includes upgrade file version number, upgrade file total bag number, the total CRC check of upgrade file and current AKU sequence number;Wherein n is the integer of 1~8;

Step 2), during upgrading, the local firmware program of main frame or each node adopts breakpoint transmission agreement receive each AKU of sending of host computer and be stored in respective stand-by program district, as shown in Figure 4, specifically includes following steps:

Step 2.1), after application program receives any one AKU, carry out the judgement of AKU version number: if the upgrade file version number received is different from current operation program version, jump to step 2.2), if version number is identical, do not upgrade;

Step 2.2), determine whether breakpoint transmission bag: if the AKU being currently received and the AKU version number received in history upgrading task, upgrade file total bag number, the total CRC check of upgrade file are identical, then this AKU received is breakpoint transmission bag and jumps to step 2.3);If difference, be new upgrading task, then more the upgrade file version number in new historical upgrading task, upgrade file total bag number, the total CRC check information of upgrade file, and the upgrade file first starting to ask for new liter level task wraps;

Step 2.3), ask for desired AKU by the upgrading task of record to host computer;If receiving desired AKU, jump to step 2.4), if the AKU received is not expectation AKU, continue up a machine request expectation AKU;

Step 2.4), the AKU received is write in FLASH stand-by program district by AKU sequence number;Wherein after often writing an AKU, in from stand-by program district, read this AKU, to judge that whether write is successful: if unsuccessful, again ask this AKU to host computer;If success, jump to step 2.5);

Step 2.5), carry out AKU and receive judgement: if receiving, send upgrading to host computer and complete information and jump to described step 3), the inwhole complete reception of AKU then continues to expect AKU to host request.

Such as 16 AKUs of every sector write, as shown in Figure 5, generating upgrading task flagging in upgrading label area after having received all AKUs, described upgrading task flagging includes the byte number that upgrade file version number, upgrade file total bag number, the total CRC check of upgrade file and upgrade file often wrap;

Step 3), by main frame or each node reset being carried out the Bootloader of starting device, after described Bootloader reads the upgrading task flagging of its upgrading label area, judge whether described stand-by program district exists upgrade file: if there is upgrade file, jump to step 4), if being absent from upgrade file, jump to step 8);

Step 4), judge that whether upgrade file is effective by CRC check: if upgrade file effectively, jumps to step 5);If upgrade file is invalid, jump to step 8);

Step 5), jump to step 6 after wiping the file in described main frame or each node operator district), if occurring, erasing is abnormal, jumps to step 3);

Step 6), jump to step 7 after the AKU in described stand-by program district is write described local runtime program area), if occurring, write is abnormal, jumps to step 3);

Step 7), jump to step 8 after wiping the upgrading task flagging of label area of upgrading in described main frame or each node), if occurring, erasing is abnormal, jumps to step 3);

Step 8), whether effective detect described operation program area target program: if effectively, jumping to step 9), if invalid, after time delay, jump to step 3), delay time may be set to 100~500ms;

Step 9), described main frame or each node configuration operation program environment complete upgrading.

It is illustrated in figure 6 the frame format definition of the descending AKU of this updating protocol and up upgrade request bag.

The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (4)

1. the firmware upgrade of a dcs realizes method, it is characterised in that: the FLASH branch of main frame and each node all includes Bootloader district, operation program area, stand-by program district, upgrading label area and data parameter region;Firmware upgrade realizes method and comprises the steps:
Step 1), upgrade file is 2 by host computer by sizenByte is divided into some AKUs, and each AKU also includes upgrade file version number, upgrade file total bag number, the total CRC check of upgrade file and current AKU sequence number;Wherein n is the integer of 1~8;
Step 2), during upgrading, the local firmware program of main frame or each node receives each AKU of sending of host computer and is stored in respective stand-by program district, generating upgrading task flagging in upgrading label area after having received all AKUs, described upgrading task flagging includes the byte number that upgrade file version number, upgrade file total bag number, the total CRC check of upgrade file and upgrade file often wrap;
Step 3), by main frame or each node reset being carried out the Bootloader of starting device, after described Bootloader reads the upgrading task flagging of its upgrading label area, judge whether described stand-by program district exists upgrade file: if there is upgrade file, jump to step 4), if being absent from upgrade file, jump to step 8);
Step 4), judge that whether upgrade file is effective by CRC check: if upgrade file effectively, jumps to step 5);If upgrade file is invalid, jump to step 8);
Step 5), jump to step 6 after wiping the file in described main frame or each node operator district), if occurring, erasing is abnormal, jumps to step 3);
Step 6), jump to step 7 after the AKU in described stand-by program district is write local runtime program area), if occurring, write is abnormal, jumps to step 3);
Step 7), jump to step 8 after wiping the upgrading task flagging of label area of upgrading in described main frame or each node), if occurring, erasing is abnormal, jumps to step 3);
Step 8), whether effective detect described operation program area target program: if effectively, jumping to step 9), if invalid, after time delay, jump to step 3);
Step 9), described main frame or each node configuration operation program environment complete upgrading.
2. the firmware upgrade of a kind of dcs according to claim 1 realizes method, it is characterized in that: described step 2) in, the local firmware program of main frame or each node adopts breakpoint transmission agreement receive each AKU and be stored in described stand-by program district.
3. the firmware upgrade of a kind of dcs according to claim 2 realizes method, it is characterised in that: described step 2) comprise the following specific steps that:
Step 2.1), after application program receives any one AKU, carry out the judgement of AKU version number: if the upgrade file version number received is different from current operation program version, jump to step 2.2), if version number is identical, do not upgrade;
Step 2.2), determine whether breakpoint transmission bag: if the AKU being currently received and the AKU version number received in history upgrading task, upgrade file total bag number, the total CRC check of upgrade file are identical, then this AKU received is breakpoint transmission bag and jumps to step 2.3);If difference, be new upgrading task, then more the upgrade file version number in new historical upgrading task, upgrade file total bag number, the total CRC check information of upgrade file, and the upgrade file first starting to ask for new liter level task wraps;
Step 2.3), ask for desired AKU by the upgrading task of record to host computer;If receiving desired AKU, jump to step 2.4), if the AKU received is not expectation AKU, continue up a machine request expectation AKU;
Step 2.4), the AKU received is write in FLASH stand-by program district by AKU sequence number;Wherein after often writing an AKU, from stand-by program district, read this AKU, to judge that whether write is successful: if unsuccessful, again ask this AKU to host computer;If success, jump to step 2.5);
Step 2.5), carry out AKU and receive judgement: if receiving, send upgrading to host computer and complete information and jump to described step 3), the inwhole complete reception of AKU then continues to expect AKU to host request.
4. the firmware upgrade of a kind of dcs according to claim 1 realizes method, it is characterised in that: described step 8) in, delay time is 100~500ms.
CN201410267711.5A 2014-06-16 2014-06-16 The authentic firmware upgrading of a kind of dcs realizes method CN104007996B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410267711.5A CN104007996B (en) 2014-06-16 2014-06-16 The authentic firmware upgrading of a kind of dcs realizes method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410267711.5A CN104007996B (en) 2014-06-16 2014-06-16 The authentic firmware upgrading of a kind of dcs realizes method

Publications (2)

Publication Number Publication Date
CN104007996A CN104007996A (en) 2014-08-27
CN104007996B true CN104007996B (en) 2016-07-06

Family

ID=51368663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410267711.5A CN104007996B (en) 2014-06-16 2014-06-16 The authentic firmware upgrading of a kind of dcs realizes method

Country Status (1)

Country Link
CN (1) CN104007996B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653299A (en) * 2014-11-12 2016-06-08 杭州华三通信技术有限公司 Firmware upgrade method device
CN104615471A (en) * 2015-03-05 2015-05-13 浪潮软件集团有限公司 System upgrading method and device for terminal
CN105094903B (en) * 2015-07-16 2019-02-22 广州飞米电子科技有限公司 The method and device that firmware is upgraded
CN105117253A (en) * 2015-08-27 2015-12-02 常州大学 BootLoader based remote upgrade method for UV LED (Ultraviolet Light Emitting Diode) curing system
CN105511918B (en) * 2015-12-06 2018-10-26 江苏林洋能源股份有限公司 A kind of data memory format automatic maintenance method of intelligent electric energy meter
CN106227572A (en) * 2016-08-30 2016-12-14 深圳市蓝海华腾技术股份有限公司 A kind of frequency converter control system programme upgrade method
CN107301068A (en) * 2017-06-12 2017-10-27 合肥众志行云科技有限公司 One-to-many wireless program upgrade-system and method on a kind of single-chip microcomputer
CN107357621B (en) * 2017-07-14 2020-12-15 成都天奥电子股份有限公司 Method for carrying out remote wireless software upgrading on satellite time service equipment
WO2019084843A1 (en) * 2017-11-01 2019-05-09 深圳市大疆创新科技有限公司 Firmware upgrading method, electronic device, camera system, and unmanned aerial vehicle
CN107957880A (en) * 2017-11-30 2018-04-24 广东美的暖通设备有限公司 Air-conditioning firmware upgrade method, device, air-conditioning and computer equipment
CN109117168A (en) * 2018-08-29 2019-01-01 拓攻(南京)机器人有限公司 Unmanned plane firmware update, device, unmanned plane and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100481776C (en) * 2006-10-08 2009-04-22 北京启明星辰信息技术股份有限公司 Distributed upgrading method for centralization management mode
US8823536B2 (en) * 2010-04-21 2014-09-02 Microsoft Corporation Automated recovery and escalation in complex distributed applications
CN102833101B (en) * 2012-08-22 2015-06-17 瑞斯康达科技发展股份有限公司 Software upgrading method and equipment of distributed network system

Also Published As

Publication number Publication date
CN104007996A (en) 2014-08-27

Similar Documents

Publication Publication Date Title
US9910743B2 (en) Method, system and device for validating repair files and repairing corrupt software
CN104166565B (en) A kind of intelligent display terminal firmware upgrade method
KR20140055938A (en) Rack and method thereof for simultaneously updating basic input output systems
US9038055B2 (en) Using virtual machines to manage software builds
US9146839B2 (en) Method for pre-testing software compatibility and system thereof
KR20150033711A (en) Run-time error repairing method, device and system
KR101082940B1 (en) Network equipment and a method for monitoring the start up of a such an equipment
CN103473067B (en) Built-in Linux subregion and data restoration method, system and system development method
CN103377094B (en) Method for monitoring abnormality and device
CN101243393B (en) Method and apparatus for managing patchable software systems
US8640096B2 (en) Configuration of componentized software applications
KR101299099B1 (en) Apparatus and method for management of optimized virtualization module in embedded system
US8499295B2 (en) Microcontroller firmware running from RAM and applications of the same
US9372784B2 (en) Test system configuration method and system
KR20120052406A (en) Firmware image update and management
CN101557583B (en) Remote-updating and version-switching method of repeater equipment embedded software
CN102364891B (en) Method for upgrading software for embedded Ethernet equipment and embedded Ethernet equipment
CN101281469B (en) Embedded type system and start-up load application method
AU2011298473B2 (en) Parallel programming and updating of lighting bus subscribers
US20120174112A1 (en) Application resource switchover systems and methods
US7512749B2 (en) Safe software revision for embedded systems
CN101699399B (en) Software update system and method
US20100205587A1 (en) Method, device and system for realizing kernel online patching
US10042744B2 (en) Adopting an existing automation script to a new framework
US9563442B2 (en) Baseboard management controller and method of loading firmware

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
C14 Grant of patent or utility model
TR01 Transfer of patent right

Effective date of registration: 20190529

Address after: 211103 Runfa Road, Gaoqiao Community, Dongshan Street, Jiangning District, Nanjing City, Jiangsu Province

Patentee after: Nanjing Run Educational Technology Co., Ltd.

Address before: 210016 Zhujiang Road 669, Xuanwu District, Nanjing City, Jiangsu Province

Patentee before: Nanjing Rong Jiao Science and Technology Ltd.

TR01 Transfer of patent right