CN103995712B - A kind of bootloader devices automatically updated and update method - Google Patents
A kind of bootloader devices automatically updated and update method Download PDFInfo
- Publication number
- CN103995712B CN103995712B CN201410153269.3A CN201410153269A CN103995712B CN 103995712 B CN103995712 B CN 103995712B CN 201410153269 A CN201410153269 A CN 201410153269A CN 103995712 B CN103995712 B CN 103995712B
- Authority
- CN
- China
- Prior art keywords
- bootloader
- bootstrap
- ems
- module
- host computer
- 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.)
- Active
Links
Abstract
The present invention provides a kind of bootloader devices automatically updated and update method, including:The second module of the first module of bootloader bootstrap and bootloader bootstrap;First module of bootloader bootstrap, for bootloader bootstrap and renewal EMS areas;Second module of bootloader bootstrap, the bootloader guiding more new procedures for being sent according to host computer update the first mould of bootloader bootstrap bootloader bootstrap in the block.By using apparatus above, it is possible to achieve respond recovery to the program mal of bootloader, avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, and substantially reduces the workload of maintenance personnel.
Description
Technical field
The present invention relates to technical field of single chip microcomputer, more particularly to a kind of bootloader devices automatically updated and more
New method.
Background technology
With in existing technical field of electromechanical control, electronic control unit ECU(Electronic Control
Unit)It is widely used on various control electronics.
In joint-track type accumulator spraying system, ECU is used for the signal by receiving sensor, by means of on fuel injector
Solenoid valve ejects correct distributive value with correct injection pressure by diesel oil in correct oil spout point, ensures that diesel engine is optimal
Ratio of combustion, optimal atomizing effect and the optimal duration of ignition, to realize good economy and minimum disposal of pollutants.
Wherein, bootloader bootstrap and EMS application programs are included in ECU.Bootloader guiding modules are
The first segment software code run after system electrification, for guiding, more new procedures and data.EMS application modules include basis
Software and application software, are that ECU can control the required program of engine work.
In the prior art, bootloader bootstrap and EMS application programs are all in same compiling mirror image.
Performed during Bootloader bootstrap self-renewings, it is necessary to which bootloader bootstrap correlative codes are copied in RAM.
But there are certain risk in this occupation mode:
A kind of situation is when the EMS application programs in image file are modified, to the bootloader in mirror image
Program or whole image file cause to change by mistake, prevent bootloader bootstrap or image file from normal load;It is another
Kind situation is that occur situations such as power-off suddenly when upgrading to bootloader bootstrap, causes bootloader programs
Upgrade imperfect.Destruction in the case of both the above to bootloader programs can all cause system to occur mistake when re-powering
By mistake.And its solution method can only be that ECU is carried out operation of uncapping by maintenance personnel, the emulators such as Trace32 or P&E are used
Again ECU is write with a brush dipped in Chinese ink, so as to considerably increase the workload of maintenance personnel.
The content of the invention
It is real the technical problem to be solved in the present invention is to provide a kind of bootloader devices automatically updated and update method
Now to the fault recovery of bootloader bootstrap or version updating in ECU, maintenance personnel's needs in the prior art are avoided
ECU is uncapped the tedious work reset into line program, substantially reduce the workload of maintenance personnel.
A kind of bootloader devices automatically updated, including:
The second module of the first module of bootloader bootstrap and bootloader bootstrap;
First module of bootloader bootstrap, for running bootloader bootstrap;
Second module of bootloader bootstrap, the bootloader for being sent according to host computer guide renewal
Program updates the first mould of bootloader bootstrap bootloader bootstrap in the block.
Preferably, second module of bootloader bootstrap is installed on the bootloader bootstrap first
It is suitable when first module of bootloader bootstrap is not normally functioning bootloader bootstrap after module
The second module of bootloader bootstrap described in sort run.
Preferably, second module of bootloader bootstrap, further includes:Submodule is unsuccessfully fed back in renewal;
Submodule is unsuccessfully fed back in the renewal, in the bootloader guiding renewal journeys sent using the host computer
When sequence can not normally update first mould of bootloader bootstrap bootloader bootstrap in the block, on described
Position machine sends renewal error message.
Preferably, second module of bootloader bootstrap, further includes:Current process feeds back submodule;
The current process feeds back submodule, for after the inquiry instruction of the host computer is received, to described upper
Machine feeds back currently running program information.
Preferably, first module of bootloader bootstrap further includes:Bootstrap renewal redirects submodule;
The bootstrap updates jump module, for guiding journey in the bootloader for receiving the host computer transmission
During sequence more new command, operation second module of bootloader bootstrap is redirected.
Preferably, further include:EMS application program modules;
The EMS application program modules, for running EMS applications after the bootloader bootstrap normal operation
Program.
Preferably, first module of bootloader bootstrap further includes:EMS application program update submodules;
The EMS application program updates submodule, the EMS for being sent according to host computer are applied described in the renewal of more new procedures
EMS application programs in EMS application program modules.
Preferably, further included in the EMS application program modules:Application program update redirects submodule;
The application program update redirects submodule, for receiving the EMS application programs of the host computer transmission more
During new command, operation the first mould of bootloader bootstrap EMS application program updates submodule in the block is redirected.
Preferably, first module of bootloader bootstrap further includes:EMS applications timing loads submodule;
The EMS applications timing loads submodule, for before EMS application program modules operation, when specified
The interior EMS for waiting the host computer to send applies more new command;The specified time is described in host computer transmission
The time window of EMS applications more new command.
Preferably, first module of bootloader bootstrap further includes:EMS application program detection sub-modules;
The EMS application programs detection sub-module, it is whether correct for detecting the EMS application programs, if detecting institute
It is incorrect to state EMS application programs, first module of bootloader bootstrap is set to wait for state.
A kind of bootloader methods automatically updated, including:
Run bootloader bootstrap;
Whether detection bootloader bootstrap needs to update;
If the bootlader bootstrap needs to update, the bootloader guiding sent according to host computer updates journey
Sequence updates the bootloader bootstrap.
Preferably, the bootloader is updated in the bootloader guiding more new procedures sent according to host computer
After bootstrap, further include:
If the bootloader guiding more new procedures that the host computer is sent can not be used to update the bootloader to draw
Helical pitch sequence, renewal error message is sent to the host computer.
Preferably, further include:
If the bootloader bootstrap normal operation, EMS application programs are run.
Preferably, further included after EMS application programs are run:
If receiving the EMS application program updates instruction that the host computer is sent, redirect the operation bootloader and draw
Helical pitch sequence, the EMS applications more new procedures sent according to the host computer update the EMS application programs.
Preferably, before the operation EMS application programs, further include:
The EMS that the host computer to be received is sent within the specified time etc. applies more new command;
If receiving the renewal EMS application program instructions that the host computer is sent within the specified time, institute is received
State the local EMS application programs of EMS applications more new procedures renewal of host computer transmission.
Preferably, before the operation EMS application programs, further include:
Whether correct detect the EMS application programs;
If detecting, the EMS application programs are incorrect, by the bootloader bootstrap wait state, receive institute
State the local EMS application programs of EMS applications more new procedures renewal of host computer transmission.
Compared with prior art, the present invention has the following advantages:
In the present invention, including the second mould of the first module of bootloader bootstrap and bootloader bootstrap
Block.Wherein, the first module of bootloader bootstrap is used to run bootloader bootstrap.Bootloader guides journey
The bootloader guiding more new procedures that the second module of sequence is used to be sent according to host computer update the bootloader and guide journey
The first mould of sequence bootloader bootstrap in the block.By using apparatus above, it is possible to achieve to the bootloader in ECU
Bootstrap failure response recovers or version updating operation, and avoiding maintenance personnel in the prior art needs to uncap ECU progress
The tedious work that program is reset, substantially reduces the workload of maintenance personnel.
Brief description of the drawings
Fig. 1 is a kind of functional block diagram of bootloader device first embodiments automatically updated provided by the invention;
Fig. 2 is a kind of functional block diagram of bootloader device second embodiments automatically updated provided by the invention;
Fig. 3 is a kind of functional block diagram of bootloader device 3rd embodiments automatically updated provided by the invention;
Fig. 4 is a kind of functional block diagram of bootloader device fourth embodiments automatically updated provided by the invention;
Fig. 5 is a kind of functional block diagram of the 5th embodiment of bootloader devices automatically updated provided by the invention;
Fig. 6 is a kind of functional block diagram of bootloader device sixth embodiments automatically updated provided by the invention;
Fig. 7 is a kind of flow chart of bootloader method first embodiments automatically updated provided by the invention;
Fig. 8 is a kind of flow chart of bootloader method second embodiments automatically updated provided by the invention;
Fig. 9 is a kind of flow chart of bootloader method 3rd embodiments automatically updated provided by the invention;
Figure 10 is a kind of flow chart of bootloader method fourth embodiments automatically updated provided by the invention.
Figure 11 is a kind of flow chart of the 5th embodiment of bootloader methods automatically updated provided by the invention.
Embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with the accompanying drawings to the present invention
Embodiment be described in detail.
In order to facilitate the present invention is introduced, execution sequence when ECU starts is introduced first.
In the normal boot process of general ECU, bootloader bootstrap loaders should be loaded first,
In the case of bootloader bootstrap loader normal operations, reload EMS application programs, run basic software therein and
Application software.
Referring to Fig. 1, which is a kind of original of bootloader device first embodiments automatically updated provided by the invention
Manage block diagram.
In the present embodiment, the present apparatus 100 includes:
The first module of bootloader bootstrap 10 and the second module of bootloader bootstrap 20.
First module of bootloader bootstrap 10, for running bootloader bootstrap.
Second module of bootloader bootstrap 20, for the bootloader guiding sent according to host computer 40
More new procedures update the first mould of bootloader bootstrap bootloader bootstrap in the block.
In the first module of bootloader bootstrap 10, bootloader bootstrap is stored with.And
In the second module of bootloader bootstrap 20, the write-in journey for receiving program and updating bootloader bootstrap is stored with
Sequence.
In actual use, the first module of bootloader bootstrap 10 runs bootloader bootstrap first.
In some cases, situations such as bootloader bootstrap can be because of modification by mistake or power-off suddenly appearance can not be just
The problem of often operation loading.Therefore, the second module of bootloader bootstrap 20 can be installed on the bootloader
After the first module of bootstrap 10.In this way, it is not normally functioning there is the first module of bootloader bootstrap 10
During bootloader bootstrap, sequentially run second module of bootloader bootstrap 20.In addition, if occur
Bootloader bootstrap is unable to the situation of normal load at this time, can also be instructed by trouble light or message etc. mode to
Family or host computer 40 are prompted, and inform that bootloader bootstrap is not normally functioning.
When in yet some other cases, the new edition for needing bootloader bootstrap is there is likely to be in host computer 40
This is, it is necessary to replace the bootloader bootstrap of the legacy version in the first modules of bootloader 10.
When there is case above, control can be jumped to the second module of bootloader bootstrap 20 to perform
Program therein.Due to be stored with the second module of bootloader bootstrap 20 receive host computer 40 reception program and
Bootloader bootstrap write-in programs.Therefore, host computer 40 can be attached by user with the present apparatus, by upper
Bootloader is guided more new procedures to be sent to the second module of bootloader bootstrap 20 by machine 40, and by bootloader
The bootloader being connected to is guided more new procedures renewal bootloader the first moulds of bootstrap by the second module of bootstrap 20
Bootloader bootstrap in block 10, realizes and bootloader bootstrap is re-write.
In the present embodiment, including the second mould of the first module of bootloader bootstrap and bootloader bootstrap
Block.Wherein, the first module of bootloader bootstrap is used to run bootloader bootstrap.Bootloader guides journey
The bootloader guiding more new procedures that the second module of sequence is used to be sent according to host computer update the bootloader and guide journey
The first mould of sequence bootloader bootstrap in the block.By using apparatus above, it is possible to achieve the failure response of ECU is recovered
Or version updating, avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, and subtracts significantly
The small workload of maintenance personnel.
Referring to Fig. 2, which is a kind of original of bootloader device second embodiments automatically updated provided by the invention
Manage block diagram.
In the present embodiment, second module of bootloader bootstrap 20, further includes:Submodule is unsuccessfully fed back in renewal
Block 201.
Submodule 201 is unsuccessfully fed back in the renewal, for being guided more in the bootloader sent using the host computer
When new procedures can not normally update first mould of bootloader bootstrap bootloader bootstrap in the block, to institute
State host computer and send renewal error message.
In the case where the first module of bootloader bootstrap 10 is not normally functioning bootloader, host computer 40
Bootloader bootstrap can be transmitted in the second module of bootloader bootstrap 20, be guided by bootloader
The second module of program 20 is updated operation.
But when actually occurring failure, it is that bootloader bootstrap goes wrong that host computer 40, which is not aware that, still
Other programs(Such as EMS application programs)Go wrong.Therefore, host computer 40 may send EMS application programs and be updated.
If the second module of bootloader bootstrap 20 can not be normally right according to the more new procedures that host computer 40 is sent
When bootloader bootstrap is updated write-in, submodule 201 is unsuccessfully fed back in renewal to send message to host computer 40,
Prompt 40 program of host computer renewal operating mistake.
Host computer 40 can resend renewal journey after program renewal operating mistake is received according to content therein
Sequence.Such as:What host computer was sent in first time is that EMS applies more new procedures, and receiving renewal, unsuccessfully feedback submodule 201 is sent out
After the renewal error message gone out, it is changed to send bootloader guiding more new procedures.
In the present embodiment, further included in the second module of bootloader bootstrap:Submodule is unsuccessfully fed back in renewal.
Renewal unsuccessfully feed back submodule be used for can not described in normal use bootloader guiding more new procedures are updated operation when
Renewal error message is sent to the host computer.By using apparatus above, it is possible to achieve send mistake renewal text in host computer
Error message feedback is carried out in time to host computer during part, is operated so as to send correct more new file again by host computer,
Avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, and substantially reduces and safeguards people
The workload of member.
Referring to Fig. 3, which is a kind of original of bootloader device 3rd embodiments automatically updated provided by the invention
Manage block diagram.
In the present embodiment, second module of bootloader bootstrap 20 further includes:Current process feeds back submodule
Block 202.
The current process feeds back submodule 202, for after the inquiry instruction of the host computer is received, on described
Position machine feeds back currently running program information.
In some cases, host computer 40 in order into line program renewal or it is other debugging etc. need, it will further recognize that
Present procedure operation information in bootloader devices.Therefore, can be in the second module of bootloader bootstrap 20
Current process is set to feed back submodule 202.Current process feedback submodule 202 is used to receive the inquiry instruction of host computer
Afterwards, currently running program information is returned to host computer.Such as:Host computer sends to the present apparatus and asks, and inquiry is currently being transported
Capable program or module.Assuming that what is be currently running in current bootloader devices is bootloader bootstrap, then currently
Information of the progress feedback submodule 202 to host computer feedback bootloader bootstrap.
In the present embodiment, further included in the first module of bootloader bootstrap 10:Bootstrap renewal redirects son
Module 101.
The bootstrap updates jump module 101, for drawing in the bootloader for receiving the host computer transmission
During helical pitch sequence more new command, operation second module of bootloader bootstrap is redirected.
When needing to be updated bootloader bootstrap, host computer feeds back submodule first by current process
The 202 currently running programs of inquiry or module, if the result of feedback be currently running for bootloader bootstrap or
The first module of bootloader bootstrap is currently running, then host computer can be to the first module of bootloader bootstrap 10
In bootstrap renewal redirect submodule 101 send jump instruction.Bootstrap renewal redirects submodule 101 and is receiving jump
After turning instruction, it will be interrupted from the bootloader bootstrap being currently running, redirect and perform bootloader bootstrap second
Mould program in the block.In this way, the second mould of bootloader bootstrap program and more new procedures in the block of receiving can receive
The more new procedures of host computer, are updated the first mould of bootloader bootstrap bootloader bootstrap in the block.
By using apparatus above, it is possible to achieve under normal usage to bootloader bootstrap it is automatic more
Newly, avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, and substantially reduces maintenance
The workload of personnel.
Referring to Fig. 4, which is a kind of original of bootloader device fourth embodiments automatically updated provided by the invention
Manage block diagram.
In the present embodiment, further include:EMS application program modules 30.
The EMS application program modules 30, should for running EMS after the bootloader bootstrap normal operation
Use program.
After 10 normal operation bootloader bootstrap of the first module of bootloader bootstrap, it is possible to start
Run follow-up EMS application programs.Therefore, in the present embodiment can be in 10 He of the first module of bootloader bootstrap
After the second module of bootloader bootstrap 20, installation EMS application program modules 30 are normal in bootloader bootstrap
EMS application programs are run after operation.
In the present embodiment, further included in the first module of bootloader bootstrap 10:EMS application program updates
Module 102.
The EMS application program updates submodule 102, the EMS for the host computer 40 to be sent apply more new procedures
Update the EMS application programs in the EMS application program modules 30.
Since in actual use, EMS application programs are also possible to because modification or unexpected situations such as powering off cause EMS by mistake
Application program can not normal operation, or need run new version EMS application programs.Therefore, there is also need for EMS application programs
Carry out the technical requirements of EMS program renewals.
In order to achieve the above functions, EMS application programs can be set in the first module of bootloader bootstrap 10
Update submodule 102.
After 10 normal operation bootloader bootstrap of the first module of bootloader bootstrap, start by EMS
Application program module 30 runs EMS application programs.If EMS application program modules 30 occur wrong in operation EMS application programs
Mistake(User or host computer 40 can be prompted by the mode such as trouble light or message instruction), or deposited in host computer
EMS application programs new version, it is necessary to when being updated replacement to the EMS application programs in EMS application program modules 30,
Control can be jumped to EMS application program updates submodule 102 and wait the instruction of user or host computer 40 and more new procedures.
After host computer 40 connects the present apparatus, applied by the EMS into the first module of bootloader bootstrap 10
Program renewal submodule 102 sends correct EMS and applies more new procedures, is updated by EMS application program updates submodule 102
EMS application programs.
The renewal of EMS application programs at any time is operated in order to realize, can be in EMS application program modules
Installation application program update redirects submodule 103, for receiving the EMS application program updates instruction of the host computer transmission
When, redirect the EMS application program updates submodule 102 in the first module of operation bootloader bootstrap 10.In this way, no matter
Currently running is the EMS application programs of what content, can be after the EMS application program updates for receiving host computer instruct
Interrupt, controller is jumped into EMS application program updates submodule 102 and is performed.
In the present embodiment, EMS application program update submodules are set in the first module of bootloader bootstrap,
Can EMS application programs can not normal operation or need upgraded when, by host computer send EMS application programs pass through
EMS application program update modules are updated operation.By using apparatus above, it is possible to achieve the failure of EMS application programs is rung
Answer or program version upgrades, avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps,
Substantially reduce the workload of maintenance personnel.
Referring to Fig. 5, which is a kind of original of the 5th embodiment of bootloader devices automatically updated provided by the invention
Manage block diagram.
In the present embodiment, first module of bootloader bootstrap 10 further includes:EMS applications timing loading
Module 103.
The EMS applications timing loads submodule 103, for before EMS application program modules operation, specifying
The EMS that the host computer is sent is waited to apply more new command in time;The specified time sends institute for the host computer
State the time window of EMS applications more new command.
After bootloader bootstrap normal operations, start to start EMS application program modules 30 to run EMS applications
Program.
But due to the EMS application programs in host computer 40 there may be new version, therefore can be transported in EMS application programs
Certain time, such as 50ms are waited by EMS applications timing 103 timing of loading submodule before row.If this period window be inscribed
The EMS for receiving the transmission of host computer 40 applies more new command, then redirects and perform EMS application program updates submodule 102 to receive
EMS application programs in the EMS applications more new procedures renewal present apparatus sent after the machine 40 of position.If it is not received by host computer
40 EMS applies more new procedures, then continues the normal EMS application program modules 30 that start and run EMS application programs therein.
In the present embodiment, by setting EMS applications timing to load submodule in the first module of bootloader bootstrap
Block, can within a specified time wait the more new command of host computer, and rational time window is provided to automatically update EMS application programs
Mouthful, the renewal to EMS application programs in ECU is facilitated, avoiding maintenance personnel in the prior art needs to uncap ECU into stroke
The tedious work that sequence is reset, substantially reduces the workload of maintenance personnel.
Referring to Fig. 6, which is a kind of original of bootloader device sixth embodiments automatically updated provided by the invention
Manage block diagram.
In the present embodiment, can also include in first module of bootloader bootstrap 10:EMS application journeys
Sequence detection sub-module 104.
The EMS application programs detection sub-module 104, it is whether correct for detecting the EMS application programs, if detecting
The EMS application programs are incorrect, then first module of bootloader bootstrap are set to wait for state.
When before running EMS application programs, in order to determine the integrality of EMS application programs, Ke Yi
EMS application programs detection sub-module 103 is set in the first module of bootloader bootstrap 10.EMS application programs detection
Whether the EMS application programs that module 104 can be detected in EMS application program modules 30 are complete, applied if complete by EMS
Program module 30 carries out operation loading.It is if imperfect, then it is assumed that EMS application programs are damaged, and can pass through trouble light or message
The modes such as instruction prompt user or host computer 40.Meanwhile the first module of bootloader bootstrap 10 can be set
Wait state is set to, until host computer responds EMS application failures, such as host computer 40 sends EMS application renewals
The EMS application programs being damaged in program renewal EMS level of application modules.
By setting EMS application program detection sub-modules in the first module of bootloader bootstrap, it is possible to achieve
All whether detection EMS application programs are complete automatically before EMS application program modules are started every time, can timely determine that EMS should
The problem of with program, and the renewal renewal to the EMS application programs of damage is realized with reference to EMS application program update submodules,
Avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, and substantially reduces and safeguards people
The workload of member.
A kind of bootloader devices automatically updated based on above-mentioned offer, present invention also offers one kind to automatically update
The method of bootloader, its part is described in detail with reference to specific embodiment.
Referring to Fig. 7, which is a kind of stream of bootloader method first embodiments automatically updated provided by the invention
Cheng Tu.
In the present embodiment, including:
S101:Run bootloader bootstrap.
S102:Whether detection bootloader bootstrap needs to update.
S103:If the bootlader bootstrap needs to update, the bootloader sent according to host computer is guided more
New procedures update the bootloader bootstrap.
After the present apparatus is started, bootloader bootstrap is run first.
In some cases, situations such as bootloader bootstrap can be because of modification by mistake, power-off suddenly appearance can not be just
Often loading the problem of, it is necessary to detect bootloader bootstrap whether normal operation.In such a case, it is possible to pass through failure
The mode such as lamp or message instruction prompts user or host computer 40, or directly pause performs program below, waits upper
The instruction of machine 40.
In other cases, host computer there are new version bootloader bootstrap, it is necessary to in the present apparatus
The bootloader bootstrap of storage is updated replacement.
When case above occurs, host computer can be connected, guides more new procedures to send out bootloader by host computer
Local is sent to, and using the local bootloader bootstrap of the bootloader guiding more new procedures renewal being connected to, is realized
Bootloader bootstrap is re-write.
, can be in the bootloader guiding more new procedures sent according to host computer more in order to ensure the completion of renewal operation
After the new bootloader bootstrap, further include:
If the bootloader guiding more new procedures that the host computer is sent can not be used to update the bootloader to draw
Helical pitch sequence, renewal error message is sent to the host computer.
In the present embodiment, bootloader bootstrap is run first, and detecting bootloader bootstrap afterwards is
No to need to update, if bootlader bootstrap needs to update, the bootloader guiding sent according to host computer updates journey
Sequence updates the bootloader bootstrap.By using above method, it is possible to achieve to bootloader bootstrap
Failure response recovers, and avoiding maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, significantly
Reduce the workload of maintenance personnel.
Referring to Fig. 8, which is a kind of stream of bootloader method second embodiments automatically updated provided by the invention
Cheng Tu.
Step in step S201-203 in the present embodiment and the bootloader method first embodiments automatically updated
S101-S103 is identical, is not repeated to introduce herein.
In the present embodiment, described in the bootloader guiding more new procedures renewal sent according to host computer
After bootloader bootstrap, further include;
S204:Detection guides whether more new procedures update the bootloader bootstrap using the bootloader
Normally complete.
S205:If the bootloader guiding journey can not be updated by bootloader guiding more new procedures described in normal use
Sequence, then send renewal error message to the host computer.
In the case where bootloader bootstrap is not normally functioning or carries out version updating, host computer can incite somebody to action
Bootloader guiding more new procedures are sent to local update bootloader bootstrap.
But, due to various reasons may may not when being updated to bootloader bootstrap in practical operation
It can normally complete;Or host computer may be not aware that it is that bootloader bootstrap goes wrong, or EMS application programs
Go wrong, host computer may send the more new procedures of mistake.
After the more new procedures sent according to host computer can not complete the renewal operation of local bootloader bootstrap,
User or host computer can send inquiry instruction, inquiry bootloader bootstrap renewal results after the completion of renewal to local.
After inquiry instruction is received, renewal error message can be sent to host computer and be fed back;Or can position directly up
Machine sends renewal error message, prompts local program renewal operating mistake.
Host computer can resend more new procedures after program renewal operating mistake is received according to content therein.
What it is such as host computer transmission for the first time is that EMS applies more new procedures, after renewal error message is received, is changed to send
Bootloader guides more new procedures.
In the present embodiment, draw in the bootloader guiding more new procedures renewal bootloader sent according to host computer
After helical pitch sequence, further include:If the bootloader guiding more new procedures renewal bootloader that host computer can not be used to send
Bootstrap, renewal error message is sent to the host computer.By using above method, it is possible to achieve right after renewal fails
Host computer carries out error message feedback in time, so that sending correct more new procedures again by host computer is updated operation, keeps away
Having exempted from maintenance personnel in the prior art needs the tedious work reset into line program that ECU uncaps, and substantially reduces maintenance personnel
Workload.
Referring to Fig. 9, which is a kind of stream of bootloader method 3rd embodiments automatically updated provided by the invention
Cheng Tu.
Step in step S301-303 in the present embodiment and the bootloader method first embodiments automatically updated
S101-S103 is identical, is not repeated to introduce herein.
In the present embodiment, further include:
S304:If the bootloader bootstrap normal operation, EMS application programs are run.
After bootloader bootstrap normal operations, it is possible to the EMS application programs for bringing into operation follow-up.
Since in actual use, EMS application programs are possible to because modification or unexpected situations such as powering off cause EMS should by mistake
With program can not normal operation, or need run new version EMS application programs.Therefore, there is also needs for EMS application programs
Carry out the technical requirements of EMS program renewals.
Therefore, in the present embodiment, further include:
S305:Judge whether to receive the EMS application program updates instruction that the host computer is sent.
S306:If receiving the EMS application program updates instruction that the host computer is sent, redirect described in operation
Bootloader bootstrap, the EMS applications more new procedures sent according to the host computer update the EMS application programs.
In some cases, in host computer there may be the EMS application programs of new version, it is necessary to be applied to local EMS
Program is updated replacement.In this case, host computer may can send the instruction of EMS application program updates to local at any time.
After the instruction of EMS application program updates is received, the EMS application programs being currently running can be stopped, will be jumped
Turn to perform bootloader bootstrap.Wherein, the write-in journey of EMS application programs is included in bootloader bootstrap
Sequence.After host computer is connected to local, the EMS applications more new procedures renewal for the new version that will be received can be used to replace locally
EMS application programs.
In the present embodiment, in the case of bootloader bootstrap normal operations, then EMS application programs are run.
If receiving the EMS application program updates instruction that the host computer is sent, the operation bootloader bootstrap is redirected,
The EMS applications more new procedures sent according to the host computer update the EMS application programs., can be with by using above method
Realize and the failure response and program version of EMS application programs are upgraded, avoiding maintenance personnel in the prior art needs to open ECU
The tedious work reset into line program is covered, substantially reduces the workload of maintenance personnel.
Referring to Figure 10, which is a kind of stream of bootloader method fourth embodiments automatically updated provided by the invention
Cheng Tu.
In step S401-S403 and S406 in the present embodiment and the bootloader method 3rd embodiments automatically updated
Step S301-S303 and S304 it is identical, be not repeated to introduce herein.
In the present embodiment, before the operation EMS application programs, further include:
S404:The EMS that the host computer to be received is sent within the specified time etc. applies more new command.
S405:If receiving the renewal EMS application program instructions that the host computer is sent within the specified time, connect
Receive the local EMS application programs of EMS applications more new procedures renewal that the host computer is sent.
After bootloader bootstrap normal operations, bring into operation EMS application programs.
But due to the EMS application programs in host computer there may be new version, it can be run in EMS application programs
Preceding wait certain time, such as 50ms.If the EMS application renewals that the transmission of host computer 40 is received in this period window refer to
Order, then it is assumed that host computer there are new version EMS application programs, it is necessary to be updated to local EMS application programs, according to upper
The EMS application programs for the EMS applications more new procedures renewal local that machine is sent.If it is not received by the application of host computer transmission more
New procedures, then continue normal operation EMS application programs.
In the present embodiment, more new command is applied by the EMS that within a specified time etc. host computer to be received is sent, can be with
Time window is provided for host computer and carries out new version renewal interaction, is facilitated the renewal to EMS application programs in ECU, is avoided
Maintenance personnel needs the tedious work reset into line program that ECU uncaps in the prior art, substantially reduces the work of maintenance personnel
Measure.
Referring to Figure 11, which is a kind of stream of the 5th embodiment of bootloader methods automatically updated provided by the invention
Cheng Tu.
In step S501-S503 and S506 in the present embodiment and the bootloader method 3rd embodiments automatically updated
Step S301-S303 and S304 it is identical, be not repeated to introduce herein.
In the present embodiment, before the operation EMS application programs, further include:
S504:Whether correct detect the EMS application programs.
S505:If detecting, the EMS application programs are incorrect, by the bootloader bootstrap wait state,
Receive the local EMS application programs of EMS applications more new procedures renewal that the host computer is sent.
When before running EMS application programs, in order to determine the integrality of EMS application programs, can detect EMS should
It is whether complete with program, if detecting that EMS application programs are complete, run the EMS application programs.If detect that EMS should
It is imperfect with program, then it is assumed that EMS application programs are damaged, can be by the mode such as trouble light or message instruction to user or upper
Machine is prompted, meanwhile, wait host computer to send EMS and be updated operation using more new procedures.
In the present embodiment, it is whether correct that EMS application programs are detected before EMS application programs are run, if detected
EMS application programs are incorrect, receive the local EMS application programs of EMS applications more new procedures renewal that host computer is sent.Pass through
Use above method, it is possible to achieve all whether detection EMS application programs are complete automatically before EMS application program modules are started every time
It is whole, the problem of can timely determining EMS application programs, and realized with reference to EMS application program update submodules to damage
The renewal renewal of EMS application programs, avoiding maintenance personnel in the prior art needs to uncap ECU into the cumbersome of line program replacement
Work, substantially reduces the workload of maintenance personnel.
The above described is only a preferred embodiment of the present invention, not make limitation in any form to the present invention.Though
So the present invention is disclosed above with preferred embodiment, but is not limited to the present invention.It is any to be familiar with those skilled in the art
Member, without departing from the scope of the technical proposal of the invention, all using the methods and technical content of the disclosure above to the present invention
Technical solution makes many possible changes and modifications, or is revised as the equivalent embodiment of equivalent variations.Therefore, it is every without departing from
The content of technical solution of the present invention, the technical spirit according to the present invention is to any simple modification made for any of the above embodiments, equivalent
Change and modification, still fall within technical solution of the present invention protection in the range of.
Claims (15)
- A kind of 1. bootloader devices automatically updated, it is characterised in that including:The second module of the first module of bootloader bootstrap and bootloader bootstrap;First module of bootloader bootstrap, for running bootloader bootstrap;Second module of bootloader bootstrap, for receiving the bootloader guiding renewal journeys of host computer transmission Sequence, and the bootloader guiding more new procedures sent according to host computer update first mould of bootloader bootstrap Bootloader bootstrap in the block;Second module of bootloader bootstrap is installed on after first module of bootloader bootstrap, When first module of bootloader bootstrap is not normally functioning bootloader bootstrap, described in order operation The second module of bootloader bootstrap.
- 2. device according to claim 1, it is characterised in that second module of bootloader bootstrap, is also wrapped Include:Submodule is unsuccessfully fed back in renewal;Submodule is unsuccessfully fed back in the renewal, for sent using the host computer bootloader guiding more new procedures without When method normally updates first mould of bootloader bootstrap bootloader bootstrap in the block, to the host computer Send renewal error message.
- 3. device according to claim 1, it is characterised in that second module of bootloader bootstrap, is also wrapped Include:Current process feeds back submodule;The current process feeds back submodule, anti-to the host computer for after the inquiry instruction of the host computer is received Present currently running program information.
- 4. device according to claim 1, it is characterised in that first module of bootloader bootstrap is also wrapped Include:Bootstrap renewal redirects submodule;The bootstrap updates jump module, for receiving the bootloader bootstrap of the host computer transmission more During new command, operation second module of bootloader bootstrap is redirected.
- 5. device according to claim 1, it is characterised in that further include:EMS application program modules;The EMS application program modules, for running EMS application journeys after the bootloader bootstrap normal operation Sequence.
- 6. device according to claim 5, it is characterised in that first module of bootloader bootstrap is also wrapped Include:EMS application program update submodules;The EMS application program updates submodule, the EMS applications more new procedures for being sent according to host computer update the EMS EMS application programs in application program module.
- 7. device according to claim 6, it is characterised in that further included in the EMS application program modules:Application program Renewal redirects submodule;The application program update redirects submodule, for referring in the EMS application program updates for receiving the host computer transmission When making, operation the first mould of bootloader bootstrap EMS application program updates submodule in the block is redirected.
- 8. device according to claim 6, it is characterised in that first module of bootloader bootstrap is also wrapped Include:EMS applications timing loads submodule;The EMS applications timing loads submodule, for before EMS application program modules operation, within a specified time The EMS that the host computer is sent is waited to apply more new command;The specified time sends the EMS for the host computer should With the time window of more new command.
- 9. device according to claim 6, it is characterised in that first module of bootloader bootstrap is also wrapped Include:EMS application program detection sub-modules;The EMS application programs detection sub-module, it is whether correct for detecting the EMS application programs, if detecting the EMS Application program is incorrect, and first module of bootloader bootstrap is set to wait for state.
- A kind of 10. bootloader methods automatically updated, it is characterised in that including:The first module of bootloader bootstrap runs bootloader bootstrap;Whether detection bootloader bootstrap needs to update;If the bootlader bootstrap needs to update, the second module of bootloader bootstrap receives host computer and sends Bootloader guiding more new procedures, and according to host computer send bootloader guiding more new procedures renewal described in The first mould of bootloader bootstrap bootloader bootstrap in the block;Wherein, second module of bootloader bootstrap be installed on first module of bootloader bootstrap it Afterwards, the method further includes:Bootloader guiding is not normally functioning in first module of bootloader bootstrap During program, second module of bootloader bootstrap is sequentially run.
- 11. according to the method described in claim 10, it is characterized in that, draw in the bootloader sent according to host computer After leading the more new procedures renewal bootloader bootstrap, further include:If the bootloader guiding more new procedures that the host computer is sent can not be used to update the bootloader guiding journey Sequence, renewal error message is sent to the host computer.
- 12. according to the method described in claim 10, it is characterized in that, further include:If the bootloader bootstrap normal operation, EMS application programs are run.
- 13. according to the method for claim 12, it is characterised in that further included after EMS application programs are run:If receiving the EMS application program updates instruction that the host computer is sent, the operation bootloader guiding journey is redirected Sequence, the EMS applications more new procedures sent according to the host computer update the EMS application programs.
- 14. according to the method for claim 12, it is characterised in that before the operation EMS application programs, further include:The EMS that within a specified time etc. the host computer to be received is sent applies more new command;If receiving the renewal EMS application program instructions that the host computer is sent within the specified time, receive on described The local EMS application programs of EMS applications more new procedures renewal that position machine is sent.
- 15. according to the method for claim 12, it is characterised in that before the operation EMS application programs, further include:Whether correct detect the EMS application programs;If detecting, the EMS application programs are incorrect, and the bootloader bootstrap wait state is received on described The local EMS application programs of EMS applications more new procedures renewal that position machine is sent.
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 CN103995712A (en) | 2014-08-20 |
CN103995712B true 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) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104360877B (en) * | 2014-10-24 | 2017-12-05 | 同济大学 | ECU firmware updates based on Bootloader self refreshes |
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 |
CN105468420B (en) * | 2015-12-25 | 2018-12-28 | 广州视睿电子科技有限公司 | Operating system update method and apparatus |
CN106444730B (en) * | 2016-12-19 | 2022-06-21 | 普华基础软件股份有限公司 | Diagnosis method of electronic control unit for preventing software from being dead |
CN108664256A (en) * | 2017-03-28 | 2018-10-16 | 宁德时代新能源科技股份有限公司 | Firmware updating method and device of system 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 |
CN109375941B (en) * | 2018-09-29 | 2022-01-07 | 延锋伟世通电子科技(南京)有限公司 | Novel master-slave flash boot loader software upgrading method applied to combination instrument |
CN111475179B (en) * | 2019-01-23 | 2023-10-03 | 北京新能源汽车股份有限公司 | Online software refreshing method and device, electronic control unit and upper computer |
CN110162321B (en) * | 2019-05-06 | 2023-07-28 | 晶晨半导体(上海)股份有限公司 | Updating method of boot loader |
CN110209420A (en) * | 2019-08-01 | 2019-09-06 | 潍柴动力股份有限公司 | A kind of method and device updating bootstrap loader |
CN111273928B (en) * | 2019-09-10 | 2024-02-27 | 深圳市汇泰科电子有限公司 | Bootloader design method for self-upgrading |
Citations (4)
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 |
-
2014
- 2014-04-16 CN CN201410153269.3A patent/CN103995712B/en active Active
Patent Citations (4)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN103995712A (en) | 2014-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103995712B (en) | A kind of bootloader devices automatically updated and update method | |
CN102495744B (en) | Control software upgrading method of electronic control devices of electric automobile based on controller area network (CAN) bus | |
CN101425018B (en) | Embedded firmware upgrading method and device based on sectional form | |
CN105183515B (en) | The method and device of holder firmware upgrade | |
CN100458729C (en) | Automatic operating method for interface test in embedded operating system | |
CN101281469B (en) | Embedded type system and start-up load application method | |
CN101594613A (en) | The method of terminal equipment and upgrading thereof, system | |
CN102520948A (en) | Application program maintenance and update method and device | |
CN109710320B (en) | Two-stage driving boot loader starting and guiding method | |
CN107659458B (en) | Agent deployment and upgrade method and system based on git version control | |
CN100346290C (en) | Programmable controller, programmable controller system, CPU unit and method of starting duplexed operation | |
CN110196726A (en) | A method of the load of FPGA program remote upgrading is realized based on CPU+CPLD | |
KR20200067474A (en) | Fault injection test method and system for vehicle software based on autosar | |
US7359772B2 (en) | Method, system, and storage medium for communicating with vehicle control | |
CN104538058A (en) | Semi-automatic burning device and method | |
CN102226888B (en) | Framework loading method and device | |
CN110377303B (en) | Method and equipment for upgrading program based on spare storage area mode | |
CN101267645B (en) | Automatic test method and system for service flow software development of W base station | |
CN104699569B (en) | A kind of MQX operation system images structure, MQX operating systems, power information acquisition terminal and image update method | |
CN111459827A (en) | Cross-platform debugging shell implementation method and device and computer | |
US11899561B2 (en) | Method for operating a control unit when testing software of the control unit, and method for operating a test computer when testing software of a control unit | |
CN105677424A (en) | Method for hot loading of component-based development integration based on microkernel | |
CN106598686B (en) | Method and device for realizing differential upgrade debugging in system partition | |
CN101211308A (en) | Microcontroller emulation system | |
CN113741940A (en) | Method for upgrading whole electric vehicle controller bootloader on line |
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 |