CN1783003A - Program on-line loading method - Google Patents

Program on-line loading method Download PDF

Info

Publication number
CN1783003A
CN1783003A CN 200410100914 CN200410100914A CN1783003A CN 1783003 A CN1783003 A CN 1783003A CN 200410100914 CN200410100914 CN 200410100914 CN 200410100914 A CN200410100914 A CN 200410100914A CN 1783003 A CN1783003 A CN 1783003A
Authority
CN
China
Prior art keywords
program
application program
loading
loading procedure
application
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
CN 200410100914
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200410100914 priority Critical patent/CN1783003A/en
Publication of CN1783003A publication Critical patent/CN1783003A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention discloses on-line program loading method. The method includes: setting the loading program in the lower address end in program memory of monolithic computer and the user application program in the higher address end; each time the system is started form the loading program, reading the current version information, judging whether to be the newest version and running the loading program in case of not being the newest version; and calling the application program. Loading software in the said method needs no power-off and excess cost, and has no system collapse caused by failed loading, and the software may be re-loaded. The loading process is simple, easily, safe and reliable and is used in software upgrading.

Description

A kind of program on-line loading method
Technical field
The present invention relates to the program upgrade technology, relate in particular to a kind of program on-line loading method.
Background technology
Single Chip Microcomputer (SCM) system software is many to be burnt in the software carrier with programmable device, this software carrier is positioned on the veneer socket again, and operation then powers on.If when software need upgrade or change, veneer can only be cut off the power supply, take out software carrier and carry out burning again.The method not only will be used socket, brings the reduction of reliabilities such as the increase of cost and loose contact, and can not satisfy the software upgrading requirement of the system of can not cutting off the power supply, and can not realize the remote upgrade of software.
At present existing have online programming (In application programming is called for short: the IAP) single-chip microcomputer of function, as AT89C51RD2, can realize the on-line loaded function of software.The principle of its on-line loaded is as follows:
1, MCU single-chip microcomputer inside is at the resident api function that has producer to provide in the high-end address of flash, and this function provides unified calling interface, and what mainly finish is read-write capability to flash.
2, the user finishes the online upgrading to software by loading (bootloader) program of customization self.Mainly be to finish communication function and call api function in the loading procedure, the reception upgrade code also writes among the flash.
3, the operational scheme of program as shown in Figure 1, wherein, BSB:boot status byte starting state byte; SBV:soft boot vector software startup vector; The modification of these two variablees is to realize by calling api function.Be specially:
At first the ISP function that provides by producer loads the loading procedure of customization to assigned address, it is the step 1 among Fig. 1, this step also can be burnt to the flash assigned address with the loading procedure of customization by programmable device and replace, change the address of program start vector SBV to loading procedure then, single-chip microcomputer again resets.
After single-chip microcomputer starts once more, will enter the loading procedure of customization, i.e. step 2 among Fig. 1, will finish the loading of user application this moment, load finish after update routine start vector SBV to 0000 once more, single-chip microcomputer again resets.
Single-chip microcomputer starts once more will enter user application, i.e. step 3 among Fig. 1 is finished the online upgrading of single-chip microcomputer.
Mainly contain the shortcoming of following aspect when realizing online programing function:
1, poor reliability: after the user application loading was finished, the program start vector was revised as 0000, brings into operation from application program, and this moment is if application program can not start operation owing to the mistake in the loading procedure, then total system will be paralysed, and can not reload again, and fatal error takes place.
2, loading procedure is loaded down with trivial details: need constantly change start vector, reset again, the time is longer.
3, the single-chip microcomputer of not all model all can be realized above-mentioned software loading scheme.
Summary of the invention
The invention provides a kind of program on-line loading method, have poor reliability and the loaded down with trivial details problem of loading procedure to solve existing program loading.
For addressing the above problem, the invention provides following technical scheme:
A kind of program on-line loading method, this method comprises the following step:
(1) system's loading procedure in the run memory that powers on;
(2) read the version information of application program by loading procedure, and judge whether it is latest edition; If then call and run application; If not, execution in step (3) then;
(3) obtain the application file of latest edition and load;
(4) carry out the application program that loads, and after the application program correct execution, upgrade described version information.According to said method,
Loading procedure is positioned over the low side address of the program storage of single-chip microcomputer; User application is positioned over the high address section, and its start address is decided according to the user program size.Loading procedure is loaded in the program storage by programmable device burning or system's ISP function, and this subprogram can be upgraded.
If application program loads failure, when the system call application program, make system reset, carry out loading procedure again.The operation of application program be by in loading procedure directly the start address of invokes application realize.
The present invention has following beneficial effect:
1, reliability significantly improves, and can not cause systemic breakdown if the situation of failing occurs loading in loading procedure, can load again.
2, loading procedure is succinct, realizes easily.
3, do not use socket, eliminated fully by the reliability hidden danger that the socket loose contact brings.
4, all are the online upgrading that the single-chip microcomputer of program carrier all can according to said method be realized software with flash or EEPROM.
Description of drawings
Fig. 1 is the software on-line loaded process flow diagram of AT89C51RD2.
Fig. 2 is a system start-up process flow diagram of the present invention.
Embodiment
User program comprises two parts: the loading of customization (bootloader) program and user application.Loading procedure is positioned over the program storage of single-chip microcomputer, as flash low side address, promptly 0000, system powers on all from loading procedure at every turn; User application is positioned over the high address section of program storage, and its start address is decided according to the user program size, as 0x2000.Loading procedure is loaded in the program storage by programmable device burning or system's ISP function, and this subprogram can be upgraded.
System powers on all from loading procedure at every turn, according to whether the decision of loading demand to be arranged be the operation loading procedure or jump to application program.The operation of application program does not start by change software startup vector SBV, but realize by the start address of in loading procedure, directly calling the applying portion program.
If application program loads failure, when the system call application program, can make the house dog action, make system reset, carry out loading procedure again, can finish load operation once more.
Program version information is stored in the particular address of program storage, as 0xfffe, is write by application program, and loading procedure is read.Like this, it is correct to have only application program to load, could be correct after the operation write version information, in loading procedure, read this version information, if not up-to-date version gets final product start-up loading.
It is as follows to consult processing procedure shown in Figure 2, concrete:
1, system powers on, the loading procedure in the beginning executive memory.
2, loading procedure reads the version information of current application program from the particular address (as 0xfffe) of program storage.
3, the up-to-date application version information that the host computer (the main effect of host computer is exactly to issue up-to-date version and up-to-date program file) of the version information of application program and this system of control is issued compares, judge whether current application program is latest edition, if then carry out step 5, otherwise carry out step 4.
4, obtain the application file and the loading of latest edition.
5, in loading procedure by the start address of direct invokes application, jump to application program and bring into operation.
6, upgrade the version information of application program after the application program true(-)running, the original version information correction that is about to particular address in the program storage is up-to-date version information.
7, operation master routine.
The present invention can realize the online upgrading of program, does not need system cut-off, does not also need the extra cost expenditure, can carry out program upgrade safely and reliably.
Obviously, those skilled in the art can carry out various changes and modification to the on-line loaded method of scm software of the present invention and not break away from the spirit and scope of the present invention.If these modifications of the present invention and modification are belonged within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification.

Claims (8)

1, a kind of program on-line loading method is characterized in that: this method comprises following steps:
(1) system's loading procedure in the run memory that powers on;
(2) read the version information of application program by loading procedure, and judge whether application program is latest edition; If then call and run application; If not, execution in step (3) then;
(3) obtain the application program of latest edition and load;
(4) carry out the application program that loads, and after the application program correct execution, upgrade described version information.
2, the method for claim 1 is characterized in that, step (2), and the version information of the more recent application program that the host computer of the version information of application program and this system of control is issued compares judges whether application program is up-to-date version.
3, the method for claim 1 is characterized in that, described loading procedure places the low side address of program storage, makes system begin to start from this program.
4, method as claimed in claim 3 is characterized in that, described user application places program storage high address section, and its start address is decided according to the user program size.
5, the method for claim 1 is characterized in that, if application program loads failure, then makes system reset when invokes application and restarts loading procedure.
6, as the arbitrary described method of claim 1 to 5, it is characterized in that, move by the start address of direct invokes application in loading procedure.
7, method as claimed in claim 6 is characterized in that, program version information is stored in the specified byte of program storage, is write by application program, and loading procedure is read.
8, method as claimed in claim 6 is characterized in that, loading procedure is by the programmable device burning or by being loaded in the program storage in systemic-function (ISP).
CN 200410100914 2004-12-02 2004-12-02 Program on-line loading method Pending CN1783003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200410100914 CN1783003A (en) 2004-12-02 2004-12-02 Program on-line loading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200410100914 CN1783003A (en) 2004-12-02 2004-12-02 Program on-line loading method

Publications (1)

Publication Number Publication Date
CN1783003A true CN1783003A (en) 2006-06-07

Family

ID=36773237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200410100914 Pending CN1783003A (en) 2004-12-02 2004-12-02 Program on-line loading method

Country Status (1)

Country Link
CN (1) CN1783003A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064711A (en) * 2012-12-27 2013-04-24 北京思特奇信息技术股份有限公司 Hot loading method based on Spread distributed application system
CN104750505A (en) * 2013-12-26 2015-07-01 北京谊安医疗系统股份有限公司 Single chip microcomputer online upgrade method and system
CN104750501A (en) * 2013-12-26 2015-07-01 北京谊安医疗系统股份有限公司 On-line upgrading method and system used for single chip microcomputer
CN104881300A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Upgrading method of control module of respirator
CN105389176A (en) * 2015-10-15 2016-03-09 中国民生银行股份有限公司 Application based skin processing method and apparatus
CN106569817A (en) * 2016-11-03 2017-04-19 威海优微科技有限公司 ISP online system software updating method
CN111752589A (en) * 2020-06-24 2020-10-09 研祥智能科技股份有限公司 Method and device for upgrading burning codes of microcontroller on line

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064711A (en) * 2012-12-27 2013-04-24 北京思特奇信息技术股份有限公司 Hot loading method based on Spread distributed application system
CN103064711B (en) * 2012-12-27 2016-03-16 北京思特奇信息技术股份有限公司 A kind of hot loading method based on Spread distribution application system
CN104750505A (en) * 2013-12-26 2015-07-01 北京谊安医疗系统股份有限公司 Single chip microcomputer online upgrade method and system
CN104750501A (en) * 2013-12-26 2015-07-01 北京谊安医疗系统股份有限公司 On-line upgrading method and system used for single chip microcomputer
CN104881300A (en) * 2014-02-28 2015-09-02 北京谊安医疗系统股份有限公司 Upgrading method of control module of respirator
CN105389176A (en) * 2015-10-15 2016-03-09 中国民生银行股份有限公司 Application based skin processing method and apparatus
CN105389176B (en) * 2015-10-15 2019-04-16 中国民生银行股份有限公司 Skin processing method and device based on application
CN106569817A (en) * 2016-11-03 2017-04-19 威海优微科技有限公司 ISP online system software updating method
CN111752589A (en) * 2020-06-24 2020-10-09 研祥智能科技股份有限公司 Method and device for upgrading burning codes of microcontroller on line

Similar Documents

Publication Publication Date Title
CN101425018B (en) Embedded firmware upgrading method and device based on sectional form
US20070055969A1 (en) System and method for updating firmware
CN1304946C (en) Booting and boot code update method and system thereof
CN101281469B (en) Embedded type system and start-up load application method
US7664923B2 (en) Method and system for updating software
US7533290B2 (en) Microcode updating error handling apparatus and method thereof
US20090217079A1 (en) Method and apparatus for repairing multi-controller system
CN1277214C (en) Embedded system upgrading method
CN101807154B (en) Electronic device and starting method thereof
CN101571807A (en) System with firmware and starting method thereof
CN102314354A (en) Embedded system starting method and embedded device
CN1858707A (en) Automatic loading method for movable terminal software
US9612864B2 (en) Method for singleton process control
KR20040008007A (en) Method of upgrading firmware for wireless terminal
US20020095619A1 (en) Fault tolerant/redundant boot ROM reprogramming
CN110321170B (en) Starting-up method
CN1977244A (en) Safe flashing
CN1783003A (en) Program on-line loading method
CN1567195A (en) Method for implementing hot-update of bootstrap program in flush bonding system
CN1786910A (en) BIOS on-line upgrading method
CN113064637B (en) Method and system for starting from separated BIOS image file
CN1545363A (en) A method for downloading software from server side on client side in distributed system
KR100775431B1 (en) Apparatus and Method for System Imbedded System and Firmware Updating Method Therein
CN1673959A (en) Loading system and method
CN1783001A (en) Method for starting basic input and output 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
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication