CN104750501A - On-line upgrading method and system used for single chip microcomputer - Google Patents

On-line upgrading method and system used for single chip microcomputer Download PDF

Info

Publication number
CN104750501A
CN104750501A CN201310730976.XA CN201310730976A CN104750501A CN 104750501 A CN104750501 A CN 104750501A CN 201310730976 A CN201310730976 A CN 201310730976A CN 104750501 A CN104750501 A CN 104750501A
Authority
CN
China
Prior art keywords
control program
chip microcomputer
upgrading
version information
described control
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
CN201310730976.XA
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.)
Beijing Aeonmed Co Ltd
Original Assignee
Beijing Aeonmed 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 Beijing Aeonmed Co Ltd filed Critical Beijing Aeonmed Co Ltd
Priority to CN201310730976.XA priority Critical patent/CN104750501A/en
Publication of CN104750501A publication Critical patent/CN104750501A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides an on-line upgrading method and system used for a single chip microcomputer. The method comprises the following steps: writing an upgrading program into the single chip microcomputer, wherein a control program is flashed in a single chip microcomputer chip; obtaining the latest edition information of the control program, and comparing the current edition information and the latest edition information of the control program; when the current edition of the control program is lower than the edition of the control program, causing the upgrading program to enter a flashing model, and obtaining the upgrading control program of the control program; and upgrading the single chip microcomputer by the upgrading program under the flashing model according to the control program and the upgrading control program of the control program. According to the method of the embodiment, the upgrading program is written into the single chip microcomputer, the single chip microcomputer is upgraded according to the upgrading program and the upgrading control program, so that maintenance cost is lowered, the upgrade of the single chip microcomputer is simplified, and convenience is brought for users.

Description

For the online upgrading method and system of single-chip microcomputer
Technical field
The present invention relates to singlechip technology field, particularly a kind of online upgrading method and system for single-chip microcomputer.
Background technology
After chip dispatches from the factory, need maintenance chip being carried out to the subsequent upgrade such as functional optimization.Existing chip upgrade needs to be upgraded by emulator and PC by special messenger, and namely the programming program of embedded chip needs by means of emulator and PC.
Existing upgrading mode is complicated, needs to be upgraded by professional, and needs to upgrade by external unit, adds maintenance cost, increases the operation easier of user simultaneously.
Summary of the invention
Object of the present invention is intended at least solve one of above-mentioned technological deficiency.
For this reason, one object of the present invention is to propose a kind of online upgrading method for single-chip microcomputer.
Another object of the present invention is to propose a kind of online upgrade system for single-chip microcomputer.
For achieving the above object, the embodiment of one aspect of the present invention proposes a kind of online upgrading method for single-chip microcomputer, and comprise the following steps: in single-chip microcomputer, write ROMPaq, wherein, in singlechip chip, programming has control program; Obtain the latest version information of described control program, and the current version information of more described control program and latest version information; When version lower than described control program of the current version of described control program, described ROMPaq enters programming model, and obtains the upgrading control programs of described control program; And described ROMPaq is upgraded to described single-chip microcomputer according to the upgrading control programs of described control program and described control program under programming model.
According to the method for the embodiment of the present invention, by ROMPaq is written to single-chip microcomputer, and according to this ROMPaq and upgrading control programs, single-chip microcomputer is upgraded, thus reduce maintenance cost, simplify the upgrading of single-chip microcomputer, convenient for users.
In one embodiment of the invention, also comprise: when the current version of described control program is not less than the latest edition of described control program, described single-chip microcomputer is not upgraded.
In one embodiment of the invention, the latest version information of described acquisition control program, and the current version information of more described control program and latest version information specifically comprise: the latest version information being obtained described single-chip microcomputer by server; And the current version information of the latest version information of more described control program and described control program.
In one embodiment of the invention, also comprise: interrupt address is set, and receive described upgrading control programs by described interrupt address.
For achieving the above object, embodiments of the invention propose a kind of online upgrade system for single-chip microcomputer on the other hand, and comprising: writing module, for writing ROMPaq in single-chip microcomputer, wherein, in singlechip chip, programming has control program; Comparison module, for obtaining the latest version information of described control program, and the current version information of more described control program and latest version information; Acquisition module, for when version lower than described control program of the current version of described control program, described ROMPaq enters programming model, and obtains the upgrading control programs of described control program; And upgraded module, according to the upgrading control programs of described control program and described control program, described single-chip microcomputer is upgraded under programming model for described ROMPaq.
According to the system of the embodiment of the present invention, by ROMPaq is written to single-chip microcomputer, and according to this ROMPaq and upgrading control programs, single-chip microcomputer is upgraded, thus reduce maintenance cost, simplify the upgrading of single-chip microcomputer, convenient for users.
In one embodiment of the invention, described upgraded module also for when the current version of described control program is not less than the latest edition of described control program, is not upgraded to described single-chip microcomputer.
In one embodiment of the invention, described comparison module specifically comprises: acquiring unit, for being obtained the latest version information of described single-chip microcomputer by server; And comparing unit, for the latest version information of more described control program and the current version information of described control program.
In one embodiment of the invention, also comprising: interrupt module, for arranging interrupt address, and receiving described upgrading control programs according to described interrupt address.
The aspect that the present invention adds and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Accompanying drawing explanation
The present invention above-mentioned and/or additional aspect and advantage will become obvious and easy understand from the following description of the accompanying drawings of embodiments, wherein:
Fig. 1 is according to an embodiment of the invention for the process flow diagram of the online upgrading method of single-chip microcomputer;
Fig. 2 is the concrete schematic diagram of single-chip microcomputer upgrading according to an embodiment of the invention;
Fig. 3 is the communication scheme of single-chip microcomputer and UI according to an embodiment of the invention; And
Fig. 4 is according to an embodiment of the invention for the structured flowchart of the online upgrade system of single-chip microcomputer.
Embodiment
Be described below in detail embodiments of the invention, the example of embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.
In describing the invention, it will be appreciated that, term " " center ", " longitudinal direction ", " transverse direction ", " on ", D score, " front ", " afterwards ", " left side ", " right side ", " vertically ", " level ", " top ", " end ", " interior ", orientation or the position relationship of the instruction such as " outward " are based on orientation shown in the drawings or position relationship, only the present invention for convenience of description and simplified characterization, instead of indicate or imply that the device of indication or element must have specific orientation, with specific azimuth configuration and operation, therefore limitation of the present invention can not be interpreted as.In addition, term " first ", " second " only for describing object, and can not be interpreted as instruction or hint relative importance.
In describing the invention, it should be noted that, unless otherwise clearly defined and limited, term " installation ", " being connected ", " connection " should be interpreted broadly, and such as, can be fixedly connected with, also can be removably connect, or connect integratedly; Can be mechanical connection, also can be electrical connection; Can be directly be connected, also indirectly can be connected by intermediary, can be the connection of two element internals.For the ordinary skill in the art, concrete condition above-mentioned term concrete meaning in the present invention can be understood.
Fig. 1 is according to an embodiment of the invention for the process flow diagram of the online upgrading method of single-chip microcomputer.As shown in Figure 1, comprise the following steps according to the online upgrading method for single-chip microcomputer of the embodiment of the present invention:
Step 101, writes ROMPaq in single-chip microcomputer, and wherein, in singlechip chip, programming has control program.
Step 102, obtains the latest version information of control program, and compares current version information and the latest version information of control program.
Particularly, the latest version information of single-chip microcomputer is obtained by server.Afterwards, the latest version information of control program and the current version information of control program is compared.
Step 103, when version lower than control program of the current version of control program, ROMPaq enters programming model, and obtains the upgrading control programs of control program.
In one embodiment of the invention, when the current version of control program is not less than the latest edition of control program, single-chip microcomputer is not upgraded.
Step 104, ROMPaq is upgraded to single-chip microcomputer according to the upgrading control programs of control program and control program under programming model.
In one embodiment of the invention, also comprise: interrupt address is set, and receive upgrading control programs by interrupt address.
Be specifically described below by the online upgrading method for single-chip microcomputer of specific embodiment to the embodiment of the present invention.
First, had mercy on by emulator and write the ad-hoc location of ROMPaq to single-chip microcomputer.Particularly, by the end of bootloader program (i.e. ROMPaq) programming to flash, initial jump instruction programming is to the first address of flash.In bootloader program, realize two kinds of redirects: one jumps to ROMPaq, and another kind jumps to control program simultaneously.When using ROMPaq or control program, jump to corresponding program.
In one embodiment of the invention, such as, obtained the latest version information of this single-chip microcomputer by server, and compare with current version information, to judge current version whether lower than the latest edition of correspondence.When lower than latest edition, obtain the upgrading control programs of this single-chip microcomputer latest edition, wherein this upgrading control programs is the data or the information that make current version and latest edition produce difference.
In one embodiment of the invention, when jumping to ROMPaq, the communication information of cyclic query UI, and wait-receiving mode upgrading control programs.Due to the programming of PIC to flash itself, the restriction of erasing, carry out having mercy on 64byte and 1024byte respectively in the present embodiment and write with erasable, to prevent erasing ROMPaq or control program, realize circulation erasing, the function of programming.
Fig. 2 is the concrete schematic diagram of single-chip microcomputer upgrading according to an embodiment of the invention.As shown in Figure 2, after initialization is carried out to single-chip microcomputer, upgrade mode is jumped to by the zone bit of ROMPaq.The upgrading control programs of single-chip microcomputer latest edition and corresponding data are received under upgrade mode, and by the operation of UI to upgrade to single-chip microcomputer.
In one embodiment of the invention, version information can also be compared in the following way.Send instruction by user interface, make programming jump to the address area of bootloader ROMPaq.Receive version querying instruction by user interface, and whether there is satisfactory latest edition from server lookup.When searching latest edition, send whole erasing instruction of flash to single-chip microcomputer.Upgrading control programs starts the programming program performing flash, to upgrade to single-chip microcomputer according to upgrading control programs.After upgrading successfully, send the end of message (EOM) upgrading upgraded successfully to UI, and single-chip microcomputer to be resetted, and jump to control program and perform corresponding application program.When user upgrades to single-chip microcomputer because of demands of individuals refusal, do not upgrade by corresponding control command.
In one embodiment of the invention, be provided with interrupt address, such as, interrupt address be set to 0x10000.When confirming the upgrading control programs of latest edition, by this interrupt address, the data of upgrading control programs being sent to single-chip microcomputer, also can receiving other data by this interrupt address.
Fig. 3 is the communication scheme of single-chip microcomputer and UI according to an embodiment of the invention.As shown in Figure 3, sent the instruction entering generation patterns by UI interface to single-chip microcomputer, single-chip microcomputer receives instruction and performs, and returns execution information.Read current version information and the latest version information of single-chip microcomputer, and by this information feed back to UI, after receiving user's confirmation, flash is wiped.After receiving the confirmation of UI again, receive packet and upgrading control programs, to complete the mutual of data and communication.In the communication process of single-chip microcomputer and UI, single-chip microcomputer can feed back a confirmation when executing each instruction and operation, for confirmation, also can to several committed step, the confirmation of such as upgraded version or whether to upgrade etc. and carry out feedback acknowledgment, specifically can select corresponding mode according to the demand of user.
According to the method for the embodiment of the present invention, by ROMPaq is written to single-chip microcomputer, and according to this ROMPaq and upgrading control programs, single-chip microcomputer is upgraded, thus reduce maintenance cost, simplify the upgrading of single-chip microcomputer, convenient for users.
Fig. 4 is according to an embodiment of the invention for the structured flowchart of the online upgrade system of single-chip microcomputer.As shown in Figure 4, writing module 110, comparison module 120, acquisition module 130 and upgraded module 140 is comprised according to the online upgrade system 100 for single-chip microcomputer of the embodiment of the present invention.
Wherein, writing module 110 for writing ROMPaq in single-chip microcomputer, and wherein, in singlechip chip, programming has control program.
Comparison module 120 for obtaining the latest version information of control program, and compares current version information and the latest version information of control program.
In one embodiment of the invention, comparison module 120 specifically comprises: acquiring unit 121 and comparing unit 122.
Wherein, acquiring unit 121 is for obtaining the latest version information of single-chip microcomputer by server.
Comparing unit 122 is for the current version information of the latest version information and control program that compare control program.
Acquisition module 130 is for when version lower than control program of the current version of control program, and ROMPaq enters programming model, and obtains the upgrading control programs of control program.
Upgraded module 140 is upgraded to single-chip microcomputer according to the upgrading control programs of control program and control program under programming model for ROMPaq.
Upgraded module 140 also for when the current version of control program is not less than the latest edition of control program, is not upgraded to single-chip microcomputer.
In one embodiment of the invention, interrupt module 150 is also comprised.Interrupt module 150 for arranging interrupt address, and receives upgrading control programs according to interrupt address.Such as interrupt address is set to 0x10000.When confirming the upgrading control programs of latest edition, by this interrupt address, the data of upgrading control programs being sent to single-chip microcomputer, also can receiving other data by this interrupt address.
In one embodiment of the invention, ROMPaq is written to the ad-hoc location of single-chip microcomputer by writing module 110.Particularly, writing module 110 is by the end of bootloader program (i.e. ROMPaq) programming to flash, and initial jump instruction programming is to the first address of flash.Writing module 110 makes bootloader program have two kinds of redirects: one jumps to ROMPaq, and another kind jumps to control program.When using ROMPaq or control program, jump to corresponding program.
In one embodiment of the invention, comparison module 120 will obtain the latest version information of this single-chip microcomputer and current version information compares, to judge current version whether lower than the latest edition of correspondence.When lower than latest edition, acquisition module 130 obtains the upgrading control programs of this single-chip microcomputer latest edition, and wherein this upgrading control programs is the data or the information that make current version and latest edition produce difference.
In one embodiment of the invention, comparison module 120 can also compare version information in the following way.Send instruction by user interface, make programming jump to the address area of bootloader ROMPaq.Whether acquisition module 130 exists satisfactory latest edition according to version querying instruction from server lookup, just obtains upgrading control programs if existed, and sends whole erasing instruction of flash to single-chip microcomputer.Upgraded module 140 starts the programming program performing flash, to upgrade to single-chip microcomputer according to upgrading control programs.After upgrading successfully, send the end of message (EOM) upgrading upgraded successfully to UI, and single-chip microcomputer to be resetted, and jump to control program and perform corresponding application program.When user upgrades to single-chip microcomputer because of demands of individuals refusal, do not upgrade by corresponding control command.
In one embodiment of the invention, when jumping to ROMPaq, the communication information of cyclic query UI, and wait-receiving mode upgrading control programs.Due to the programming of PIC to flash itself, the restriction of erasing, the present embodiment carries out having mercy on 64byte and 1024byte respectively and writes with erasable, to prevent erasing ROMPaq or control program, realizes circulation erasing, the function of programming.
Fig. 3 is the communication scheme of single-chip microcomputer and UI according to an embodiment of the invention.As shown in Figure 3, sent the instruction entering generation patterns by UI interface to single-chip microcomputer, single-chip microcomputer receives instruction and performs, and returns execution information.Read current version information and the latest version information of single-chip microcomputer, and by this information feed back to UI, after receiving user's confirmation, flash is wiped.After receiving the confirmation of UI again, receive packet and upgrading control programs, to complete the mutual of data and communication.In the communication process of single-chip microcomputer and UI, single-chip microcomputer can feed back a confirmation when executing each instruction and operation, for confirmation, also can to several committed step, the confirmation of such as upgraded version or whether to upgrade etc. and carry out feedback acknowledgment, specifically can select corresponding mode according to the demand of user.
According to the system of the embodiment of the present invention, by ROMPaq is written to single-chip microcomputer, and according to this ROMPaq and upgrading control programs, single-chip microcomputer is upgraded, thus reduce maintenance cost, simplify the upgrading of single-chip microcomputer, convenient for users.
Although illustrate and describe embodiments of the invention above, be understandable that, above-described embodiment is exemplary, can not be interpreted as limitation of the present invention, those of ordinary skill in the art can change above-described embodiment within the scope of the invention when not departing from principle of the present invention and aim, revising, replacing and modification.

Claims (8)

1., for an online upgrading method for single-chip microcomputer, it is characterized in that, comprise the following steps:
In single-chip microcomputer, write ROMPaq, wherein, in singlechip chip, programming has control program;
Obtain the latest version information of described control program, and the current version information of more described control program and latest version information;
When version lower than described control program of the current version of described control program, described ROMPaq enters programming model, and obtains the upgrading control programs of described control program; And
Described ROMPaq is upgraded to described single-chip microcomputer according to the upgrading control programs of described control program and described control program under programming model.
2., as claimed in claim 1 for the online upgrading method of single-chip microcomputer, it is characterized in that, also comprise:
When the current version of described control program is not less than the latest edition of described control program, described single-chip microcomputer is not upgraded.
3., as claimed in claim 1 for the online upgrading method of single-chip microcomputer, it is characterized in that, the latest version information of described acquisition control program, and the current version information of more described control program and latest version information specifically comprise:
The latest version information of described single-chip microcomputer is obtained by server; And
The latest version information of more described control program and the current version information of described control program.
4., as claimed in claim 1 for the online upgrading method of single-chip microcomputer, it is characterized in that, also comprise:
Interrupt address is set, and receives described upgrading control programs by described interrupt address.
5. for an online upgrade system for single-chip microcomputer, it is characterized in that, comprise the following steps:
Writing module, for writing ROMPaq in single-chip microcomputer, wherein, in singlechip chip, programming has control program;
Comparison module, for obtaining the latest version information of described control program, and the current version information of more described control program and latest version information;
Acquisition module, for when version lower than described control program of the current version of described control program, described ROMPaq enters programming model, and obtains the upgrading control programs of described control program; And
Upgraded module, upgrades to described single-chip microcomputer according to the upgrading control programs of described control program and described control program under programming model for described ROMPaq.
6., as claimed in claim 5 for the online upgrade system of single-chip microcomputer, it is characterized in that, described upgraded module also for when the current version of described control program is not less than the latest edition of described control program, is not upgraded to described single-chip microcomputer.
7., as claimed in claim 5 for the online upgrade system of single-chip microcomputer, it is characterized in that, described comparison module specifically comprises:
Acquiring unit, for obtaining the latest version information of described single-chip microcomputer by server; And
Comparing unit, for the latest version information of more described control program and the current version information of described control program.
8., as claimed in claim 5 for the online upgrade system of single-chip microcomputer, it is characterized in that, also comprise:
Interrupt module, for arranging interrupt address, and receives described upgrading control programs according to described interrupt address.
CN201310730976.XA 2013-12-26 2013-12-26 On-line upgrading method and system used for single chip microcomputer Pending CN104750501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310730976.XA CN104750501A (en) 2013-12-26 2013-12-26 On-line upgrading method and system used for single chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310730976.XA CN104750501A (en) 2013-12-26 2013-12-26 On-line upgrading method and system used for single chip microcomputer

Publications (1)

Publication Number Publication Date
CN104750501A true CN104750501A (en) 2015-07-01

Family

ID=53590254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310730976.XA Pending CN104750501A (en) 2013-12-26 2013-12-26 On-line upgrading method and system used for single chip microcomputer

Country Status (1)

Country Link
CN (1) CN104750501A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958752A (en) * 2018-07-09 2018-12-07 迈普通信技术股份有限公司 Single-chip microcontroller online upgrade system and method
CN113329044A (en) * 2020-02-28 2021-08-31 北京京东振世信息技术有限公司 Monitoring agent program upgrading method and upgrading device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783003A (en) * 2004-12-02 2006-06-07 华为技术有限公司 Program on-line loading method
CN103200219A (en) * 2013-02-05 2013-07-10 北京小米科技有限责任公司 Data package updating method, device, terminal equipment and server
CN103473088A (en) * 2013-08-30 2013-12-25 北京远特科技有限公司 Method and system for online upgrading of single chip microcomputer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783003A (en) * 2004-12-02 2006-06-07 华为技术有限公司 Program on-line loading method
CN103200219A (en) * 2013-02-05 2013-07-10 北京小米科技有限责任公司 Data package updating method, device, terminal equipment and server
CN103473088A (en) * 2013-08-30 2013-12-25 北京远特科技有限公司 Method and system for online upgrading of single chip microcomputer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958752A (en) * 2018-07-09 2018-12-07 迈普通信技术股份有限公司 Single-chip microcontroller online upgrade system and method
CN108958752B (en) * 2018-07-09 2023-01-24 迈普通信技术股份有限公司 Single chip microcomputer online upgrading system and method
CN113329044A (en) * 2020-02-28 2021-08-31 北京京东振世信息技术有限公司 Monitoring agent program upgrading method and upgrading device

Similar Documents

Publication Publication Date Title
CN104149717B (en) A kind of long-range noiseless renewal system and method for car load control
CN106095480B (en) A kind of method and device of optical module firmware upgrading
CN100570558C (en) A kind of chip firmware updating method
CN104199706A (en) Firmware upgrade method and device for eMMC
CN101937351B (en) Method and system for automatically installing application software
WO2021115477A1 (en) Program upgrade method and apparatus, electronic device and storage medium
CN109240720B (en) Firmware upgrading method of android system and storage device
CN102722384A (en) On-line upgrading method and upgrading system for optical module firmware
CN103077058A (en) Method and device for installing application program
US20090006831A1 (en) Methods and apparatuses for configuring add-on hardware to a computing platform
CN101963910A (en) General USB (Universal Serial Bus) based equipment firmware updating method
CN103092647A (en) Online upgrade method of embedded system
CN110187909B (en) Single-chip microcomputer firmware upgrading method based on android system
CN102945173A (en) User program on-line upgrading system and method
CN110633091A (en) Electronic module and software wireless upgrading method thereof
CN104102518A (en) Double-CPU system and program updating method thereof
CN103997683A (en) System for using set-top-box platform to realize customizable Flash CD-ROM recorder and method thereof
CN107346244B (en) A kind of automobile EPS director demon automation download system and method
CN106789334A (en) A kind of method and apparatus of firmware upgrade
CN104503814A (en) Firmware program automatically downloading method of USB 3.0 data acquisition module
CN104391714A (en) Software update method and software update device for vehicle
CN104750505A (en) Single chip microcomputer online upgrade method and system
CN107908417A (en) Firmware upgrade method and electronic equipment
CN104021014A (en) Firmware upgrading method based on double-CPU system
CN107678765A (en) A kind of online upgrading method based on C8051F series monolithics

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: 20150701

RJ01 Rejection of invention patent application after publication