CN102402444A - Method for remotely upgrading software - Google Patents

Method for remotely upgrading software Download PDF

Info

Publication number
CN102402444A
CN102402444A CN201110360552XA CN201110360552A CN102402444A CN 102402444 A CN102402444 A CN 102402444A CN 201110360552X A CN201110360552X A CN 201110360552XA CN 201110360552 A CN201110360552 A CN 201110360552A CN 102402444 A CN102402444 A CN 102402444A
Authority
CN
China
Prior art keywords
code
address
chip microcomputer
routine
interrupt
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
CN201110360552XA
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 Century Real Technology Co ltd
Original Assignee
Beijing Century Real Technology 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 Century Real Technology Co ltd filed Critical Beijing Century Real Technology Co ltd
Priority to CN201110360552XA priority Critical patent/CN102402444A/en
Publication of CN102402444A publication Critical patent/CN102402444A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

A method for remotely upgrading software, comprising: combining a monitoring program code and an application program code required by software upgrading according to an address sequence; for codes with the same address, according to a preset allocation rule, if the address is allocated to the monitoring program, the monitoring program code is reserved, and if the address is allocated to the application program, the application program code is reserved; downloading the combined codes into a single chip microcomputer; and executing the downloaded codes and upgrading the software of the memory of the singlechip. The invention also provides a software installation method. Because the monitoring program code and the application program code are stored according to the preset allocation rule, the problem of code conflict caused by storing different contents in the same address is avoided, so that address modification is not required to be carried out on the interrupt vector of the application program, interrupt address mapping is not required, the interrupt response time is shortened, and the interrupt response speed is improved.

Description

A kind of method of software remote upgrade
Technical field
The embodiment of the invention relates to the singlechip technology field, relates in particular to a kind of method of single-chip microcomputer being carried out the software remote upgrade.
Background technology
Usually; Can utilize inside USART (the Universal Synchronous/Asynchronous Receiver/Transmitter of one section watchdog routine through controller general; Universal synchronous/asynchronous serial reception/transmitter) interface is communicated by letter with PC; Realization is monitored the data of single-chip microcomputer inside Flash storer and is upgraded, thereby realizes the remote upgrade of SCM program.
Wherein, the implementation of single-chip microcomputer being carried out software upgrading is: watchdog routine receives the instruction from PC, according to the data that single-chip microcomputer Flash is wiped in the instruction that receives, upgrades the program area data of Flash then according to the instruction and data that receives.The program area data of upgrading Flash specifically are meant: the upgrade code of needed application software of receiving software is loaded into the code of the application software that receives among the Flash.
The needed watchdog routine of software upgrading is kept in two memory paragraphs of Flash storer.When wiping the data of single-chip microcomputer Flash, can not wipe these two memory paragraphs of depositing watchdog routine.If watchdog routine has taken two sections high address internal memories of FLASH storer, the interrupt vector of application program will leave the end of user Flash memory block in so.
The distribution of the interrupt routine address storage position in the single-chip microcomputer is from 0xFFE0 to 0xFFFF, and what deposit in the interrupt routine address storage position is corresponding interrupt routine address in the watchdog routine.Owing in software upgrade process, need wipe the data among the Flash, and the interrupt vector of application program can be wiped free of also.Therefore, when setting up the needed application program of software upgrading, the deposit position of the interrupt vector of application program in the Flash storer can change.
When interrupting taking place, single-chip microcomputer is searched interrupt vector at the acquiescence interrupt routine address storage position of FLASH storer, and this interrupt vector is corresponding interrupt routine address, jumps to this place, interrupt routine address and carries out interrupt routine.Because what acquiescence interrupt routine address storage position was deposited in the FLASH storer is the interrupt vector of watchdog routine, what therefore single-chip microcomputer was carried out when interrupting taking place is the interrupt routine in the watchdog routine.The function that this interrupt routine is realized is to jump to corresponding interrupt routine place and execution in the application program.This just so-called interrupt address remaps, and needs to increase a jump instruction and could get into the interrupt routine of real application program, has also just increased the response time of interrupting.
As stated, when running application, need to increase a jump instruction and could get into the interrupt routine in the application program, the response time of having interrupted when having increased the application program operation.
Summary of the invention
Embodiments of the invention provide a kind of method of software remote upgrade, thus the long problem of interrupt response time when solving the application program operation.
The objective of the invention is to realize through following technical scheme:
A kind of method of software remote upgrade comprises:
Generate the needed application code of software upgrading;
The needed application code of said generation software upgrading comprises: according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of the needed application program of software upgrading;
Send said application code to said single-chip microcomputer;
Operation monitoring program on said single-chip microcomputer receives said application code, and said application code is write in the storer of said single-chip microcomputer;
Comprise in the said storer of said application code being write said single-chip microcomputer: the interrupt vector of said application code is saved in in the part address field on the interrupt routine address storage position of its distribution;
Withdraw from said watchdog routine, move said application program.
Technical scheme by the embodiment of the invention described above provides can be found out, in the embodiment of the invention, generates the needed application code of software upgrading according to predetermined address assignment rule.Because in the predetermined address assignment rule; Distributed fixing storage address for the interrupt vector of application program on the interrupt routine address storage position in the storer of single-chip microcomputer; Therefore in the process of upgrading application software, need not change the deposit position of interrupt vector.Avoided that interrupt address remaps in the application software operational process, shortened the response time of interrupting, improved the interrupt response speed of application program.
In addition, the method that embodiments of the invention also provide a kind of software to install, the long problem of interrupt response time when solving the application program operation.
The objective of the invention is to realize through following technical scheme:
The method that a kind of software is installed comprises:
Generate application code;
Said generation application code comprises: according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of application program;
Generate the watchdog routine code;
Said generation watchdog routine code comprises: according to predetermined address assignment rule, for the interrupt vector of watchdog routine is distributed the part address field on the interrupt routine address storage position in the said storer; For the interrupt vector addresses distributed section of the interrupt vector addresses distributed Duan Yuwei watchdog routine of application program does not repeat;
Said application code and said watchdog routine code are downloaded in the said storer of single-chip microcomputer;
Move said application program.
The method that a kind of software is installed comprises:
Generate application code and watchdog routine code respectively;
Storage address order according to distributing makes up said application code and said watchdog routine code;
Said said application code and said watchdog routine code are made up comprises:
If existing watchdog routine code on the corresponding position of identical interrupt vector storage address, again application code arranged; Then according to predetermined address assignment rule; The position that the storage address that distributes in the interrupt vector that is watchdog routine is corresponding keeps the code of watchdog routine, and the position that the storage address that distributes in the interrupt vector that is application program is corresponding keeps the code of application program; The storage address of storage address that said interrupt vector for watchdog routine is distributed and said interrupt vector for application program all is meant the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer, and does not repeat for the interrupt vector addresses distributed section of the interrupt vector addresses distributed Duan Yuwei watchdog routine of application program;
The code that obtains after the combination is downloaded in the storer of single-chip microcomputer;
Move said application program.
Technical scheme by the embodiment of the invention described above provides can be found out, in the embodiment of the invention, generates software according to predetermined address assignment rule needed application code and watchdog routine code are installed.Because in the predetermined address assignment rule; Distributed fixing storage address for the interrupt vector of application program on the interrupt routine address storage position in the storer of single-chip microcomputer; And this storage address does not conflict with the storage address of the interrupt vector of watchdog routine; Therefore avoided that interrupt address remaps in the application software operational process, shortened the response time of interrupting, improved the interrupt response speed of application program.
 
Description of drawings
The method flow diagram that Fig. 1 provides for application implementation example one of the present invention;
The serial communication bus system architecture synoptic diagram that Fig. 2 provides for application implementation example two of the present invention;
The method flow diagram that Fig. 3 provides for the embodiment of the invention three.
 
Embodiment
The embodiment of the invention provides a kind of method of software remote upgrade, and its implementation comprises following operation:
Step 1, the needed application code of generation software upgrading;
Wherein, generate in the process of application code, be distributed in the storage address in the storer of single-chip microcomputer for the each several part code segment.Special, according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of the needed application program of software upgrading;
Step 2, send said application code to single-chip microcomputer;
Step 3, on single-chip microcomputer the operation monitoring program, receive said application code through said watchdog routine, and said application code write in the storer of single-chip microcomputer;
Wherein, the concrete implementation of step 3 can be, application code to be write in the storer of single-chip microcomputer according to the storage address that distributes for the each several part code segment in the application code by watchdog routine.For example, the interrupt vector with said application code is saved in in the part address field on the interrupt routine address storage position of its distribution.
Step 4, withdraw from said watchdog routine, move said application program.
The method that the embodiment of the invention provides; In advance space in the storer of single-chip microcomputer is distributed; Particularly distribute interrupting the program address deposit position; Make its partially the location section be used for depositing the interrupt vector of watchdog routine, a part of in addition address section is used for depositing the interrupt vector of application program.Address assignment rule according to predetermined generates the needed application code of software upgrading.Because in the predetermined address assignment rule; Distributed fixing storage address for the interrupt vector of application program on the interrupt routine address storage position in the storer of single-chip microcomputer; Therefore in the process of upgrading application software, need not change the deposit position of interrupt vector.Interrupt address remaps when having avoided the application software operation, has shortened the response time of interrupting, and has improved the interrupt response speed of application program.
In the embodiment of the invention, the storer of described single-chip microcomputer can but be not limited only to be meant the Falsh storer of single-chip microcomputer.
In addition, in the prior art, serial device is not carried out the implementation of software upgrading yet.The method that the embodiment of the invention provides can also realize serial device is carried out the software remote upgrade.Its implementation can be at first need to confirm the serial device single-chip microcomputer address of upgrading.Then the process of software upgrading specifically is to carry out to the serial device single-chip microcomputer that needs upgrading.Accordingly, above-mentioned steps 1 specifically is meant, to the said serial device single-chip microcomputer that needs upgrading, generates the needed application code of software upgrading; Above-mentioned steps 2 specifically is meant, according to the said serial device single-chip microcomputer address that needs upgrading, sends said application code to the said serial device single-chip microcomputer of upgrading that needs.
The method that the embodiment of the invention also provides a kind of software to install, its implementation comprises following operation:
Step 1, generation application code;
Wherein, generate in the process of application code, be distributed in the storage address in the storer of single-chip microcomputer for the each several part code segment.Special, according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of application program;
Step 2, generation watchdog routine code;
Wherein, generate in the process of watchdog routine code, be distributed in the storage address in the storer of single-chip microcomputer for the each several part code segment.Special, according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of watchdog routine.
For the address field of application code addresses distributed Duan Yuwei watchdog routine assignment of code does not repeat.Special, for the interrupt vector addresses distributed section of the interrupt vector addresses distributed Duan Yuwei watchdog routine of application program does not repeat.
Should be pointed out that there are not the qualification of the sequencing on the sequential in above-mentioned steps 1 and step 2.
Step 3, said application code and said watchdog routine code are downloaded in the storer of single-chip microcomputer;
Concrete, according to the addresses distributed section, difference application storing code and watchdog routine code in the storer of single-chip microcomputer.
Step 4, move said application program.
Technical scheme by the embodiment of the invention described above provides can be found out, in the embodiment of the invention, generates software according to predetermined address assignment rule needed application code and watchdog routine code are installed.Because in the predetermined address assignment rule; Distributed fixing storage address for the interrupt vector of application program on the interrupt routine address storage position in the storer of single-chip microcomputer; And this storage address does not conflict with the storage address of the interrupt vector of watchdog routine; Therefore avoided that interrupt address remaps in the application software operational process, shortened the response time of interrupting, improved the interrupt response speed of application program.
In the above-mentioned software installation process, before step 3, can also said application code and said watchdog routine code be made up according to the storage address order of distributing; Then, step 3 specifically is meant: the code that obtains after the said combination is downloaded in the storer of single-chip microcomputer.
The software installation method that the embodiment of the invention provides can also be applied on the serial device single-chip microcomputer.So, before carrying out above-mentioned software fitting operation, this method also comprises: serial device single-chip microcomputer address that need to confirm install software.
Accordingly, said generation application code is meant with generation watchdog routine code, to the serial device single-chip microcomputer that needs install software, generates application code and watchdog routine code; Said application code and said watchdog routine code are downloaded in the storer of single-chip microcomputer and be meant; According to the said serial device single-chip microcomputer address that needs install software, said application code and said watchdog routine code are downloaded in the storer of the said serial device single-chip microcomputer that needs install software.
The method that the embodiment of the invention also provides another kind of software to install, its implementation comprises following operation:
Step 1, generate application code and watchdog routine code respectively;
Wherein, generate in the process of application code, be distributed in the storage address in the storer of single-chip microcomputer for the each several part code segment.
Step 2, according to the storage address order of distributing, said application code and said watchdog routine code are made up;
Wherein, If existing watchdog routine code on the corresponding position of identical interrupt vector storage address, again application code arranged; Then according to predetermined address assignment rule; The position that the storage address that distributes in the interrupt vector that is watchdog routine is corresponding keeps the code of watchdog routine, and the position that the storage address that distributes in the interrupt vector that is application program is corresponding keeps the code of application program; The storage address of storage address that said interrupt vector for watchdog routine is distributed and said interrupt vector for application program all is meant the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer, and does not repeat for the interrupt vector addresses distributed section of the interrupt vector addresses distributed Duan Yuwei watchdog routine of application program.
For example; If in the predetermined address assignment rule; The 0xFFE0 of the interrupt routine address storage position of the storer of single-chip microcomputer is distributed to the interrupt vector of application program to the 0xFFFD address field, 0xFFFE is distributed to the interrupt vector of watchdog routine to the 0xFFFF address field.Then in anabolic process, if existing watchdog routine code on the interrupt routine address storage position has application code again.So, 0xFFE0 keeps application code to the corresponding position of 0xFFFD address field, and 0xFFFE keeps the watchdog routine code to the corresponding position of 0xFFFF address field.
If the interrupt vector code of application program is:
FFE0
FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?80?EE?00?EF?80?EF
FF?FF?00?ED?FF?FF?FF?FF?FF?FF?FF?FF?00?EE?00?C0
q
The interrupt vector code of watchdog routine is:
FFE0
FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF
FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?00?EC
q
Then after the combination, the code of this part is:
FFE0
FF?FF?FF?FF?FF?FF?FF?FF?FF?FF?80?EE?00?EF?80?EF
FF?FF?00?ED?FF?FF?FF?FF?FF?FF?FF?FF?00?EE?00?EC
q
Step 3, the code that obtains after will making up download in the storer of single-chip microcomputer;
Concrete, according to the addresses distributed section, difference application storing code and watchdog routine code in the storer of single-chip microcomputer.
Step 4, move said application program.
Technical scheme by the embodiment of the invention described above provides can be found out, in the embodiment of the invention, generates software according to predetermined address assignment rule needed application code and watchdog routine code are installed.Because in the predetermined address assignment rule; Distributed fixing storage address for the interrupt vector of application program on the interrupt routine address storage position in the storer of single-chip microcomputer; And this storage address does not conflict with the storage address of the interrupt vector of watchdog routine; Therefore avoided that interrupt address remaps in the application software operational process, shortened the response time of interrupting, improved the interrupt response speed of application program.
The software installation method that the embodiment of the invention provides can also be applied on the serial device single-chip microcomputer.So, before carrying out above-mentioned software fitting operation, this method also comprises: serial device single-chip microcomputer address that need to confirm install software.
Accordingly, the said generation application code of stating respectively is meant with generation watchdog routine code, to the serial device single-chip microcomputer that needs install software, generates application code and watchdog routine code respectively; The code that will obtain after said will the combination downloads in the storer of single-chip microcomputer and is meant, according to the said serial device single-chip microcomputer address that needs install software, the code that obtains after the combination is downloaded in the storer of the said serial device single-chip microcomputer that needs install software.
To combine accompanying drawing below, the implementation of the present invention in concrete the application will be elaborated.
Below of the present invention, among each embodiment, preestablished the address assignment rule.This address assignment rule is distributed the interrupt routine address storage position in the Flash storer, and 0xFFE0 is distributed to the interrupt vector of application program to the 0xFFFD address field, 0xFFFE is distributed to the interrupt vector of watchdog routine to the 0xFFFF address field.Because the interrupt vector that watchdog routine is used is merely reseting vector, therefore can the interrupt vector of watchdog routine be regarded as reseting vector.
, when being each interrupt vector memory allocated space of application program, can arbitrarily distribute the 0xFFFD address field at 0xFFE0 according to concrete needs.Distribute 128 fixing bytes of storage space such as giving each interrupt vector; The entry address of interrupt vector is also just fixing like this; In the process of upgrading,, perhaps change the back scope and be no more than 128 bytes afterwards as long as interrupt vector is not done change; Then both can upgrade the interrupt vector section among the FLASH, guarantee renewal process safety.
Application implementation example one
Should use embodiment one from upper pusher side, the method for software remote upgrade provided by the invention is elaborated.Its implementation is as shown in Figure 1, specifically comprises following operation:
Step 11, host computer send querying command to target microcontroller, with the current running status of query aim single-chip microcomputer;
Wherein, host computer is meant the equipment that target microcontroller is carried out remote software upgrade, can be equipment such as PC.
Step 12, host computer are according to the feedback of target microcontroller; Judge the current running status of target microcontroller; If the current running status of target microcontroller is a User Status; Then send the order that switches to upgrade status, make target microcontroller operate in upgrade status, execution in step 13 to target microcontroller; If the current running status of target microcontroller is a upgrade status, then direct execution in step 13;
Step 13, host computer send erase command to target microcontroller, so that target microcontroller is wiped the data of Flash storer;
Wherein, Can indicate single-chip microcomputer to wipe the data of (not comprising the watchdog routine deposit position) of specific region in the Flash storer through erase command, also can indicate single-chip microcomputer to wipe the total data except the watchdog routine deposit position in the Flash storer through erase command.
Whether step 14, host computer inspection wipe successful, if, execution in step 15, otherwise, step 13 returned;
Step 15, host computer write the needed application code of software upgrading through write order in target microcontroller;
Wherein, before this step, host computer has been accomplished the operation that generates application code, and its concrete implementation can repeat no more with reference to the mode of the invention described above embodiment here.
Step 16, host computer inspection write whether the check code of the needed application code of software upgrading is correct, if correct, then execution in step 17, otherwise, return step 13;
Step 17, host computer send the order that switches to User Status to target single board;
Step 18, host computer are checked the application version information after the upgrading, and the application program operation conditions after the test upgrading if test is passed through, is then accomplished updating operation, otherwise, return step 12.
 
Application implementation example two
The method that application implementation example two of the present invention provides can be carried out the software remote upgrade to serial device.With serial communication bus system shown in Figure 2 is example, and on-the-spot main frame is connected with n serial device through serial communication bus, and monitoring central server is connected with on-the-spot main frame through Ethernet.
Under normal mode of operation, n serial device is operated in User Status, and on-the-spot main frame is inquired about the image data of n serial device in real time, and uploads to monitoring central server through Ethernet.
Under the remote upgrade pattern, on-the-spot main frame is in the order transparent transmission mode, and monitoring central server is directly communicated by letter with serial device, one by one serial device is carried out the software remote upgrade then.Wherein, the order transparent transmission mode is meant: on-the-spot main frame is transmitted the Content of Communication between monitoring central server and the serial device, and Content of Communication is not made amendment.
Because essence that serial device is upgraded is that the serial device single-chip microcomputer is carried out software upgrading, therefore, below single-chip microcomputer n upgraded all is meant serial device n is upgraded.
If desired single-chip microcomputer n is carried out the software remote upgrade, then to send to the command address of single-chip microcomputer be the address of single-chip microcomputer n in the monitoring central server setting.Then, the processing procedure through application implementation example one can realize the software remote upgrade to single-chip microcomputer n.Wherein, monitoring central server is the host computer described in the application implementation example one.
In addition, can also realize the batch upgrade of serial device.So, monitoring central server is carried out the software remote upgrade to each target microcontroller successively according to the address of a plurality of target microcontrollers of setting.And non-limiting, monitoring central server can be provided with a plurality of target microcontrollers of continuation address as for example, then in the batch upgrade process, through the address increment or the mode of successively decreasing, successively each target microcontroller is carried out the remote upgrade of software.
 
Application implementation example three
Should use embodiment three from the monolithic pusher side, the method for software remote upgrade provided by the invention is elaborated.Its implementation is as shown in Figure 3, specifically comprises following operation:
Step 31, single-chip microcomputer carry out initialization;
For example, SCM peripheral such as docking port, port status resource is carried out initialization;
Step 32, single-chip microcomputer fetch program Status Flag are (as for example and non-limiting; The storage address of this sign in the Flash storer is: 0xFC00); If this sign is not 0x5A5A; Then jump to watchdog routine start address and execution in step 34, if this sign is 0x5A5A, then execution in step 33;
Step 33, single-chip microcomputer continue 1.5 seconds to monitoring with the interface of host computer; If receive the order that switches to upgrade status during this period; Then jump to the watchdog routine start address,, then jump to the application program start address if do not receive the order that switches to upgrade status;
If jump to the watchdog routine start address, then get into upgrade status, if jump to the application program start address, then get into User Status.No matter in User Status or upgrade status, single-chip microcomputer can receive order and come the update routine Status Flag, and can receive and restart order.As long as just can realizing the running status of single-chip microcomputer, host computer transmission modification Status Flag order and reset command switch.
If jump to the watchdog routine start address, then the erase command of the watchdog routine receiving target single-chip microcomputer of step 34, single-chip microcomputer is wiped the data of Flash storer according to this erase command;
Wherein, Can wipe the data of (not comprising the watchdog routine deposit position) of specific region in the Flash storer according to the indication of erase command by single-chip microcomputer, also can wipe the total data except the watchdog routine deposit position in the Flash storer according to the indication of erase command.
The watchdog routine of step 35, single-chip microcomputer is saved in the application code that receives in the Flash storer after receiving write order;
Special, according to the indication of start address in the code, the interrupt vector of application program is saved in the appropriate address section on the interrupt routine address storage position.
The watchdog routine of step 36, single-chip microcomputer is according to the indication of host computer, the check code of the application code preserved checked, and check result is reported host computer;
The watchdog routine of step 37, single-chip microcomputer is according to the order that switches to User Status that receives, and jumps to the interrupt vector that appropriate address on the interrupt routine address storage position reads application program, to carry out the application program after the upgrading.
The embodiment of the invention three described single-chip microcomputers can be the single-chip microcomputers of serial device.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; The variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (10)

1. the method for a software remote upgrade is characterized in that, comprising:
Generate the needed application code of software upgrading;
The needed application code of said generation software upgrading comprises: according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of the needed application program of software upgrading;
Send said application code to said single-chip microcomputer;
Operation monitoring program on said single-chip microcomputer receives said application code, and said application code is write in the said storer;
Said said application code is write in the said storer comprises:
The interrupt vector of said application code is saved in in the part address field on the interrupt routine address storage position of its distribution;
Withdraw from said watchdog routine, move said application program.
2. method according to claim 1 is characterized in that, before generating the needed application code of software upgrading, this method also comprises: the serial device single-chip microcomputer address of confirming the needs upgrading;
The needed application code of said generation software upgrading is meant, to the said serial device single-chip microcomputer that needs upgrading, generates the needed application code of software upgrading;
Saidly send said application code to said single-chip microcomputer and be meant,, send said application code to the said serial device single-chip microcomputer of upgrading that needs according to the said serial device single-chip microcomputer address that needs upgrading.
3. method according to claim 1 and 2 is characterized in that, said address assignment rule predetermining:
The address field of distributing to said application program on the interrupt routine address storage position is non-reseting vector address field;
The address field of distributing to said watchdog routine on the interrupt routine address storage position is the reseting vector address field.
4. the method that software is installed is characterized in that, comprising:
Generate application code;
Said generation application code comprises: according to predetermined address assignment rule, distribute the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer for the interrupt vector of application program;
Generate the watchdog routine code;
Said generation watchdog routine code comprises: according to predetermined address assignment rule, for the interrupt vector of watchdog routine is distributed the part address field on the interrupt routine address storage position in the said storer; For the interrupt vector addresses distributed section of the interrupt vector addresses distributed Duan Yuwei watchdog routine of application program does not repeat;
Said application code and said watchdog routine code are downloaded in the said storer;
Move said application program.
5. method according to claim 4; It is characterized in that; Before downloading to said application code and said watchdog routine code in the said storer, this method also comprises: the storage address order according to distributing, make up said application code and said watchdog routine code;
Then, said application code and said watchdog routine code are downloaded in the said storer comprise: the code that obtains after the said combination is downloaded in the said storer.
6. according to claim 4 or 5 described methods, it is characterized in that before generating application code, this method also comprises: serial device single-chip microcomputer address that need to confirm install software;
Said generation application code is meant with generation watchdog routine code, to the serial device single-chip microcomputer that needs install software, generates application code and watchdog routine code;
Said application code and said watchdog routine code downloaded in the said storer be meant; According to the said serial device single-chip microcomputer address that needs install software, said application code and said watchdog routine code are downloaded in the storer of the said serial device single-chip microcomputer that needs install software.
7. according to claim 4 or 5 described methods, it is characterized in that said address assignment rule predetermining:
The address field of distributing to said application program on the interrupt routine address storage position is non-reseting vector address field;
The address field of distributing to said watchdog routine on the interrupt routine address storage position is the reseting vector address field.
8. the method that software is installed is characterized in that, comprising:
Generate application code and watchdog routine code respectively;
Storage address order according to distributing makes up said application code and said watchdog routine code;
Said said application code and said watchdog routine code are made up comprises:
If existing watchdog routine code on the corresponding position of identical interrupt vector storage address, again application code arranged; Then according to predetermined address assignment rule; The position that the storage address that distributes in the interrupt vector that is watchdog routine is corresponding keeps the code of watchdog routine, and the position that the storage address that distributes in the interrupt vector that is application program is corresponding keeps the code of application program; The storage address of storage address that said interrupt vector for watchdog routine is distributed and said interrupt vector for application program all is meant the part address field on the interrupt routine address storage position in the storer of single-chip microcomputer;
The code that obtains after the combination is downloaded in the said storer;
Move said application program.
9. method according to claim 8 is characterized in that, before generating application code and watchdog routine code respectively, this method also comprises: serial device single-chip microcomputer address that need to confirm install software;
The said generation application code of stating respectively is meant with generation watchdog routine code, to the serial device single-chip microcomputer that needs install software, generates application code and watchdog routine code respectively;
The code that will obtain after said will the combination downloads in the said storer and is meant, according to the said serial device single-chip microcomputer address that needs install software, the code that obtains after the combination is downloaded in the storer of the said serial device single-chip microcomputer that needs install software.
10. according to Claim 8 or 9 described methods, it is characterized in that said address assignment rule predetermining: the address field of distributing to said application program on the interrupt routine address storage position is non-reseting vector address field;
The address field of distributing to said watchdog routine on the interrupt routine address storage position is the reseting vector address field.
CN201110360552XA 2011-11-15 2011-11-15 Method for remotely upgrading software Pending CN102402444A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110360552XA CN102402444A (en) 2011-11-15 2011-11-15 Method for remotely upgrading software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110360552XA CN102402444A (en) 2011-11-15 2011-11-15 Method for remotely upgrading software

Publications (1)

Publication Number Publication Date
CN102402444A true CN102402444A (en) 2012-04-04

Family

ID=45884677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110360552XA Pending CN102402444A (en) 2011-11-15 2011-11-15 Method for remotely upgrading software

Country Status (1)

Country Link
CN (1) CN102402444A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423995A (en) * 2013-09-03 2015-03-18 北京谊安医疗系统股份有限公司 Auto-updating method and device of power management module for respirator
CN106951276A (en) * 2017-02-09 2017-07-14 苏州精控能源科技有限公司 The software upgrading of multi-controller and address conflict detecting method, device
CN107153613A (en) * 2017-05-11 2017-09-12 山东鲁能智能技术有限公司 BootLoader program debugging methods and system based on HCS12 single-chip microcomputers
CN107729037A (en) * 2017-11-14 2018-02-23 上海电子信息职业技术学院 A kind of method that embedded software independently quickly upgrades
CN109471620A (en) * 2018-10-19 2019-03-15 深圳思为科技有限公司 A kind of automatic generation method of APP, device, terminal device and readable storage medium storing program for executing
CN113242152A (en) * 2021-06-07 2021-08-10 四川九州电子科技股份有限公司 Method for upgrading data terminals in batches based on optical network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584844A (en) * 2003-08-19 2005-02-23 华为技术有限公司 On-line updating method and apparatus of single-chip apparatus
CN1851645A (en) * 2006-01-17 2006-10-25 华为技术有限公司 Upgrading device and method in operation for monolithic processor system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584844A (en) * 2003-08-19 2005-02-23 华为技术有限公司 On-line updating method and apparatus of single-chip apparatus
CN1851645A (en) * 2006-01-17 2006-10-25 华为技术有限公司 Upgrading device and method in operation for monolithic processor system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423995A (en) * 2013-09-03 2015-03-18 北京谊安医疗系统股份有限公司 Auto-updating method and device of power management module for respirator
CN106951276A (en) * 2017-02-09 2017-07-14 苏州精控能源科技有限公司 The software upgrading of multi-controller and address conflict detecting method, device
CN106951276B (en) * 2017-02-09 2020-05-12 苏州精控能源科技有限公司 Multi-controller software upgrading and address conflict detection method and device
CN107153613A (en) * 2017-05-11 2017-09-12 山东鲁能智能技术有限公司 BootLoader program debugging methods and system based on HCS12 single-chip microcomputers
CN107153613B (en) * 2017-05-11 2019-09-24 山东鲁能智能技术有限公司 BootLoader program debugging method and system based on HCS12 single-chip microcontroller
CN107729037A (en) * 2017-11-14 2018-02-23 上海电子信息职业技术学院 A kind of method that embedded software independently quickly upgrades
CN109471620A (en) * 2018-10-19 2019-03-15 深圳思为科技有限公司 A kind of automatic generation method of APP, device, terminal device and readable storage medium storing program for executing
CN113242152A (en) * 2021-06-07 2021-08-10 四川九州电子科技股份有限公司 Method for upgrading data terminals in batches based on optical network
CN113242152B (en) * 2021-06-07 2022-11-08 四川九州电子科技股份有限公司 Method for upgrading data terminals in batches based on optical network

Similar Documents

Publication Publication Date Title
CN102402444A (en) Method for remotely upgrading software
CN109460245B (en) Remote upgrading method for embedded system
US9110843B2 (en) Rack and method thereof for simultaneously updating basic input output systems
CN102779054B (en) The install processing method of application program and device and server
CN102945177B (en) PLC firmware upgrade system and method
CN107066305B (en) Method and device for updating server firmware of server and server
CN106874032B (en) Method and device for upgrading optical module firmware and optical module
CN110633091A (en) Electronic module and software wireless upgrading method thereof
CN104102518A (en) Double-CPU system and program updating method thereof
CN102495744A (en) Control software upgrading method of electronic control devices of electric automobile based on controller area network (CAN) bus
CN105573807A (en) ECU online program upgrading system and method based on CAN bus
US9229658B2 (en) Status information saving among multiple computers
CN107402776A (en) Bluetooth 4-based method for wirelessly upgrading stm32 singlechip controller firmware of mobile phone
CN111240720A (en) Boot program upgrading method and device and storage medium
US9864596B2 (en) Network switch system and operating method thereof
CN104391714A (en) Software update method and software update device for vehicle
CN103106083A (en) Loading method and loading device of firmware
CN105468390B (en) BOOT online upgrading device and method
CN102081526B (en) Basic input/output system architecture
CN109144532A (en) Upgrade method and device
CN116775085B (en) Multi-core heterogeneous system-on-chip updating method, device, chip and traffic equipment
CN105320534B (en) BOOT remote upgrading method, device and system for single board
CN113190250A (en) Cabin software upgrading method, electronic equipment and readable storage medium
CN102722408A (en) Method and apparatus for communication equipment software update
CN103997684A (en) Method and device for updating operating 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
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120404