CN103995712A - Boot loader device capable of updating automatically and updating method thereof - Google Patents

Boot loader device capable of updating automatically and updating method thereof Download PDF

Info

Publication number
CN103995712A
CN103995712A CN201410153269.3A CN201410153269A CN103995712A CN 103995712 A CN103995712 A CN 103995712A CN 201410153269 A CN201410153269 A CN 201410153269A CN 103995712 A CN103995712 A CN 103995712A
Authority
CN
China
Prior art keywords
bootloader
application program
module
boot
ems application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410153269.3A
Other languages
Chinese (zh)
Other versions
CN103995712B (en
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.)
Weichai Power Co Ltd
Original Assignee
Weichai Power 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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN201410153269.3A priority Critical patent/CN103995712B/en
Publication of CN103995712A publication Critical patent/CN103995712A/en
Application granted granted Critical
Publication of CN103995712B publication Critical patent/CN103995712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a boot loader device capable of updating automatically and an updating method thereof. The boot loader device comprises a boot loader first module and a boot loader second module. The boot loader first module is used for operating a boot loader and updating an EMS area. The boot loader second module is used for updating a boot loader in the boot loader first module according to a boot and updating loader sent by an upper computer. By using the device, fault response and recovery of the boot loader can be realized, the cumbersome work that in the prior art, maintenance personnel need to open an ECU for program resetting is avoided, and the workload of the maintenance personnel is greatly lowered.

Description

A kind of bootloader device and update method of automatic renewal
Technical field
The present invention relates to single-chip microcomputer control technology field, particularly a kind of bootloader device and update method of automatic renewal.
Background technology
Along with in existing Electromechanical Control technical field, electronic control unit ECU(Electronic Control Unit) be widely used on various control electronics.
In joint-track type accumulator spraying system, ECU is used for by the signal of receiving sensor, eject correct distributive value with correct injection pressure at correct oil spout point by diesel oil by means of the solenoid valve on fuel injector, ensure the ratio of combustion of diesel engine the best, best atomizing effect and the best duration of ignition, to realize good economy and minimum disposal of pollutants.
Wherein, in ECU, include bootloader boot and EMS application program.Bootloader bootstrap module is the first paragraph software code of operation after system powers on, for guiding, refresh routine and data.EMS application module comprises basic software and application software, is that ECU can the needed program of the normal work of control engine.
In the prior art, bootloader boot and EMS application program are all in same compiling mirror image.When Bootloader boot self, bootloader boot correlative code need to be copied in RAM and carries out.
But in this use-pattern, there is certain risk:
Situation is in the time that the EMS application program in image file is modified, and the bootloader program in mirror image or whole image file are caused to mistake amendment, makes bootloader boot or the image file can not normal load; Another kind of situation is to occur the situations such as unexpected power-off in the time that bootloader boot is upgraded, and causes bootloader program upgrade imperfect.In above two kinds of situations, all can cause system in the time re-powering, to occur mistake to the destruction of bootloader program.And its solution can only be by maintainer by the ECU operation of uncapping, use the emulators such as Trace32 or P & E again to write with a brush dipped in Chinese ink ECU, thereby greatly increased maintainer's workload.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of bootloader device and update method of automatic renewal, realize fault recovery or version updating to bootloader boot in ECU, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement,, greatly reduced maintainer's workload.
A bootloader device for automatic renewal, comprising:
Bootloader boot the first module and bootloader boot the second module;
Described bootloader boot the first module, for moving bootloader boot;
Described bootloader boot the second module, guides refresh routine to upgrade the bootloader boot of described bootloader boot the first module for the bootloader sending according to host computer.
Preferably, after described bootloader boot the second module is arranged on described bootloader boot the first module, in the time that described bootloader boot the first module can not normally be moved bootloader boot, order is moved described bootloader boot the second module.
Preferably, described bootloader boot the second module, also comprises: upgrade and unsuccessfully feed back submodule;
Submodule is unsuccessfully fed back in described renewal, for in the time that the bootloader guiding refresh routine that uses described host computer to send cannot normally upgrade the bootloader boot of described bootloader boot the first module, send and upgrade error message to described host computer.
Preferably, described bootloader boot the second module, also comprises: current process feedback submodule;
Described current process feedback submodule, for receiving after the query statement of described host computer, feeds back the program information of current operation to described host computer.
Preferably, described bootloader boot the first module also comprises: boot is upgraded redirect submodule;
Described boot is upgraded redirect module, and in the time receiving the bootloader boot update instruction of described host computer transmission, redirect moves described bootloader boot the second module.
Preferably, also comprise: EMS application program module;
Described EMS application program module, for operation EMS application program after the normal operation of described bootloader boot.
Preferably, described bootloader boot the first module also comprises: EMS application program update submodule;
Described EMS application program update submodule, for upgrading the EMS application program of described EMS application program module according to the EMS application refresh routine of host computer transmission.
Preferably, in described EMS application program module, also comprise: application program update redirect submodule;
Described application program update redirect submodule, in the time receiving the EMS application program update instruction of described host computer transmission, redirect moves the EMS application program update submodule in described bootloader boot the first module.
Preferably, described bootloader boot the first module also comprises: EMS application timing loads submodule;
Described EMS application timing loads submodule, for before described EMS application program module operation, and the at the appointed time interior described EMS application update instruction of waiting for that described host computer sends; The described fixed time is the time window that described host computer sends described EMS application update instruction.
Preferably, described bootloader boot the first module also comprises: EMS application program detection sub-module;
Described EMS application program detection sub-module, whether correct for detection of described EMS application program, if detect, described EMS application program is incorrect, and described bootloader boot the first module is set to waiting status.
A bootloader method for automatic renewal, comprising:
Operation bootloader boot;
Whether detect bootloader boot needs to upgrade;
If described bootlader boot needs to upgrade, the bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot.
Preferably, after the described bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot, also comprise:
If cannot use the bootloader guiding refresh routine that described host computer sends to upgrade described bootloader boot, send and upgrade error message to described host computer.
Preferably, also comprise:
If described bootloader boot is normally moved, move EMS application program.
Preferably, after operation EMS application program, also comprise:
If receive the EMS application program update instruction that described host computer sends, redirect moves described bootloader boot, and the EMS application refresh routine sending according to described host computer upgrades described EMS application program.
Preferably, before described operation EMS application program, also comprise:
Within the described fixed time, wait for and receive the EMS application update instruction that described host computer sends;
If receive the renewal EMS application program instructions that described host computer sends within the described fixed time, receive the local described EMS application program of EMS application refresh routine renewal that described host computer sends.
Preferably, before described operation EMS application program, also comprise:
Whether correctly detect described EMS application program;
If detect, described EMS application program is incorrect, by described bootloader boot waiting status, receives the local described EMS application program of EMS application refresh routine renewal that described host computer sends.
Compared with prior art, the present invention has the following advantages:
In the present invention, comprise bootloader boot the first module and bootloader boot the second module.Wherein, bootloader boot the first module is used for moving bootloader boot.Bootloader boot the second module is upgraded the bootloader boot of described bootloader boot the first module for the bootloader guiding refresh routine sending according to host computer.By using above device, can realize the bootloader boot failure response in ECU is recovered or version updating operation, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Brief description of the drawings
Fig. 1 is the theory diagram of bootloader device first embodiment of a kind of automatic renewal provided by the invention;
Fig. 2 is the theory diagram of bootloader device second embodiment of a kind of automatic renewal provided by the invention;
Fig. 3 is the theory diagram of bootloader device the 3rd embodiment of a kind of automatic renewal provided by the invention;
Fig. 4 is the theory diagram of bootloader device the 4th embodiment of a kind of automatic renewal provided by the invention;
Fig. 5 is the theory diagram of bootloader device the 5th embodiment of a kind of automatic renewal provided by the invention;
Fig. 6 is the theory diagram of bootloader device the 6th embodiment of a kind of automatic renewal provided by the invention;
Fig. 7 is the process flow diagram of bootloader method first embodiment of a kind of automatic renewal provided by the invention;
Fig. 8 is the process flow diagram of bootloader method second embodiment of a kind of automatic renewal provided by the invention;
Fig. 9 is the process flow diagram of bootloader method the 3rd embodiment of a kind of automatic renewal provided by the invention;
Figure 10 is the process flow diagram of bootloader method the 4th embodiment of a kind of automatic renewal provided by the invention.
Figure 11 is the process flow diagram of bootloader method the 5th embodiment of a kind of automatic renewal provided by the invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more,, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
In order conveniently to introduce the present invention, the execution sequence when paper ECU startup once.
In the normal start-up course of general ECU, first should load bootloader bootstrap loader, the in the situation that of the normal operation of bootloader bootstrap loader, reload EMS application program, operation basic software and application software wherein.
Referring to Fig. 1, the theory diagram of bootloader device the first embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, this device 100 comprises:
Bootloader boot the first module 10 and bootloader boot the second module 20.
Described bootloader boot the first module 10, for moving bootloader boot.
Described bootloader boot the second module 20, guides refresh routine to upgrade the bootloader boot of described bootloader boot the first module for the bootloader sending according to host computer 40.
In bootloader boot the first module 10, store bootloader boot.And in bootloader boot the second module 20, store the write-in program of reception program and renewal bootloader boot.
In the time that reality is used, first bootloader boot the first module 10 moves bootloader boot.
In some cases, bootloader boot can be because there is normally moving the problem of loading in the situations such as mistake amendment or power-off suddenly.Therefore, after bootloader boot the second module 20 can being arranged on to described bootloader boot the first module 10.Like this, in the time occurring that bootloader boot the first module 10 can not normally be moved bootloader boot,, order is moved described bootloader boot the second module 20.In addition, situation that can not normal load if there is bootloader boot now, can also be pointed out user or host computer 40 by modes such as trouble light or message instructions, informs that bootloader boot can not normally move.
In other situation time, in host computer 40, also may there is the redaction that needs bootloader boot, need to replace the bootloader boot of the legacy version in bootloader the first module 10.
In the time there is above situation, control can be jumped to bootloader boot the second module 20 and carry out program wherein.Owing to storing the reception program and the bootloader boot write-in program that receive host computer 40 in bootloader boot the second module 20.Therefore, user can be connected host computer 40 with this device, guide refresh routine to send to bootloader boot the second module 20 bootloader by host computer 40, and by bootloader boot the second module 20, the bootloader guiding refresh routine of receiving is upgraded to the bootloader boot in bootloader boot the first module 10, realize re-writing bootloader boot.
In the present embodiment, comprise bootloader boot the first module and bootloader boot the second module.Wherein, bootloader boot the first module is used for moving bootloader boot.Bootloader boot the second module is upgraded the bootloader boot of described bootloader boot the first module for the bootloader guiding refresh routine sending according to host computer.By using above device, can realize the failure response of ECU is recovered or version updating, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduce maintainer's workload.
Referring to Fig. 2, the theory diagram of bootloader device the second embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, described bootloader boot the second module 20, also comprises: upgrade and unsuccessfully feed back submodule 201.
Submodule 201 is unsuccessfully fed back in described renewal, for in the time that the bootloader guiding refresh routine that uses described host computer to send cannot normally upgrade the bootloader boot of described bootloader boot the first module, send and upgrade error message to described host computer.
In the situation that bootloader boot the first module 10 can not normally be moved bootloader, host computer 40 can be sent to bootloader boot in bootloader boot the second module 20, upgrades operation by bootloader boot the second module 20.
But in the time of actual breaking down, host computer 40 does not also know that bootloader boot goes wrong, or other program (for example EMS application program) goes wrong.Therefore, host computer 40 may send EMS application program and upgrades.
If the refresh routine that bootloader boot the second module 20 sends according to host computer 40 cannot be normally to bootloader boot upgrade write fashionable, upgrade and unsuccessfully feed back submodule 201 and can send message to host computer 40, prompting host computer 40 program updates operating mistakes.
Host computer 40 is receiving after program updates operating mistake, can resend refresh routine according to content wherein.For example: host computer is EMS application refresh routine what send for the first time, unsuccessfully feed back after the renewal error message that submodule 201 sends receiving renewal, change into and send bootloader and guide refresh routine.
In the present embodiment, in bootloader boot the second module, also comprise: upgrade and unsuccessfully feed back submodule.Upgrade and unsuccessfully feed back submodule for sending and upgrade error message to described host computer in the time cannot normally using described bootloader guiding refresh routine to upgrade operation.By using above device, can realize in the time that host computer sends wrong updating file host computer is carried out to error message feedback in time, thereby again sending correct updating file by host computer operates, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Referring to Fig. 3, the theory diagram of bootloader device the 3rd embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, described bootloader boot the second module 20 also comprises: current process feedback submodule 202.
Described current process feedback submodule 202, for receiving after the query statement of described host computer, feeds back the program information of current operation to described host computer.
In some cases, host computer 40, in order to carry out the needs such as program updates or other debugging, also will be understood the present procedure operation information in bootloader device.Therefore, current process feedback submodule 202 can be set in bootloader boot the second module 20.Current process feedback submodule 202, for receiving after the query statement of host computer, returns to the program information of current operation to host computer.For example: host computer sends request to this device, inquire the current program of moving or module.What suppose to move in current bootloader device is bootloader boot, and current process feedback submodule 202 is to the information of host computer feedback bootloader boot.
In the present embodiment, also comprise in bootloader boot the first module 10: boot is upgraded redirect submodule 101.
Described boot is upgraded redirect module 101, and in the time receiving the bootloader boot update instruction of described host computer transmission, redirect moves described bootloader boot the second module.
In the time that needs upgrade bootloader boot, first host computer uses current process feedback submodule 202 to inquire program or the module of current operation, if the result of feedback is that bootloader boot is being moved or bootloader boot the first module is moved, host computer can upgrade redirect submodule 101 to the boot in bootloader boot the first module 10 and sends jump instruction.Boot is upgraded redirect submodule 101 and is being received after jump instruction,, the bootloader boot from moving to be interrupted, the program in bootloader boot the second module is carried out in redirect.Like this, the reception program in bootloader boot the second module and refresh routine just can receive the refresh routine of host computer, and the bootloader boot in bootloader boot the first module is upgraded.
By using above device, can realize the automatic renewal to bootloader boot under normal service condition, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Referring to Fig. 4, the theory diagram of bootloader device the 4th embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, also comprise: EMS application program module 30.
Described EMS application program module 30, for operation EMS application program after the normal operation of described bootloader boot.
After the normal operation bootloader of bootloader boot the first module 10 boot, the EMS application program that just can bring into operation follow-up.Therefore, can, after bootloader boot the first module 10 and bootloader boot the second module 20, EMS application program module 30 be installed in the present embodiment, operation EMS application program after the normal operation of bootloader boot.
In the present embodiment, in bootloader boot the first module 10, also comprise: EMS application program update submodule 102.
Described EMS application program update submodule 102, upgrades the EMS application program of described EMS application program module 30 for the EMS application refresh routine that described host computer 40 is sent.
Due in actual use, EMS application program is also likely because the situations such as mistake amendment or power-off suddenly cause EMS application program normally to move, or need to move the EMS application program of redaction.Therefore, EMS application program also exists and need to carry out the technical requirement of EMS program updates.
In order to realize above function, can in bootloader boot the first module 10, EMS application program update submodule 102 be set.
After the normal operation bootloader of bootloader boot the first module 10 boot, start to move EMS application program by EMS application program module 30.If EMS application program module 30 is in the time there is mistake in operation EMS application program (can point out user or host computer 40 by modes such as trouble light or message instructions), or in host computer, there is the redaction of EMS application program, need to upgrade while replacing the EMS application program in EMS application program module 30, control can be jumped to EMS application program update submodule 102 and wait for instruction and the refresh routine of user or host computer 40.
Connect after this device at host computer 40, send correct EMS application refresh routine by the EMS application program update submodule 102 in bootloader boot the first module 10, upgrade EMS application program by EMS application program update submodule 102.
In order to realize the renewal operation at any time of EMS application program, can in EMS application program module, upgrade redirect submodule 103 by set up applications, for in the time receiving the EMS application program update instruction of described host computer transmission, the EMS application program update submodule 102 in redirect operation bootloader boot the first module 10.Like this, no matter current operation is the EMS application program of what content, can be after the EMS application program update instruction that receives host computer interrupt run, controller is jumped to EMS application program update submodule 102 and carries out.
In the present embodiment, EMS application program update submodule is set in bootloader boot the first module, can cannot normally move while maybe needing to upgrade in EMS application program, the EMS application program that host computer is sent is upgraded operation by EMS application program update module.By using above device, can realize the failure response of EMS application program or program version upgrading, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduce maintainer's workload.
Referring to Fig. 5, the theory diagram of bootloader device the 5th embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, described bootloader boot the first module 10 also comprises: EMS application timing loads submodule 103.
Described EMS application timing loads submodule 103, for before described EMS application program module operation, and the at the appointed time interior described EMS application update instruction of waiting for that described host computer sends; The described fixed time is the time window that described host computer sends described EMS application update instruction.
After the normal operation of bootloader boot, start to start EMS application program module 30 and move EMS application program.
But owing to may there be the EMS application program of redaction at host computer 40,, therefore can before the operation of EMS application program, load submodule 103 timing by EMS application timing and wait for certain hour, for example 50ms.If receiving the EMS application update instruction that host computer 40 sends in window during this period of time, redirect is carried out EMS application program update submodule 102 and is received the EMS application refresh routine sending after host computer 40 and upgrade the EMS application program in this device.If do not receive the EMS application refresh routine of host computer 40, continue the EMS application program that the normal EMS of startup application program module 30 is moved wherein.
In the present embodiment, by being set in bootloader boot the first module, EMS application timing loads submodule, the at the appointed time interior update instruction of waiting for host computer, provide rational time window for automatically upgrading EMS application program, facilitate the renewal to EMS application program in ECU, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Referring to Fig. 6, the theory diagram of bootloader device the 6th embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, in described bootloader boot the first module 10, can also comprise: EMS application program detection sub-module 104.
Described EMS application program detection sub-module 104, whether correct for detection of described EMS application program, if detect, described EMS application program is incorrect, and described bootloader boot the first module is set to waiting status.
Before operation EMS application program time, in order to determine the integrality of EMS application program, can in bootloader boot the first module 10, EMS application program detection sub-module 103 be set.Whether EMS application program detection sub-module 104 can detect EMS application program in EMS application program module 30 complete, if complete, moves loading by EMS application program module 30.If imperfect, think that EMS application program is impaired, can point out user or host computer 40 by modes such as trouble light or message instructions.Simultaneously, bootloader boot the first module 10 can be set to waiting status, until host computer responds EMS application failure, for example host computer 40 sends EMS application refresh routine and upgrades impaired EMS application program in EMS level of application module.
By EMS application program detection sub-module is set in bootloader boot the first module, can realize whether before the each EMS of startup application program module, all automatically detect EMS application program complete, can determine timely the problem of EMS application program, and in conjunction with EMS application program update submodule realized to damage EMS application program renewal upgrade, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Bootloader device based on the above-mentioned a kind of automatic renewal providing, the present invention also provides the method for automatic renewal bootloader a kind of, describes its ingredient in detail below in conjunction with specific embodiment.
Referring to Fig. 7, the process flow diagram of bootloader method the first embodiment that this figure is a kind of automatic renewal provided by the invention.
In the present embodiment, comprising:
S101: operation bootloader boot.
S102: whether detect bootloader boot needs to upgrade.
S103: if described bootlader boot needs to upgrade, the bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot.
Starting after this device, first move bootloader boot.
In some cases, bootloader boot can because the situations such as mistake amendment, power-off suddenly occur cannot normal load problem, need to detect the whether normally operation of bootloader boot.In this case, can point out user or host computer 40 by modes such as trouble light or message instructions, or directly suspend the program of carrying out below, wait for the instruction of host computer 40.
In other cases, there is the bootloader boot of redaction at host computer, need to upgrade replacement to the bootloader boot of storage in this device.
In the time that above situation occurs, can connect host computer, guide refresh routine to send to this locality bootloader by host computer, and use the bootloader guiding refresh routine of receiving to upgrade local bootloader boot, realize re-writing bootloader boot.
In order to ensure to upgrade completing of operation, can, after the bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot, also comprise:
If cannot use the bootloader guiding refresh routine that described host computer sends to upgrade described bootloader boot, send and upgrade error message to described host computer.
In the present embodiment, first move bootloader boot, whether need upgrade, if bootlader boot needs to upgrade, the bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot if detecting afterwards bootloader boot.By using above method, can realize the failure response of bootloader boot is recovered, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduce maintainer's workload.
Referring to Fig. 8, the process flow diagram of bootloader method the second embodiment that this figure is a kind of automatic renewal provided by the invention.
Step S201-203 in the present embodiment is identical with the step S101-S103 in bootloader method the first embodiment automatically upgrading, and no longer repeats to introduce at this.
In the present embodiment, the described bootloader guiding refresh routine sending according to host computer also comprises after upgrading described bootloader boot;
S204: whether detection is used described bootloader guiding refresh routine to upgrade described bootloader boot and normally complete.
S205: if cannot normally use described bootloader guiding refresh routine to upgrade described bootloader boot, send and upgrade error message to described host computer.
In the situation that bootloader boot can not normally be moved or carry out version updating, host computer can guide bootloader refresh routine to send to local update bootloader boot.
But in the time of practical operation, because a variety of causes may may not normally complete in the time that bootloader boot is upgraded; Or host computer may and not know that bootloader boot goes wrong, or EMS application program goes wrong, and host computer may send wrong refresh routine.
Cannot complete at the refresh routine sending according to host computer after the renewal operation of local bootloader boot, user or host computer can send to this locality query statement after renewal completes, and inquiry bootloader boot is upgraded result.Receiving after query statement, renewal error message can sent to host computer and feed back; Or can directly send and upgrade error message to host computer, prompting local program upgrades operating mistake.
Host computer is receiving after program updates operating mistake, can resend refresh routine according to content wherein.What send for the first time as host computer is EMS application refresh routine, upgrades after error message receiving, and changes into and sends bootloader guiding refresh routine.
In the present embodiment, after the bootloader guiding refresh routine sending according to host computer upgrades bootloader boot, also comprise: if cannot use the bootloader guiding refresh routine that host computer sends to upgrade bootloader boot, send and upgrade error message to described host computer.By using above method, can realize after upgrading unsuccessfully host computer is carried out to error message feedback in time, thereby again send correct refresh routine by host computer and upgrade operation, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Referring to Fig. 9, the process flow diagram of bootloader method the 3rd embodiment that this figure is a kind of automatic renewal provided by the invention.
Step S301-303 in the present embodiment is identical with the step S101-S103 in bootloader method the first embodiment automatically upgrading, and no longer repeats to introduce at this.
In the present embodiment, also comprise:
S304: if described bootloader boot is normally moved, move EMS application program.
After the normal operation of bootloader boot, the EMS application program that just can bring into operation follow-up.
Due in actual use, EMS application program is likely because the situations such as mistake amendment or power-off suddenly cause EMS application program normally to move, or need to move the EMS application program of redaction.Therefore, EMS application program also exists and need to carry out the technical requirement of EMS program updates.
Therefore, in the present embodiment, also comprise:
S305: judge whether to receive the EMS application program update instruction that described host computer sends.
S306: if receive the EMS application program update instruction that described host computer sends, redirect moves described bootloader boot, the EMS application refresh routine sending according to described host computer upgrades described EMS application program.
In some cases, may there is the EMS application program of redaction at host computer, need to upgrade replacement to local EMS application program.In this case, host computer may can send to this locality the instruction of EMS application program update at any time.
Receiving after the instruction of EMS application program update, can end the current EMS application program of moving, redirect is being carried out to bootloader boot.Wherein, in bootloader boot, include the write-in program of EMS application program.Be connected to behind this locality at host computer, can use the EMS application refresh routine of the redaction receiving is upgraded and replaces local EMS application program.
In the present embodiment, the in the situation that of the normal operation of bootloader boot, move EMS application program.If receive the EMS application program update instruction that described host computer sends, redirect moves described bootloader boot, and the EMS application refresh routine sending according to described host computer upgrades described EMS application program.By using above method, can realize failure response to EMS application program and program version upgrading, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduce maintainer's workload.
Referring to Figure 10, the process flow diagram of bootloader method the 4th embodiment that this figure is a kind of automatic renewal provided by the invention.
Step S401-S403 in the present embodiment is identical with step S301-S303 and S304 in bootloader method the 3rd embodiment automatically upgrading with S406, no longer repeats to introduce at this.
In the present embodiment, before described operation EMS application program, also comprise:
S404: wait within the described fixed time and receive the EMS application update instruction that described host computer sends.
S405: if receive the renewal EMS application program instructions that described host computer sends within the described fixed time, receive the local described EMS application program of EMS application refresh routine renewal that described host computer sends.
After the normal operation of bootloader boot, EMS application program brings into operation.
But owing to may there is the EMS application program of redaction at host computer, therefore, can before the operation of EMS application program, wait for certain hour, for example 50ms.If receiving the EMS application update instruction that host computer 40 sends in window during this period of time, think that host computer exists the EMS application program of redaction, need to upgrade local EMS application program, the EMS application refresh routine sending according to host computer upgrades local EMS application program.If do not receive the application refresh routine that host computer sends, continue normal operation EMS application program.
In the present embodiment, within at the appointed time, wait for the EMS application update instruction that receives host computer transmission, can upgrade mutual for host computer provides time window to carry out redaction, facilitate the renewal to EMS application program in ECU, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
Referring to Figure 11, the process flow diagram of bootloader method the 5th embodiment that this figure is a kind of automatic renewal provided by the invention.
Step S501-S503 in the present embodiment is identical with step S301-S303 and S304 in bootloader method the 3rd embodiment automatically upgrading with S506, no longer repeats to introduce at this.
In the present embodiment, before described operation EMS application program, also comprise:
S504: whether correctly detect described EMS application program.
S505: described EMS application program is incorrect if detect, by described bootloader boot waiting status, receives the local described EMS application program of EMS application refresh routine renewal that described host computer sends.
Before operation EMS application program time, in order to determine the integrality of EMS application program, whether completely can detect EMS application program, if detect that EMS application program is complete, move this EMS application program.If detect that EMS application program is imperfect, think that EMS application program is impaired, can point out user or host computer by modes such as trouble light or message instructions, meanwhile, wait for that host computer sends EMS application refresh routine and upgrades operation.
In the present embodiment, whether correctly before operation EMS application program, detect EMS application program, if detect that EMS application program is incorrect, receive the local described EMS application program of EMS application refresh routine renewal that host computer sends.By using above method, can realize whether before the each EMS of startup application program module, all automatically detect EMS application program complete, can determine timely the problem of EMS application program, and in conjunction with EMS application program update submodule realized to damage EMS application program renewal upgrade, avoid in prior art maintainer ECU need to be uncapped and carried out the loaded down with trivial details work of program replacement, greatly reduced maintainer's workload.
The above, be only preferred embodiment of the present invention, not the present invention done to any pro forma restriction.Although the present invention discloses as above with preferred embodiment, but not in order to limit the present invention.Any those of ordinary skill in the art, do not departing from technical solution of the present invention scope situation, all can utilize method and the technology contents of above-mentioned announcement to make many possible variations and modification to technical solution of the present invention, or be revised as the equivalent embodiment of equivalent variations.Therefore, every content that does not depart from technical solution of the present invention,, all still belongs in the scope of technical solution of the present invention protection any simple modification made for any of the above embodiments, equivalent variations and modification according to technical spirit of the present invention.

Claims (16)

1. the bootloader device automatically upgrading, is characterized in that, comprising:
Bootloader boot the first module and bootloader boot the second module;
Described bootloader boot the first module, for moving bootloader boot;
Described bootloader boot the second module, guides refresh routine to upgrade the bootloader boot of described bootloader boot the first module for the bootloader sending according to host computer.
2. device according to claim 1, it is characterized in that, after described bootloader boot the second module is arranged on described bootloader boot the first module, in the time that described bootloader boot the first module can not normally be moved bootloader boot, order is moved described bootloader boot the second module.
3. device according to claim 1, is characterized in that, described bootloader boot the second module, also comprises: upgrade and unsuccessfully feed back submodule;
Submodule is unsuccessfully fed back in described renewal, for in the time that the bootloader guiding refresh routine that uses described host computer to send cannot normally upgrade the bootloader boot of described bootloader boot the first module, send and upgrade error message to described host computer.
4. device according to claim 1, is characterized in that, described bootloader boot the second module, also comprises: current process feedback submodule;
Described current process feedback submodule, for receiving after the query statement of described host computer, feeds back the program information of current operation to described host computer.
5. device according to claim 1, is characterized in that, described bootloader boot the first module also comprises: boot is upgraded redirect submodule;
Described boot is upgraded redirect module, and in the time receiving the bootloader boot update instruction of described host computer transmission, redirect moves described bootloader boot the second module.
6. device according to claim 1, is characterized in that, also comprises:: EMS application program module;
Described EMS application program module, for operation EMS application program after the normal operation of described bootloader boot.
7. device according to claim 6, is characterized in that, described bootloader boot the first module also comprises: EMS application program update submodule;
Described EMS application program update submodule, for upgrading the EMS application program of described EMS application program module according to the EMS application refresh routine of host computer transmission.
8. device according to claim 7, is characterized in that, in described EMS application program module, also comprises: application program update redirect submodule;
Described application program update redirect submodule, in the time receiving the EMS application program update instruction of described host computer transmission, redirect moves the EMS application program update submodule in described bootloader boot the first module.
9. device according to claim 7, is characterized in that, described bootloader boot the first module also comprises: EMS application timing loads submodule;
Described EMS application timing loads submodule, for before described EMS application program module operation, and the at the appointed time interior described EMS application update instruction of waiting for that described host computer sends; The described fixed time is the time window that described host computer sends described EMS application update instruction.
10. device according to claim 7, is characterized in that, described bootloader boot the first module also comprises: EMS application program detection sub-module;
Described EMS application program detection sub-module, whether correct for detection of described EMS application program, if detect, described EMS application program is incorrect, and described bootloader boot the first module is set to waiting status.
11. 1 kinds of bootloader methods of automatically upgrading, is characterized in that, comprising:
Operation bootloader boot;
Whether detect bootloader boot needs to upgrade;
If described bootlader boot needs to upgrade, the bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot.
12. methods according to claim 11, is characterized in that, after the described bootloader guiding refresh routine sending according to host computer upgrades described bootloader boot, also comprise:
If cannot use the bootloader guiding refresh routine that described host computer sends to upgrade described bootloader boot, send and upgrade error message to described host computer.
13. methods according to claim 11, is characterized in that, also comprise:
If described bootloader boot is normally moved, move EMS application program.
14. methods according to claim 11, is characterized in that, after operation EMS application program, also comprise:
If receive the EMS application program update instruction that described host computer sends, redirect moves described bootloader boot, and the EMS application refresh routine sending according to described host computer upgrades described EMS application program.
15. methods according to claim 13, is characterized in that, before described operation EMS application program, also comprise:
Within the described fixed time, wait for and receive the EMS application update instruction that described host computer sends;
If receive the renewal EMS application program instructions that described host computer sends within the described fixed time, receive the local described EMS application program of EMS application refresh routine renewal that described host computer sends.
16. methods according to claim 13, is characterized in that, before described operation EMS application program, also comprise:
Whether correctly detect described EMS application program;
If detect, described EMS application program is incorrect, by described bootloader boot waiting status, receives the local described EMS application program of EMS application refresh routine renewal that described host computer sends.
CN201410153269.3A 2014-04-16 2014-04-16 A kind of bootloader devices automatically updated and update method Active CN103995712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410153269.3A CN103995712B (en) 2014-04-16 2014-04-16 A kind of bootloader devices automatically updated and update method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410153269.3A CN103995712B (en) 2014-04-16 2014-04-16 A kind of bootloader devices automatically updated and update method

Publications (2)

Publication Number Publication Date
CN103995712A true CN103995712A (en) 2014-08-20
CN103995712B CN103995712B (en) 2018-05-04

Family

ID=51309890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410153269.3A Active CN103995712B (en) 2014-04-16 2014-04-16 A kind of bootloader devices automatically updated and update method

Country Status (1)

Country Link
CN (1) CN103995712B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360877A (en) * 2014-10-24 2015-02-18 同济大学 ECU (electronic control unit) firmware updating method based on Bootloader self update
CN104391714A (en) * 2014-10-30 2015-03-04 奇瑞汽车股份有限公司 Software update method and software update device for vehicle
CN104699514A (en) * 2015-04-01 2015-06-10 江苏惠通集团有限责任公司 Remote-control end system updating method and device
CN105468420A (en) * 2015-12-25 2016-04-06 广州视睿电子科技有限公司 Operation system upgrade method and device
CN106444730A (en) * 2016-12-19 2017-02-22 普华基础软件股份有限公司 Method for diagnosing electronic control unit for preventing software halt
CN108572839A (en) * 2018-07-12 2018-09-25 四川虹美智能科技有限公司 Intelligent refrigerator system upgrade method, system, intelligent refrigerator and cloud server
WO2018176692A1 (en) * 2017-03-28 2018-10-04 宁德时代新能源科技股份有限公司 System firmware updating method, device and battery management system
CN109358892A (en) * 2018-09-26 2019-02-19 潍柴动力股份有限公司 A kind of method for upgrading software version and device
CN109375941A (en) * 2018-09-29 2019-02-22 延锋伟世通电子科技(南京)有限公司 A kind of novel master-slave mode flash boot loader method for upgrading software applied to combination instrument
CN110162321A (en) * 2019-05-06 2019-08-23 晶晨半导体(上海)股份有限公司 A kind of update method of bootstrap loader
CN110209420A (en) * 2019-08-01 2019-09-06 潍柴动力股份有限公司 A kind of method and device updating bootstrap loader
CN111273928A (en) * 2019-09-10 2020-06-12 深圳市汇泰科电子有限公司 Self-upgrading bootloader design method
CN111475179A (en) * 2019-01-23 2020-07-31 北京新能源汽车股份有限公司 Software online flashing method and device, electronic control unit and upper computer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567184A (en) * 2003-07-03 2005-01-19 英业达股份有限公司 Method for updating and recovering system by bootstrap program
CN101923500A (en) * 2010-07-14 2010-12-22 康佳集团股份有限公司 Backup and update method and device of bootstrap program in embedded equipment
CN103226482A (en) * 2013-03-22 2013-07-31 深圳市九洲电器有限公司 Method and device for guiding and starting set top box
CN103246536A (en) * 2013-04-28 2013-08-14 常州南京大学高新技术研究院 Method for wirelessly upgrading firmware of instrumented positioning system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567184A (en) * 2003-07-03 2005-01-19 英业达股份有限公司 Method for updating and recovering system by bootstrap program
CN101923500A (en) * 2010-07-14 2010-12-22 康佳集团股份有限公司 Backup and update method and device of bootstrap program in embedded equipment
CN103226482A (en) * 2013-03-22 2013-07-31 深圳市九洲电器有限公司 Method and device for guiding and starting set top box
CN103246536A (en) * 2013-04-28 2013-08-14 常州南京大学高新技术研究院 Method for wirelessly upgrading firmware of instrumented positioning system

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360877B (en) * 2014-10-24 2017-12-05 同济大学 ECU firmware updates based on Bootloader self refreshes
CN104360877A (en) * 2014-10-24 2015-02-18 同济大学 ECU (electronic control unit) firmware updating method based on Bootloader self update
CN104391714A (en) * 2014-10-30 2015-03-04 奇瑞汽车股份有限公司 Software update method and software update device for vehicle
CN104699514A (en) * 2015-04-01 2015-06-10 江苏惠通集团有限责任公司 Remote-control end system updating method and device
CN105468420A (en) * 2015-12-25 2016-04-06 广州视睿电子科技有限公司 Operation system upgrade method and device
CN105468420B (en) * 2015-12-25 2018-12-28 广州视睿电子科技有限公司 Operating system update method and apparatus
CN106444730A (en) * 2016-12-19 2017-02-22 普华基础软件股份有限公司 Method for diagnosing electronic control unit for preventing software halt
CN106444730B (en) * 2016-12-19 2022-06-21 普华基础软件股份有限公司 Diagnosis method of electronic control unit for preventing software from being dead
WO2018176692A1 (en) * 2017-03-28 2018-10-04 宁德时代新能源科技股份有限公司 System firmware updating method, device and battery management system
CN108572839A (en) * 2018-07-12 2018-09-25 四川虹美智能科技有限公司 Intelligent refrigerator system upgrade method, system, intelligent refrigerator and cloud server
CN109358892B (en) * 2018-09-26 2022-04-05 潍柴动力股份有限公司 Software version upgrading method and device
CN109358892A (en) * 2018-09-26 2019-02-19 潍柴动力股份有限公司 A kind of method for upgrading software version and device
CN109375941A (en) * 2018-09-29 2019-02-22 延锋伟世通电子科技(南京)有限公司 A kind of novel master-slave mode flash boot loader method for upgrading software applied to combination instrument
CN109375941B (en) * 2018-09-29 2022-01-07 延锋伟世通电子科技(南京)有限公司 Novel master-slave flash boot loader software upgrading method applied to combination instrument
CN111475179A (en) * 2019-01-23 2020-07-31 北京新能源汽车股份有限公司 Software online flashing method and device, electronic control unit and upper computer
CN111475179B (en) * 2019-01-23 2023-10-03 北京新能源汽车股份有限公司 Online software refreshing method and device, electronic control unit and upper computer
CN110162321A (en) * 2019-05-06 2019-08-23 晶晨半导体(上海)股份有限公司 A kind of update method of bootstrap loader
CN110209420A (en) * 2019-08-01 2019-09-06 潍柴动力股份有限公司 A kind of method and device updating bootstrap loader
CN111273928A (en) * 2019-09-10 2020-06-12 深圳市汇泰科电子有限公司 Self-upgrading bootloader design method
CN111273928B (en) * 2019-09-10 2024-02-27 深圳市汇泰科电子有限公司 Bootloader design method for self-upgrading

Also Published As

Publication number Publication date
CN103995712B (en) 2018-05-04

Similar Documents

Publication Publication Date Title
CN103995712A (en) Boot loader device capable of updating automatically and updating method thereof
CN101425018B (en) Embedded firmware upgrading method and device based on sectional form
US7428663B2 (en) Electronic device diagnostic methods and systems
CN101594613A (en) The method of terminal equipment and upgrading thereof, system
US8990776B2 (en) Computing device and device driver debugging method
US9766899B2 (en) Bootloader control via device identifier
CN101826026A (en) Embedded equipment and on-line updating system and method of firmware in embedded equipment
CN105278998A (en) Single-chip microcomputer hardware upgrading method
CN102110000A (en) Method, device and equipment for controlling software for auto-updating
CN102520948A (en) Application program maintenance and update method and device
CN103365696A (en) BIOS (Basic Input Output System) image file obtaining method and device
CN108170494B (en) Application program starting method and starting system for intelligent terminal
CN106775671A (en) A kind of hot patch restorative procedure in the linux environment for communication system
CN103473097A (en) System, device and method for upgrading Android system firmware
CN108874582A (en) A kind of system recovery method, device and terminal
CN102195817A (en) Software upgrading method and device and software rollback method and device
CN103019941A (en) Program debugging method and device
CN105320529A (en) Boot method and device based on NAND-Flash double-boot guidance
CN104391717A (en) Method for dynamically updating code during debugging
CN109710320A (en) A kind of starting guidance BootLoader method of two-stage drive
CN103984585A (en) Method for upgrading Linux kernel in running process of kernel module capable of being plugged in thermal mode
CN102226888B (en) Framework loading method and device
CN104102482A (en) Console serial port and application serial port multiplexing method for embedded systems and application thereof
CN110990177B (en) Fault repairing method, device, system, storage medium and electronic equipment
US20080059981A1 (en) Driving of a multifunction device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant