CN104572195A - Remote online device program updating method - Google Patents

Remote online device program updating method Download PDF

Info

Publication number
CN104572195A
CN104572195A CN201410853646.4A CN201410853646A CN104572195A CN 104572195 A CN104572195 A CN 104572195A CN 201410853646 A CN201410853646 A CN 201410853646A CN 104572195 A CN104572195 A CN 104572195A
Authority
CN
China
Prior art keywords
code
app
booloader
self
programming
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
CN201410853646.4A
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.)
Tianjin Feiyue Brother Monitoring & Control Co Ltd
Original Assignee
Tianjin Feiyue Brother Monitoring & Control 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 Tianjin Feiyue Brother Monitoring & Control Co Ltd filed Critical Tianjin Feiyue Brother Monitoring & Control Co Ltd
Priority to CN201410853646.4A priority Critical patent/CN104572195A/en
Publication of CN104572195A publication Critical patent/CN104572195A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a remote online device program updating method. An internal FLASH of a CPU (central processing unit) of a device includes a BooLoader storage area and an APP (application) storage area, wherein the BooLoader storage area stores BooLoader self-programming codes, and the APP storage area stores APP codes. A GPRS module connected with the CPU stores the APP codes to be replaced into an external FLASH connected with the CPU. After all download is completed, a self-programming code pointer PC_Boot pointing to the BooLoader storage area skips to the BooLoader storage area, the BooLoader self-programming codes in the BooLoader storage area starts a self-programming function of the FLASH of the CPU, and the codes in the external FLASH are read and replaced to the APP storage area. After replacement, an application pointer PC_APP is switched in to run new APP codes. The method has the advantages that remote programs of a single chip microcomputer without an online programming function are updated, a remote command is executed at a control end to run the programs for updating a remote device, program updating supports breakpoint transmission and file verification, and reliability is fine.

Description

Device remote online method for updating program
Technical field
The invention belongs to program updates technical field, especially relate to a kind of device remote online method for updating program.
Background technology
In today of Internet of Things develop rapidly, mobile terminal device, instrument and meter etc. are widely used.This end device due to the regional compare of distribution wide, quantity is many, makes remote reprogram function become one of its requisite critical function.Existing remote reprogram mode is generally adopt ARM embedded, and itself there is online programming function, but its cost is high, design circuit is complicated.And online programming function is not had for the simple single-chip microcomputer that some costs are low.
Summary of the invention
The problem to be solved in the present invention is to provide a kind of device remote online method for updating program.
For solving the problems of the technologies described above, the technical solution used in the present invention is:
A kind of device remote online method for updating program, is characterized in that comprising:
The inside FLASH of the CPU of described device divides two pieces, is respectively the BooLoader memory block storing BooLoader self-programming code and the APP memory block storing APP application code;
First by the APP application code that the GPRS module be connected with CPU will be replaced, be saved in the outside FLASH that is connected with CPU;
After program has all been downloaded, after verification file CRC check is errorless, the self-programming code pointer PC_Boot pointing to BooLoader memory block is jumped to BooLoader memory block, the BootLoader self-programming code in it is made to run the FLASH self-programming function starting CPU, read the code in outside FLASH, be substituted into APP memory block;
After replacement terminates, then the application program pointer PC_APP being switched to sensing APP memory block runs new APP application code; FLASH self-programming terminates, and the remote online of code upgrades.
Preferably, the APP application code that described GPRS module will be replaced is saved in be downloaded with code piecemeal in the process in outside FLASH:
First send N block message, rear download N block code, check N block code and whether downloaded:
Then again download N block code if not; If then check the whether correct of N block message:
Then again download N block code if not, whether downloaded if then check whole file:
Then continue transmission N+1 block message if not, if whether then inquire about this fileinfo correct:
Then again download if not, if then start FLASH self-programming.
The advantage that the present invention has and good effect are:
The inventive method achieves the remote reprogram of the single-chip microcomputer not having online programming function, at control end, perform remote command and run the program upgrading remote-control device, and program updates supports breakpoint transmission, file verification, good reliability.
Accompanying drawing explanation
Fig. 1 is the structure principle chart of apparatus of the present invention;
Fig. 2 is file download process flow diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing, specific embodiments of the invention are elaborated.
A kind of device remote online method for updating program, comprises:
The inside FLASH of the CPU of described device divides two pieces, as shown in Figure 1, is respectively the BooLoader memory block storing BooLoader self-programming code and the APP memory block storing APP application code;
First by the APP application code that the GPRS module be connected with CPU will be replaced, be saved in the outside FLASH that is connected with CPU;
After program has all been downloaded, after verification file CRC check is errorless, the self-programming code pointer PC_Boot pointing to BooLoader memory block is jumped to BooLoader memory block, the BootLoader self-programming code in it is made to run the FLASH self-programming function starting CPU, read the code in outside FLASH, be substituted into APP memory block;
After replacement terminates, then the application program pointer PC_APP being switched to sensing APP memory block runs new APP application code; FLASH self-programming terminates, and the remote online of code upgrades.
The APP application code that GPRS module of the present invention will be replaced is saved in be downloaded with code piecemeal in the process in outside FLASH, as shown in Figure 2:
First send N block message, rear download N block code, check N block code and whether downloaded:
Then again download N block code if not; If then check the whether correct of N block message:
Then again download N block code if not, whether downloaded if then check whole file:
Then continue transmission N+1 block message if not, if whether then inquire about this fileinfo correct:
Then again download if not, if then start FLASH self-programming.
The inventive method achieves the remote reprogram of the single-chip microcomputer not having online programming function, at control end, perform remote command and run the program upgrading remote-control device, and program updates supports breakpoint transmission, file verification, good reliability.
Above one embodiment of the present of invention have been described in detail, but described content being only preferred embodiment of the present invention, can not being considered to for limiting practical range of the present invention.All equalizations done according to the present patent application scope change and improve, and all should still belong within patent covering scope of the present invention.

Claims (2)

1. a device remote online method for updating program, is characterized in that comprising:
The inside FLASH of the CPU of described device divides two pieces, is respectively the BooLoader memory block storing BooLoader self-programming code and the APP memory block storing APP application code;
First by the APP application code that the GPRS module be connected with CPU will be replaced, be saved in the outside FLASH that is connected with CPU;
After program has all been downloaded, after verification file CRC check is errorless, the self-programming code pointer PC_Boot pointing to BooLoader memory block is jumped to BooLoader memory block, the BootLoader self-programming code in it is made to run the FLASH self-programming function starting CPU, read the code in outside FLASH, be substituted into APP memory block;
After replacement terminates, then the application program pointer PC_APP being switched to sensing APP memory block runs new APP application code; FLASH self-programming terminates, and the remote online of code upgrades.
2. device remote online method for updating program according to claim 1, is characterized in that: the APP application code that GPRS module will be replaced is saved in be downloaded with code piecemeal in the process in outside FLASH:
First send N block message, rear download N block code, check N block code and whether downloaded:
Then again download N block code if not; If then check the whether correct of N block message:
Then again download N block code if not, whether downloaded if then check whole file:
Then continue transmission N+1 block message if not, if whether then inquire about this fileinfo correct:
Then again download if not, if then start FLASH self-programming.
CN201410853646.4A 2014-12-31 2014-12-31 Remote online device program updating method Pending CN104572195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410853646.4A CN104572195A (en) 2014-12-31 2014-12-31 Remote online device program updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410853646.4A CN104572195A (en) 2014-12-31 2014-12-31 Remote online device program updating method

Publications (1)

Publication Number Publication Date
CN104572195A true CN104572195A (en) 2015-04-29

Family

ID=53088353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410853646.4A Pending CN104572195A (en) 2014-12-31 2014-12-31 Remote online device program updating method

Country Status (1)

Country Link
CN (1) CN104572195A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406815A (en) * 2016-09-06 2017-02-15 南京大全自动化科技有限公司 Feeder terminal apparatus and application remote upgrading method thereof
CN106708549A (en) * 2015-11-16 2017-05-24 成都鼎桥通信技术有限公司 Hand-held terminal OTA upgrading method
CN108170051A (en) * 2017-12-23 2018-06-15 深圳市轩宇车鼎科技有限公司 A kind of matching process of automotive universal RFID key chip matching different automobile types
CN109783153A (en) * 2017-11-13 2019-05-21 深圳市创客工场科技有限公司 Physical hardware control method, device, electronic equipment and storage medium
CN110795159A (en) * 2019-10-30 2020-02-14 福建省汽车工业集团云度新能源汽车股份有限公司 Method for preventing vehicle-mounted ECU from being mistakenly upgraded and incapable of being refreshed and storage device
CN111831311A (en) * 2019-04-18 2020-10-27 东莞新能安科技有限公司 Application program upgrading method, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169729A (en) * 2007-12-06 2008-04-30 三一重工股份有限公司 Embedded type system and method for renewing application program
CN101557583A (en) * 2009-03-19 2009-10-14 珠海银邮光电技术发展股份有限公司 Remote-updating and version-switching method of repeater equipment embedded software
CN104090796A (en) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 Embedded device program updating method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169729A (en) * 2007-12-06 2008-04-30 三一重工股份有限公司 Embedded type system and method for renewing application program
CN101557583A (en) * 2009-03-19 2009-10-14 珠海银邮光电技术发展股份有限公司 Remote-updating and version-switching method of repeater equipment embedded software
CN104090796A (en) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 Embedded device program updating method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708549A (en) * 2015-11-16 2017-05-24 成都鼎桥通信技术有限公司 Hand-held terminal OTA upgrading method
CN106406815A (en) * 2016-09-06 2017-02-15 南京大全自动化科技有限公司 Feeder terminal apparatus and application remote upgrading method thereof
CN109783153A (en) * 2017-11-13 2019-05-21 深圳市创客工场科技有限公司 Physical hardware control method, device, electronic equipment and storage medium
CN108170051A (en) * 2017-12-23 2018-06-15 深圳市轩宇车鼎科技有限公司 A kind of matching process of automotive universal RFID key chip matching different automobile types
CN108170051B (en) * 2017-12-23 2020-04-21 深圳市轩宇车鼎科技有限公司 Matching method for matching universal RFID key chip of vehicle with different vehicle types
CN111831311A (en) * 2019-04-18 2020-10-27 东莞新能安科技有限公司 Application program upgrading method, electronic equipment and storage medium
CN110795159A (en) * 2019-10-30 2020-02-14 福建省汽车工业集团云度新能源汽车股份有限公司 Method for preventing vehicle-mounted ECU from being mistakenly upgraded and incapable of being refreshed and storage device
CN110795159B (en) * 2019-10-30 2023-07-21 福建省汽车工业集团云度新能源汽车股份有限公司 Method for preventing vehicle-mounted ECU from being updated by mistake and being incapable of being re-brushed and storage device

Similar Documents

Publication Publication Date Title
CN104572195A (en) Remote online device program updating method
CN105117253A (en) BootLoader based remote upgrade method for UV LED (Ultraviolet Light Emitting Diode) curing system
CN103246536B (en) The wireless firmware upgrade method of thing connection positioning system
CN105159731B (en) A kind of device of FPGA configuration file remote upgrade
US20200364341A1 (en) Apparatus, communication module, application module, and method
CN109522033B (en) ECU program and data upgrading method based on device operation self-programming and double-interrupt vector table
CN103106092A (en) System software updating method and device in terminal appliance
CN104407878B (en) C6000 digital signal processor online upgrading methods
CN102053850A (en) Method for on-line FPGA logic upgrade
AU2013407292A1 (en) Devices, updaters, methods for controlling a device, and methods for controlling an updater
CN110187909B (en) Single-chip microcomputer firmware upgrading method based on android system
US10824552B2 (en) Patch mechanism in embedded controller for memory access
CN103365676B (en) The method for upgrading software of communication equipment and device
CN103678194A (en) Device used for ISP (internet service provider) downloading of STM (scanning tunneling microscope) 32 program
CN112822654A (en) Remote measuring terminal machine based on FTP remote firmware upgrading function and control method thereof
CN104461589A (en) Single-chip microcomputer updating method and system
CN105183657A (en) System and method for testing WEB interface
CN106851625A (en) A kind of blue tooth productses OTA upgrade methods
CN108255510B (en) IAP-based transmission verification design method for online upgrading of firmware to be upgraded
CN110673862A (en) Wireless upgrading method, equipment and medium for embedded equipment firmware with dual-use multi-mode
CN103324496A (en) Method for realizing local maintenance of centralized meter reading terminal by using U disk
CN104503804A (en) Single chip microcomputer program online updating method
CN113360161A (en) Resource upgrading method and related product
CN104111845A (en) Processing device and system program changing method
CN103631611A (en) Method and equipment for updating optical transmitter and receiver

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150429