CN109933348A - The update method and device of Bootloader in a kind of electronic control unit - Google Patents

The update method and device of Bootloader in a kind of electronic control unit Download PDF

Info

Publication number
CN109933348A
CN109933348A CN201910052372.1A CN201910052372A CN109933348A CN 109933348 A CN109933348 A CN 109933348A CN 201910052372 A CN201910052372 A CN 201910052372A CN 109933348 A CN109933348 A CN 109933348A
Authority
CN
China
Prior art keywords
bootloader
upgrade procedure
determining
validity flag
control unit
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
CN201910052372.1A
Other languages
Chinese (zh)
Other versions
CN109933348B (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.)
NINGBO PREH JOYSON AUTOMOTIVE ELECTRONICS Co Ltd
Original Assignee
NINGBO PREH JOYSON AUTOMOTIVE ELECTRONICS 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 NINGBO PREH JOYSON AUTOMOTIVE ELECTRONICS Co Ltd filed Critical NINGBO PREH JOYSON AUTOMOTIVE ELECTRONICS Co Ltd
Priority to CN201910052372.1A priority Critical patent/CN109933348B/en
Publication of CN109933348A publication Critical patent/CN109933348A/en
Application granted granted Critical
Publication of CN109933348B publication Critical patent/CN109933348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application provides the update methods and device of Bootloader in a kind of electronic control unit, wherein this method comprises: starting jumps the validity flag that management program obtains Bootloader upgrade procedure;In the case where determining the validity flag of Bootloader upgrade procedure is effective status, jumps to and execute Bootloader upgrade procedure, Bootloader is updated by Bootloader upgrade procedure;In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, execution functional software is jumped to;Wherein, starting jumps the different address space that management program, Bootloader, Bootloader upgrade procedure and functional software are respectively stored in the memory space of electronic control unit.It solves the technical problem for updating renewal time length complicated for operation in the presence of existing Bootloader renewal process through the above scheme, has reached to be simple and efficient and realized that Bootloader updates, to achieve the purpose that be promoted Bootloader update efficiency.

Description

The update method and device of Bootloader in a kind of electronic control unit
Technical field
The application belongs to the update of Bootloader in software upgrading technical field more particularly to electronic control unit a kind of Method and apparatus.
Background technique
The function of vehicle-mounted each electronic control unit be gradually developed with the different phase and timing node of automobile research and It realizes.In this process, the hardware of electronic control unit (Electronic Control Unit, referred to as ECU) and soft Part constantly upgrades and perfect with the maturation that vehicle integrates, and reach before vehicle starts volume production vehicle factor function and Quality requirement.Before the software of vehicle-mounted electronic control unit freezes, it will be mounted vehicle in order to the collection of whole vehicle functions At and test.However, automobile ECU requires not allowing exposed or external debugger interface, functional software may in this process It was found that defective or bug, updates vehicle-mounted electronic control unit with regard to inconvenient by fever writes in this way.It just needs at this time Bootloader software built in electronic control unit is wanted, the function that electronic control unit is updated by vehicle mounted communication bus is soft Part.
For vehicle-mounted electronic control unit, Bootloader(bootstrap) be one can be with independently operated journey Sequence, Bootloader are stored in different code memory blocks and shared data memory block from the functional software of electronic control unit, But operate in different tenses.Developer or maintenance personal use host computer tool or separate diagnostic instrument to electronic control The functional software of unit is updated.The Bootloader of host computer tool or separate diagnostic instrument and electronic control unit passes through The agreement of certain format updates to cooperate with assurance function software correctly to be downloaded into the code memory block of electronic control unit Go, specifically, may include: functional software file correct transmission receive and by the file received be written code memory In.The UDS agreement that automobile industry current for data transmission procedure is all adopted international standards, therefore, Bootloader's is main Function includes: Flash driving, standard UDS required for some update softwares is supported to service.
As exclusively for the special software for updating functional software and developing, although the function of itself does not have Bootloader Picture electronic control unit functional software is so complicated, but it is also required to be developed according to the specific requirements of different whole-car firms, And as different timing nodes constantly carries out perfect, defect or Bug may also occur in Bootloader itself.Also To say, Bootloader software can also there is a possibility that need in the different stages the requirement that updates or.Automobile ECU requires not Allow exposed or external debugger interface, after electronic control unit has been mounted to vehicle interior, it is any opening or Removing wherein components is very time-consuming and laborious updating software all and influences client's perception.
Currently, generally using the special software for being referred to as Bootloader upgrade procedure to the update of Bootloader itself Come what is realized.Bootloader upgrade procedure, which generally comprises, to be needed to update to the new Bootloader of electronic control unit and to depositing One Duan Chengxu of reservoir operation.Bootloader upgrade procedure and software function are linked to same memory space.Once Bootloader upgrading needs to execute erasable operation twice to the corresponding memory space of functional software, operates more complicated, And it takes a long time.
For how to solve the above problems, currently no effective solution has been proposed.
Summary of the invention
The application is designed to provide the update method and device of Bootloader in a kind of electronic control unit, Ke Yishi It is now simple and efficient the technical effect for realizing that Bootloader updates, updates efficiency to achieve the purpose that be promoted Bootloader.
The application provides the update method of Bootloader and device in a kind of electronic control unit and is achieved in that
The update method of Bootloader in a kind of electronic control unit, which comprises
Starting jumps the validity flag that management program obtains Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is effective status, execution is jumped to Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, it is soft to jump to execution function Part;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
In one embodiment, the case where the validity flag for determining Bootloader upgrade procedure is invalid state Under, jump to execution functional software, comprising:
In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, the effective of functional software is obtained Property mark;
In the case where determining the validity flag of the functional software is effective status, execution functional software is jumped to;
In the case where determining the validity flag of the functional software is invalid state, current Bootloader is jumped to, And wait instruction to be updated.
In one embodiment, it jumps to and executes Bootloader upgrade procedure, pass through Bootloader upgrade procedure Bootloader is updated, comprising:
Run Bootloader upgrade procedure;
Current Bootloader is wiped by Bootloader upgrade procedure, and replicates new Bootloader to correspondingly Location space;
After determining that duplication is completed, the validity flag position invalid state of Bootloader upgrade procedure is set;
Control electronic control unit restarts reset, starts the starting and jumps management program.
In one embodiment, after replicating new Bootloader to corresponding address space, further includes:
Bootloader upgrade procedure reads the corresponding address space of Bootloader, and it is corresponding to calculate the Bootloader First verification of entire address space and;
Obtain the second verification that new Bootloader is calculated in compilation process and;
In the case where determining first verification and second verification and identical situation, determine that verification passes through;
In the case where determining that verification passes through, determine that duplication is completed.
In one embodiment, it jumps to and executes Bootloader upgrade procedure, pass through Bootloader upgrade procedure Bootloader is updated, comprising:
The Bootloader upgrade procedure of operation is brushed in electronic control unit by vehicle-mounted CAN bus, to pass through Bootloader upgrade procedure is updated Bootloader.
In one embodiment, it in the case where determining the validity flag of the functional software is invalid state, jumps Current Bootloader is gone to, and after waiting instruction to be updated, further includes:
Receive more new command;
Determining that the more new command is that Bootloader is deposited in the case of an update, by the effective of Bootloader upgrade procedure Property traffic sign placement be effective status, and control electronic control unit and restart resets, start described start and jump management program;
Determining that the more new command is that functional software is deposited in the case of an update, by the validity of Bootloader upgrade procedure The validity flag of mark and functional software is both configured to invalid state, and controls electronic control unit and restart reset, starts institute It states starting and jumps management program.
The updating device of Bootloader in a kind of electronic control unit, is located in onboard system, comprising:
Module is obtained, for jumping the validity flag that management program obtains Bootloader upgrade procedure by starting;
First jump module, for determine Bootloader upgrade procedure validity flag be effective status in the case where, It jumps to and executes Bootloader upgrade procedure, Bootloader is updated by Bootloader upgrade procedure;
Second jump module, for determine Bootloader upgrade procedure validity flag be invalid state in the case where, Jump to execution functional software;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
In one embodiment, second jump module includes:
Acquiring unit, for obtaining in the case where determining the validity flag of Bootloader upgrade procedure is invalid state The validity flag of functional software;
First jump-transfer unit, for jumping in the case where determining the validity flag of the functional software is effective status Execute functional software;
Second jump-transfer unit, for jumping in the case where determining the validity flag of the functional software is invalid state Current Bootloader, and wait instruction to be updated.
In one embodiment, first jump module includes:
Running unit, for running Bootloader upgrade procedure;
Updating unit for wiping current Bootloader by Bootloader upgrade procedure, and replicates newly Bootloader is to corresponding address space;
Setting unit, for after determining that duplication is completed, the validity flag position that Bootloader upgrade procedure is arranged to be invalid State;
Control unit restarts reset for controlling electronic control unit, starts the starting and jumps management program.
In one embodiment, first jump module further include:
Computing unit, for after replicating new Bootloader to corresponding address space, control Bootloader to upgrade Program reads the corresponding address space of Bootloader, and calculates the first of the corresponding entire address space of the Bootloader Verification and;
Acquiring unit, for obtain the second verification that new Bootloader is calculated in compilation process and;
First determination unit, for determining verification in the case where determining first verification and second verification and identical situation Pass through;
Second determination unit determines that duplication is completed in the case where determining that verification passes through.
In one embodiment, first jump module is specifically used for passing through vehicle-mounted CAN bus for operation Bootloader upgrade procedure brushes in electronic control unit, to be carried out by Bootloader upgrade procedure to Bootloader It updates.
In one embodiment, above-mentioned apparatus further include:
Receiving module, for jumping to current in the case where determining the validity flag of the functional software is invalid state Bootloader, and after waiting instruction to be updated, receive more new command;
First starting module will for determining that the more new command is that Bootloader is deposited in the case of an update The validity flag of Bootloader upgrade procedure is set as effective status, and controls electronic control unit and restart reset, starting The starting jumps management program;
Second starting module will for determining that the more new command is that functional software is deposited in the case of an update The validity flag of Bootloader upgrade procedure and the validity flag of functional software are both configured to invalid state, and control electricity Sub-control unit restarts reset, starts the starting and jumps management program.
A kind of terminal device, including processor and for the memory of storage processor executable instruction, the processing The step of device realizes following method when executing described instruction:
Starting jumps the validity flag that management program obtains Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is effective status, execution is jumped to Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, it is soft to jump to execution function Part;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
A kind of computer readable storage medium, is stored thereon with computer instruction, and described instruction is performed realization and realizes The step of following method:
Starting jumps the validity flag that management program obtains Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is effective status, execution is jumped to Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, it is soft to jump to execution function Part;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
The update method and device of Bootloader in electronic control unit provided by the present application, setting starting jump management Starting is jumped management program, Bootloader, Bootloader upgrade procedure and function by program and Bootloader upgrade procedure Can software be respectively stored in electronic control unit memory space different address space, starting jump management program when It waits, can determine Bootloader by starting the validity flag for jumping management program and obtaining Bootloader upgrade procedure In the case that the validity flag of upgrade procedure is effective status, jumps to and execute Bootloader upgrade procedure, pass through Bootloader upgrade procedure is updated Bootloader;Determining that the validity flag of Bootloader upgrade procedure is In the case where invalid state, execution functional software is jumped to.Because by starting jump management program, Bootloader, Bootloader upgrade procedure and functional software are assigned with different memory spaces, therefore, are carrying out Bootloader update When, it does not need to carry out erasable operation twice, implements cost and efficiency is relatively high, to solve existing Update complicated for operation, renewal time in the presence of Bootloader renewal process long technical problem, has reached and has been simple and efficient It realizes that Bootloader updates, updates efficiency to achieve the purpose that be promoted Bootloader.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The some embodiments recorded in application, for those of ordinary skill in the art, in the premise of not making the creative labor property Under, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of method stream of embodiment of update method of Bootloader in electronic control unit provided by the present application Cheng Tu.
Fig. 2 is a kind of another party of embodiment of update method of Bootloader in electronic control unit provided by the present application Method flow chart.
Fig. 3 is the structural block diagram of terminal device provided by the present application.
Fig. 4 is a kind of structural frames of embodiment of updating device of Bootloader in electronic control unit provided by the present application Figure.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common The application protection all should belong in technical staff's every other embodiment obtained without creative efforts Range.
In view of existing Bootloader upgrade procedure and functional software are linked to same storage address, in this way After Bootloader upgrade procedure is write with a brush dipped in Chinese ink in memory by original old Bootloader, ECU execution, which is restarted, to be jumped to Bootloader upgrade procedure is run, and Bootloader upgrade procedure, which executes, wipes flash storage, is wiped old New Bootloader is simultaneously write the memory space after erasing by Bootloader, is executed verification and is guaranteed after being successfully written Bootloader upgrade procedure wipes its effective marker position, because when writing with a brush dipped in Chinese ink Bootloader upgrade procedure by functional software Erasing, at this time without effective functional software in memory, it is also necessary to function is write with a brush dipped in Chinese ink in electronic control unit memory again, it is this Method is cumbersome, and cost of implementation is higher.
Based on this, the update method of Bootloader in electronic control unit a kind of is proposed in this example, Fig. 1 is this Shen Please in a kind of electronic control unit update method one embodiment of Bootloader method flow diagram.Although the application It provides as the following examples or method operating procedure shown in the drawings or apparatus structure, but based on conventional or without creativeness Labour may include more or less operating procedure or modular unit in the method or device.In logicality not In the step of there are necessary causalities or structure, the execution sequence of these steps or the modular structure of device are not limited to the application Embodiment description and execution shown in the drawings sequence or modular structure.The device in practice of the method or modular structure Or end product in application, can according to embodiment or method shown in the drawings or modular structure connection the execution of carry out sequence or Person executes (such as environment or even distributed processing environment of parallel processor or multiple threads) parallel.
Specifically, as shown in Figure 1, Bootloader in a kind of electronic control unit that a kind of embodiment of the application provides Update method may include:
Step 101: starting jumps the validity flag that management program obtains Bootloader upgrade procedure, wherein starting jumps Management program, Bootloader, Bootloader upgrade procedure and functional software are respectively stored in the storage of electronic control unit The different address space in space;
Step 102: in the case where determining the validity flag of Bootloader upgrade procedure is effective status, jumping to execution Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
Step 103: in the case where determining the validity flag of Bootloader upgrade procedure is invalid state, jumping to execution Functional software.
In view of when functional software needs to update, needing to start Bootloader pairs when actually realizing Functional software is updated.That is, whether not only needing to control Bootloader upgrade procedure and functional software when starting Starting, it is also necessary to control whether Bootloader starts.For this purpose, determining that the validity flag of Bootloader upgrade procedure is In the case where invalid state, execution functional software is jumped to, may include:
1) in the case where determining the validity flag of Bootloader upgrade procedure is invalid state, obtain functional software has Valid flag;
2) in the case where determining the validity flag of the functional software is effective status, execution functional software is jumped to;
3) it in the case where determining the validity flag of the functional software is invalid state, jumps to current Bootloader, and wait instruction to be updated.
I.e., it is possible to successively judge the state of the validity flag of Bootloader upgrade procedure and having for functional software The state of valid flag, so that it is determined that being starting Bootloader upgrade procedure or startup function software, or starting Bootloader, to realize the demand to different situations.And because starting jump management program, Bootloader, Bootloader upgrade procedure and functional software are respectively stored in the different address space of the memory space of electronic control unit, because This, does not need to carry out multiple erasable operation, will not mutually occupy from each other, so as to effectively promoting Bootloader Update efficiency.
Further, it in the case where determining the validity flag of the functional software is invalid state, jumps to current Bootloader, and after waiting instruction to be updated, can receive more new command;It is in the determining more new command Bootloader is deposited in the case of an update, sets effective status for the validity flag of Bootloader upgrade procedure, and Control electronic control unit restarts reset, starts the starting and jumps management program;Determining that the more new command is that function is soft Part is deposited in the case of an update, and the validity flag of Bootloader upgrade procedure and the validity flag of functional software are all set It is set to invalid state, and controls electronic control unit and restarts reset, starts the starting and jumps management program.
Specifically, executing Bootloader upgrade procedure jumping to, pass through Bootloader upgrade procedure pair When Bootloader is updated, may include:
S1: operation Bootloader upgrade procedure;
S2: wiping current Bootloader by Bootloader upgrade procedure, and replicates new Bootloader to correspondence Address space;
That is, the content in the corresponding memory space of erasing Bootloader, and new Bootloader is written.
S3: after determining that duplication is completed, the validity flag position invalid state of Bootloader upgrade procedure is set;
That is, being completed determining to update, so that it may determine that the function of Bootloader upgrade procedure is completed, therefore, can be set The validity flag position invalid state of Bootloader upgrade procedure.
S4: control electronic control unit restarts reset, starts the starting and jumps management program.
Only have completing to update, can control electronic control unit and restart reset, starts the starting and jump management program, Because of the validity flag position invalid state of Bootloader upgrade procedure at this time, it, will after starting jumps management program Bootloader upgrade procedure will not be restarted, but execute functional software or updated Bootloader.
In order to realize data check, that is, determine whether Bootloader completes correctly to update, can increase and verify Journey.Specifically, can be after replicating new Bootloader to corresponding address space, Bootloader upgrade procedure is read The corresponding address space of Bootloader, and calculate the corresponding entire address space of the Bootloader first verification and; Obtain the second verification that new Bootloader is calculated in compilation process and;Determining first verification and described the Under two verifications and identical situation, determine that verification passes through;In the case where determining that verification passes through, determine that duplication is completed.Wherein, Checksum algorithm used in the checksum algorithm and compilation process that Bootloader upgrade procedure uses is consistent, right The verification that is stored in Bootloader upgrade procedure and with read the verification and compared that the memory block Bootloader is calculated Compared with:
When being updated by Bootloader upgrade procedure to Bootloader, execution can be jumped to The Bootloader upgrade procedure of operation is brushed electronic control unit by vehicle-mounted CAN bus by Bootloader upgrade procedure In, to be updated by Bootloader upgrade procedure to Bootloader.
It is updated in vehicle-mounted electronic control unit to above-mentioned by communication bus below with reference to a specific embodiment The method of Bootloader software is illustrated, it should be noted, however, that the specific embodiment is merely to be better described The application does not constitute an undue limitation on the present application.
Aiming at the problem that inefficiency present in the Bootloader in existing update vehicle-mounted electronic control unit, at this In example, by reasonably utilizing the memory space of vehicle-mounted electronic control unit, and the starting for designing electronic control unit jumps journey Sequence, can to avoid carry out erasable operation twice, simplify Bootloader renewal process, shorten update Bootloader when Between, specifically, may include steps of:
Step a: electronic control unit develops the initial stage, reasonably selects, plans and is stored using the Flash of monolithic machine platform Device, by Bootloader, functional software, Bootloader upgrade procedure and starting jump management program be respectively stored in it is different Address space;
Step b: validity flag is respectively set to functional software and Bootloader upgrade procedure and is linked to fixed storage Address;Wherein, functional software is the software that vehicle driving is supported comprising practical control function, electric under vehicle normal operation Sub-control unit all passes through the software operation function;Bootloader upgrade procedure can operate independently special software, Bootloader upgrade procedure is will not to run under vehicle normal operation;
Step c: jumping management program to starting and be designed, starting jump management program hardware is made it is some necessary initial Change, at this time, starting jumps management program according to the validity flag of functional software and Bootloader upgrade procedure to determine Surely corresponding software is jumped to go to run, it is effective if it is Bootloader upgrade procedure, then preferentially jumping to Bootloader upgrade procedure;Otherwise, it jumps to and goes to run in functional software;
Step d: being brushed the Bootloader upgrade procedure of operation in electronic control unit by vehicle-mounted CAN bus, thus will Old edition Bootloader is wiped from memory, and will include that new edition Bootloader in Bootloader upgrade procedure writes Enter the corresponding memory space of Bootloader;
Step e: after Bootloader is successfully written in the memory block Bootloader, Bootloader upgrade procedure is appointed Business is completed, and Bootloader upgrade procedure effective marker is set in vain by Bootloader upgrade procedure;Electronic control unit is held Row is restarted, and it is invalid according to Bootloader upgrade procedure effective marker that starting jumps management program, jumps to functional software operation;
Further, brush Bootloader upgrade procedure arrive electronic control unit memory when, can by DID read show The version of Bootloader, and with include that version information in Bootloader upgrade procedure compares, if the two phase Together, then judge that the two has been same version, without continuing renewal process, can be wasted to avoid the unnecessary time.
With reference to embodiment, the invention will be further described: one kind is updated vehicle-mounted by communication bus The method of Bootloader software in electronic control unit, steps are as follows:
Step 1: Bootloader, functional software, Bootloader upgrade procedure and starting being jumped into management program and stored respectively In different address spaces;
Step 2: validity flag being respectively set to functional software and Bootloader upgrade procedure and is linked to fixed storage Address;Starting jumps management program and jumps to function according to functional software and the decision of the effective marker of Bootloader upgrade procedure Software or Bootloader upgrade procedure go to execute;
Step 3: design starting jumps management program, and it is that single-chip microcontroller is held after electronic control unit resets that starting, which jumps management program, Capable first segment code determines specifically to jump to Bootloader, functional software according to the effective status of software in memory Or Bootloader upgrade procedure operation.After starting jumps management program, as shown in Fig. 2, preferentially detecting Bootloader Upgrade procedure validity flag is to determine whether there are effective Bootloader upgrade procedure;If it is, jumping to Bootloader upgrade procedure, if Bootloader upgrade procedure validity flag is invalid, jump to functional software or Jump to existing Bootloader.
Step 4: design Bootloader upgrade procedure can operate independently special software, and Bootloader upgrades journey Sequence include: code memory (generally can be flash storage) it is erasable, to the memory block Bootloader based on special algorithm Calculation verifies and is the functions such as invalid to Bootloader upgrade procedure effective marker set;And link and generate secondly into In file processes processed, the new Bootloader that can will be updated in electronic control unit is included in Bootloader upgrade procedure In file;
Step 5: establishing PC machine or diagnostic equipment and vehicle-mounted electronic control unit establishes physical connection, vehicle mounted communication bus is usually CAN bus, guarantee communicate normal;It is interacted by PC machine software or diagnostic equipment with the Bootloader of electronic control unit, Bootloader upgrade procedure is transferred in electronic control unit memory;Bootloader upgrade procedure, which is successfully written, deposits In reservoir, Bootloader upgrade procedure mark can be set to effectively by former Bootloader;
Step 6: electronic control unit restarts and effectively jumps to Bootloader liter according to Bootloader upgrade procedure mark The erasing to the memory block Bootloader is first carried out in grade Cheng Zhihang, Bootloader upgrade procedure, stores in Bootloader After the erasure completion in area, Bootloader upgrade procedure will include that new Bootloader in Bootloader upgrade procedure is copied Shellfish is to the memory block Bootloader, and after new Bootloader copy is completed, Bootloader upgrade procedure is needed to copy Process is verified, to ensure that Bootloader is upgraded successfully;
Step 7: after ensuring that new Bootloader is successfully written in memory, Bootloader upgrade procedure can be set certainly Body effective marker position is invalid and triggers electronic control unit and restart, and starting jumps management program detection Bootloader upgrade procedure Whether mark is in vain, that is, to jump to functional software or new Bootloader goes to execute, and entire Bootloader upgrading is completed;
In above-mentioned steps 5, the writing process of new edition Bootloader is verified, specific method of calibration is: new edition Bootloader can be calculated in compiling verification and, the verification that is calculated in compilation process and Bootloader liter can be stored in In some address of grade program;After copy is completed, Bootloader upgrade procedure is read new Bootloader The memory block Bootloader and to entire address interval computation verification and;The verification and calculation that Bootloader upgrade procedure uses Method must be remained exactly the same with checksum algorithm used in compilation process;To the school stored in Bootloader upgrade procedure Test and with read the verification that is calculated of the memory block Bootloader and be compared:
If 1) two verification with it is identical, then it is assumed that new Bootloader is successfully written to the memory block Bootloader In.After the new Bootloader of determination is successfully written in the memory block Bootloader, Bootloader upgrade procedure Task is completed, and Bootloader upgrade procedure wipes Bootloader upgrade procedure effective marker;Bootloader upgrades journey Sequence then executes electronic control unit and restarts reset if it is determined that Bootloader upgrade procedure effective marker is successfully wiped;It resets Afterwards, Bootloader upgrade procedure effective marker has been wiped free of, and starting, which jumps management program, will jump to functional software or new It is run in Bootloader;
If 2) two verification and it is entirely different, then it is assumed that new Bootloader be written to failing Bootloader storage Qu Zhong, when what new Bootloader failed is written in the memory block Bootloader, Bootloader upgrade procedure will Restart electronic control unit;After restarting reset, Bootloader upgrade procedure effective marker state is still effective, and starting is jumped Turn management program and will jump in Bootloader upgrade procedure to run, the above process will repeat, until new Bootloader is successfully written to the memory block Bootloader.
By way of upper example, the power supply accident power-off of any moment electronic control unit will not result in electronics control The Bootloader of unit processed is damaged and can not pass through vehicle bus more new procedures again again.Specifically, if electronic control is single Member powers off during transmitting Bootloader upgrade procedure, and old Bootloader is still effective;If electronic control unit exists Bootloader upgrade procedure powers off during wiping old Bootloader, then the flag bit of Bootloader upgrade procedure will not It is invalid to be set to, and the execution of Bootloader upgrade procedure can be still jumped to after restarting;If electronic control unit is copying It being powered off during newly Bootloader is into memory, the flag bit of Bootloader upgrade procedure will not be set in vain, The execution of Bootloader upgrade procedure can be still jumped to after restarting.Because only that by Bootloader memory space and The comparison of verification sum in Bootloader upgrade procedure judges that new Bootloader has been successfully written to after memory, It is invalid that Bootloader upgrade procedure effective marker position, which can just be set,.
By way of upper example, the CAN communication bus broken string of any moment electronic control unit will not result in electronics control The Bootloader of unit processed is damaged and can not pass through vehicle bus more new procedures again again.Specifically, if electronic control is single Member loses CAN line during transmitting Bootloader upgrade procedure, and old Bootloader is still effective;If electronic control is single Member loses CAN line during Bootloader upgrade procedure wipes old Bootloader, will not influence Bootloader upgrading Program operation;If electronic control unit loses CAN line, Bu Huiying during copying new Bootloader into memory Ring the operation of Bootloader upgrade procedure.Because only that by Bootloader memory space and Bootloader upgrade procedure Verification sum comparison, judge that embodiment of the method provided by the above embodiments of the present application can be whole in mobile terminal, computer It is executed in end or similar arithmetic unit.For running on the terminal device, Fig. 3 is a kind of electronics of the embodiment of the present invention The hardware block diagram of the terminal device of the update method of Bootloader in control unit.As shown in figure 3, terminal device 10 can To include that one or more (only showing one in figure) processor 102(processor 102 can include but is not limited to microprocessor The processing unit of MCU or programmable logic device FPGA etc.), memory 104 for storing data and be used for communication function Transmission module 106.It will appreciated by the skilled person that structure shown in Fig. 3 is only to illustrate, not to above-mentioned electricity The structure of sub-device causes to limit.For example, terminal device 10 may also include the more or less component than shown in Fig. 3, or Person has the configuration different from shown in Fig. 3.
Memory 104 can be used for storing the software program and module of application software, such as the electronics in the embodiment of the present invention Corresponding program instruction/the module of the update method of Bootloader in control unit, processor 102 are stored in storage by operation Software program and module in device 104 realize above-mentioned electronics control thereby executing various function application and data processing The update method of Bootloader in unit processed.Memory 104 may include high speed random access memory, may also include non-volatile deposit Reservoir, such as one or more magnetic storage device, flash memory or other non-volatile solid state memories.In some instances, Memory 104 can further comprise the memory remotely located relative to processor 102, these remote memories can pass through net Network is connected to terminal 10.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, movement Communication network and combinations thereof.
Transmission module 106 is used to that data to be received or sent via a network.Above-mentioned network specific example may include The wireless network that the communication providers of terminal 10 provide.In an example, transmission module 106 includes that a network is suitable Orchestration (Network Interface Controller, NIC), can be connected by base station with other network equipments so as to Internet is communicated.In an example, transmission module 106 can be radio frequency (Radio Frequency, RF) module, For wirelessly being communicated with internet.
The updating device of Bootloader is as shown in figure 4, may include: in software view, electronic control unit
Module 401 is obtained, for jumping the validity flag that management program obtains Bootloader upgrade procedure by starting;
First jump module 402, for the case where the validity flag for determining Bootloader upgrade procedure is effective status Under, it jumps to and executes Bootloader upgrade procedure, Bootloader is updated by Bootloader upgrade procedure;
Second jump module 403, for being invalid state in the validity flag for determining Bootloader upgrade procedure, function is soft In the case that the validity flag of part is effective status, execution functional software is jumped to;
Third jump module 404, for being invalid state in the validity flag for determining Bootloader upgrade procedure, function is soft In the case that the validity flag of part is invalid state, current Bootloader is jumped to, and wait instruction to be updated.
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and stores respectively In the different address space of the memory space of electronic control unit.
In one embodiment, above-mentioned first jump module 402 may include: running unit, for running Bootloader upgrade procedure;Updating unit, for wiping current Bootloader by Bootloader upgrade procedure, and New Bootloader is replicated to corresponding address space;Setting unit, for being arranged after determining that duplication is completed The validity flag position invalid state of Bootloader upgrade procedure;Control unit is restarted again for controlling electronic control unit Position starts the starting and jumps management program.
In one embodiment, above-mentioned first jump module 402 can also include: computing unit, for new in duplication Bootloader to corresponding address space after, control Bootloader upgrade procedure read Bootloader correspondingly Location space, and calculate the corresponding entire address space of the Bootloader first verification and;Acquiring unit is new for obtaining Bootloader be calculated in compilation process second verification and;First determination unit, for determining described first Under verification and second verification and identical situation, determine that verification passes through;Second determination unit, in the feelings for determining that verification passes through Under condition, determine that duplication is completed.
In one embodiment, above-mentioned first jump module 402 specifically can be used for run by vehicle-mounted CAN bus Bootloader upgrade procedure brush in electronic control unit, with by Bootloader upgrade procedure to Bootloader into Row updates.
It is that above-mentioned apparatus can also include: receiving module in one embodiment, for determining the functional software Validity flag be invalid state in the case where, jump to current Bootloader, and after waiting instruction to be updated, receive More new command;First starting module will for determining that the more new command is that Bootloader is deposited in the case of an update The validity flag of Bootloader upgrade procedure is set as effective status, and controls electronic control unit and restart reset, starting The starting jumps management program;Second starting module, for determining that the more new command is that functional software has update In the case of, the validity flag of the validity flag of Bootloader upgrade procedure and functional software is both configured to invalid shape State, and control electronic control unit and restart reset, start the starting and jumps management program.
Embodiments herein, which also provides, can be realized Bootloader in the electronic control unit in above-described embodiment The specific embodiment of a kind of electronic equipment of Overall Steps in update method, the electronic equipment specifically include following content:
Processor (processor), memory (memory), communication interface (Communications Interface) and total Line;
Wherein, the processor, memory, communication interface complete mutual communication by the bus;The processor is used In calling the computer program in the memory, the processor is realized in above-described embodiment when executing the computer program Electronic control unit in Bootloader update method in Overall Steps, for example, the processor executes the calculating Following step is realized when machine program:
The update method of Bootloader in a kind of electronic control unit, which comprises
Step 1: starting jumps the validity flag that management program obtains Bootloader upgrade procedure;
Step 2: in the case where determining the validity flag of Bootloader upgrade procedure is effective status, jumping to execution Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
Step 3: in the case where determining the validity flag of Bootloader upgrade procedure is invalid state, jumping to execution function It can software;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
As can be seen from the above description, setting starting jumps management program and Bootloader upgrade procedure, starting is jumped into pipe The storage that reason program, Bootloader, Bootloader upgrade procedure and functional software are respectively stored in electronic control unit is empty Between different address space, when starting jumps management program, can by starting jump management program obtain The validity flag of Bootloader upgrade procedure is effective status in the validity flag for determining Bootloader upgrade procedure In the case where, it jumps to and executes Bootloader upgrade procedure, Bootloader is carried out by Bootloader upgrade procedure It updates;In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, it is soft to jump to execution function Part.Because will starting jump management program, Bootloader, Bootloader upgrade procedure and functional software be assigned with it is different Therefore memory space when carrying out Bootloader update, does not need to carry out erasable operation twice, implements cost It is relatively high with efficiency, so that update in the presence of solving existing Bootloader renewal process is complicated for operation, when updating Between long technical problem, reached to be simple and efficient and realized that Bootloader updates, promoted Bootloader to reach and update efficiency Purpose.
Embodiments herein, which also provides, can be realized Bootloader in the electronic control unit in above-described embodiment A kind of computer readable storage medium of Overall Steps in update method is stored with calculating on the computer readable storage medium Machine program, the computer program realize Bootloader in the electronic control unit in above-described embodiment when being executed by processor The Overall Steps of update method, for example, the processor realizes following step when executing the computer program:
Step 1: starting jumps the validity flag that management program obtains Bootloader upgrade procedure;
Step 2: in the case where determining the validity flag of Bootloader upgrade procedure is effective status, jumping to execution Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
Step 3: in the case where determining the validity flag of Bootloader upgrade procedure is invalid state, jumping to execution function It can software;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
As can be seen from the above description, setting starting jumps management program and Bootloader upgrade procedure, starting is jumped into pipe The storage that reason program, Bootloader, Bootloader upgrade procedure and functional software are respectively stored in electronic control unit is empty Between different address space, when starting jumps management program, can by starting jump management program obtain The validity flag of Bootloader upgrade procedure is effective status in the validity flag for determining Bootloader upgrade procedure In the case where, it jumps to and executes Bootloader upgrade procedure, Bootloader is carried out by Bootloader upgrade procedure It updates;In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, it is soft to jump to execution function Part.Because will starting jump management program, Bootloader, Bootloader upgrade procedure and functional software be assigned with it is different Therefore memory space when carrying out Bootloader update, does not need to carry out erasable operation twice, implements cost It is relatively high with efficiency, so that update in the presence of solving existing Bootloader renewal process is complicated for operation, when updating Between long technical problem, reached to be simple and efficient and realized that Bootloader updates, promoted Bootloader to reach and update efficiency Purpose.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for hardware+ For program class embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to side The part of method embodiment illustrates.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can With or may be advantageous.
Although this application provides the method operating procedure as described in embodiment or flow chart, based on conventional or noninvasive The labour for the property made may include more or less operating procedure.The step of enumerating in embodiment sequence is only numerous steps One of execution sequence mode, does not represent and unique executes sequence.It, can when device or client production in practice executes To execute or parallel execute (such as at parallel processor or multithreading according to embodiment or method shown in the drawings sequence The environment of reason).
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, vehicle-mounted human-computer interaction device, cellular phone, camera phone, smart phone, individual Digital assistants, media player, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or The combination of any equipment in these equipment of person.
Although this specification embodiment provides the method operating procedure as described in embodiment or flow chart, based on conventional It may include either more or less operating procedure without creative means.The step of being enumerated in embodiment sequence be only One of numerous step execution sequence mode does not represent and unique executes sequence.Device or end product in practice is held When row, can be executed according to embodiment or method shown in the drawings sequence or it is parallel execute (such as parallel processor or The environment of multiple threads, even distributed data processing environment).The terms "include", "comprise" or its any other change Body is intended to non-exclusive inclusion, so that process, method, product or equipment including a series of elements are not only wrapped Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, product Or the element that equipment is intrinsic.In the absence of more restrictions, being not precluded is including process, the side of the element There is also other identical or equivalent elements in method, product or equipment.
For convenience of description, it is divided into various modules when description apparatus above with function to describe respectively.Certainly, implementing this The function of each module can be realized in the same or multiple software and or hardware when specification embodiment, it can also be by reality Show the module of same function by the combination realization etc. of multiple submodule or subelement.Installation practice described above is only Schematically, for example, the division of the unit, only a kind of logical function partition, can there is other draw in actual implementation The mode of dividing, such as multiple units or components can be combined or can be integrated into another system, or some features can be ignored, Or it does not execute.Another point, shown or discussed mutual coupling, direct-coupling or communication connection can be by one The indirect coupling or communication connection of a little interfaces, device or unit can be electrical property, mechanical or other forms.
It is also known in the art that other than realizing controller in a manner of pure computer readable program code, it is complete Entirely can by by method and step carry out programming in logic come so that controller with logic gate, switch, specific integrated circuit, programmable Logic controller realizes identical function with the form for being embedded in microcontroller etc..Therefore this controller is considered one kind Hardware component, and the structure that the device for realizing various functions that its inside includes can also be considered as in hardware component.Or Person even, can will be considered as realizing the device of various functions either the software module of implementation method can be hardware again Structure in component.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It will be understood by those skilled in the art that the embodiment of this specification can provide as the production of method, system or computer program Product, therefore, in terms of this specification embodiment can be used complete hardware embodiment, complete software embodiment or combine software and hardware Embodiment form.Moreover, it wherein includes computer available programs that this specification embodiment, which can be used in one or more, Implement in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of code The form of computer program product.
This specification embodiment can describe in the general context of computer-executable instructions executed by a computer, Such as program module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, journey Sequence, object, component, data structure etc..This specification embodiment can also be practiced in a distributed computing environment, in these points Cloth calculates in environment, by executing task by the connected remote processing devices of communication network.In distributed computing ring In border, program module can be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", The description of " specific example " or " some examples " etc. means specific features described in conjunction with this embodiment or example, structure, material Or feature is contained at least one embodiment or example of this specification embodiment.In the present specification, to above-mentioned term Schematic representation be necessarily directed to identical embodiment or example.Moreover, description specific features, structure, material or Person's feature may be combined in any suitable manner in any one or more of the embodiments or examples.In addition, in not conflicting feelings Under condition, those skilled in the art by different embodiments or examples described in this specification and different embodiment or can show The feature of example is combined.
The foregoing is merely the embodiments of this specification embodiment, are not limited to this specification embodiment.It is right For those skilled in the art, this specification embodiment can have various modifications and variations.It is all in this specification embodiment Any modification, equivalent replacement, improvement and so within spirit and principle, the right that should be included in this specification embodiment are wanted Within the scope of asking.

Claims (14)

1. the update method of Bootloader in a kind of electronic control unit, which is characterized in that the described method includes:
Starting jumps the validity flag that management program obtains Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is effective status, execution is jumped to Bootloader upgrade procedure is updated Bootloader by Bootloader upgrade procedure;
In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, it is soft to jump to execution function Part;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
2. the method according to claim 1, wherein in the validity flag for determining Bootloader upgrade procedure In the case where for invalid state, execution functional software is jumped to, comprising:
In the case where determining the validity flag of Bootloader upgrade procedure is invalid state, the effective of functional software is obtained Property mark;
In the case where determining the validity flag of the functional software is effective status, execution functional software is jumped to;
In the case where determining the validity flag of the functional software is invalid state, current Bootloader is jumped to, And wait instruction to be updated.
3. executing Bootloader upgrade procedure the method according to claim 1, wherein jumping to, pass through Bootloader upgrade procedure is updated Bootloader, comprising:
Run Bootloader upgrade procedure;
Current Bootloader is wiped by Bootloader upgrade procedure, and replicates new Bootloader to correspondingly Location space;
After determining that duplication is completed, the validity flag position invalid state of Bootloader upgrade procedure is set;
Control electronic control unit restarts reset, starts the starting and jumps management program.
4. according to the method described in claim 3, it is characterized in that, replicating new Bootloader to corresponding address space Later, further includes:
Bootloader upgrade procedure reads the corresponding address space of Bootloader, and it is corresponding to calculate the Bootloader First verification of entire address space and;
Obtain the second verification that new Bootloader is calculated in compilation process and;
In the case where determining first verification and second verification and identical situation, determine that verification passes through;
In the case where determining that verification passes through, determine that duplication is completed.
5. executing Bootloader upgrade procedure the method according to claim 1, wherein jumping to, pass through Bootloader upgrade procedure is updated Bootloader, comprising:
The Bootloader upgrade procedure of operation is brushed in electronic control unit by vehicle-mounted CAN bus, to pass through Bootloader upgrade procedure is updated Bootloader.
6. according to the method described in claim 2, it is characterized in that, determining that the validity flag of the functional software is invalid In the case where state, current Bootloader is jumped to, and after waiting instruction to be updated, further includes:
Receive more new command;
Determining that the more new command is that Bootloader is deposited in the case of an update, by the effective of Bootloader upgrade procedure Property traffic sign placement be effective status, and control electronic control unit and restart resets, start described start and jump management program;
Determining that the more new command is that functional software is deposited in the case of an update, by the validity of Bootloader upgrade procedure The validity flag of mark and functional software is both configured to invalid state, and controls electronic control unit and restart reset, starts institute It states starting and jumps management program.
7. the updating device of Bootloader in a kind of electronic control unit, which is characterized in that be located in onboard system, comprising:
Module is obtained, for jumping the validity flag that management program obtains Bootloader upgrade procedure by starting;
First jump module, for determine Bootloader upgrade procedure validity flag be effective status in the case where, It jumps to and executes Bootloader upgrade procedure, Bootloader is updated by Bootloader upgrade procedure;
Second jump module, for determine Bootloader upgrade procedure validity flag be invalid state in the case where, Jump to execution functional software;
Wherein, starting jumps management program, Bootloader, Bootloader upgrade procedure and functional software and is respectively stored in electricity The different address space of the memory space of sub-control unit.
8. device according to claim 7, which is characterized in that second jump module includes:
Acquiring unit, for obtaining in the case where determining the validity flag of Bootloader upgrade procedure is invalid state The validity flag of functional software;
First jump-transfer unit, for jumping in the case where determining the validity flag of the functional software is effective status Execute functional software;
Second jump-transfer unit, for jumping in the case where determining the validity flag of the functional software is invalid state Current Bootloader, and wait instruction to be updated.
9. device according to claim 7, which is characterized in that first jump module includes:
Running unit, for running Bootloader upgrade procedure;
Updating unit for wiping current Bootloader by Bootloader upgrade procedure, and replicates newly Bootloader is to corresponding address space;
Setting unit, for after determining that duplication is completed, the validity flag position that Bootloader upgrade procedure is arranged to be invalid State;
Control unit restarts reset for controlling electronic control unit, starts the starting and jumps management program.
10. device according to claim 9, which is characterized in that first jump module further include:
Computing unit, for after replicating new Bootloader to corresponding address space, control Bootloader to upgrade Program reads the corresponding address space of Bootloader, and calculates the first of the corresponding entire address space of the Bootloader Verification and;
Acquiring unit, for obtain the second verification that new Bootloader is calculated in compilation process and;
First determination unit, for determining verification in the case where determining first verification and second verification and identical situation Pass through;
Second determination unit determines that duplication is completed in the case where determining that verification passes through.
11. device according to claim 7, which is characterized in that first jump module is specifically used for passing through vehicle-mounted CAN Bus brushes the Bootloader upgrade procedure of operation in electronic control unit, to pass through Bootloader upgrade procedure pair Bootloader is updated.
12. device according to claim 8, which is characterized in that further include:
Receiving module, for jumping to current in the case where determining the validity flag of the functional software is invalid state Bootloader, and after waiting instruction to be updated, receive more new command;
First starting module will for determining that the more new command is that Bootloader is deposited in the case of an update The validity flag of Bootloader upgrade procedure is set as effective status, and controls electronic control unit and restart reset, starting The starting jumps management program;
Second starting module will for determining that the more new command is that functional software is deposited in the case of an update The validity flag of Bootloader upgrade procedure and the validity flag of functional software are both configured to invalid state, and control electricity Sub-control unit restarts reset, starts the starting and jumps management program.
13. a kind of terminal device, including processor and for the memory of storage processor executable instruction, the processor The step of realizing any one of claims 1 to 6 the method when executing described instruction.
14. a kind of computer readable storage medium is stored thereon with computer instruction, described instruction, which is performed, realizes that right is wanted The step of seeking any one of 1 to 6 the method.
CN201910052372.1A 2019-01-21 2019-01-21 Method and device for updating Bootloader in electronic control unit Active CN109933348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910052372.1A CN109933348B (en) 2019-01-21 2019-01-21 Method and device for updating Bootloader in electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910052372.1A CN109933348B (en) 2019-01-21 2019-01-21 Method and device for updating Bootloader in electronic control unit

Publications (2)

Publication Number Publication Date
CN109933348A true CN109933348A (en) 2019-06-25
CN109933348B CN109933348B (en) 2023-02-14

Family

ID=66984952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910052372.1A Active CN109933348B (en) 2019-01-21 2019-01-21 Method and device for updating Bootloader in electronic control unit

Country Status (1)

Country Link
CN (1) CN109933348B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209420A (en) * 2019-08-01 2019-09-06 潍柴动力股份有限公司 A kind of method and device updating bootstrap loader
CN110362327A (en) * 2019-07-12 2019-10-22 北京经纬恒润科技有限公司 Application program update method, apparatus and system
CN110618825A (en) * 2019-08-02 2019-12-27 惠州市德赛西威汽车电子股份有限公司 Self-updating method for Boot Loader of car machine
CN110688135A (en) * 2019-09-20 2020-01-14 浙江吉利汽车研究院有限公司 Program flashing method, device and medium for controller
CN110704076A (en) * 2019-10-15 2020-01-17 上海元城汽车技术有限公司 Data processing method and device, vehicle-mounted controller and computer-readable storage medium
CN110794804A (en) * 2019-09-25 2020-02-14 潍柴动力股份有限公司 System, ECU, motor vehicle and method for flashing ECU
CN110990041A (en) * 2019-12-16 2020-04-10 杭州涂鸦信息技术有限公司 Bootloader upgrading method and bootloader upgrading system
CN111061500A (en) * 2019-12-31 2020-04-24 宝能汽车有限公司 bootloader program updating method and bootloader program updating device
CN111459508A (en) * 2020-03-27 2020-07-28 北京经纬恒润科技有限公司 Boot L loader self-upgrading method and system
CN111666091A (en) * 2020-06-12 2020-09-15 成都极米科技股份有限公司 System updating method, device, electronic equipment and computer readable storage medium
CN112596766A (en) * 2020-12-24 2021-04-02 浙江合众新能源汽车有限公司 Software upgrading method and device based on Bootloader
CN112988172A (en) * 2021-02-20 2021-06-18 浙江禾川科技股份有限公司 Program updating method, device and system of encoder
CN113343314A (en) * 2021-07-02 2021-09-03 北京汽车集团越野车有限公司 Data verification method and device for data flashing
CN113741943A (en) * 2021-11-08 2021-12-03 湘投云储科技有限公司 Embedded equipment program upgrading system and method
CN114281392A (en) * 2022-03-04 2022-04-05 季华实验室 Serial port upgrading method and system for multi-MCU slave station
EP4006718A1 (en) * 2020-11-30 2022-06-01 Carrier Corporation Failsafe update of bootloader firmware
CN114610415A (en) * 2022-03-23 2022-06-10 北京经纬恒润科技股份有限公司 Program starting method, system, storage medium and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243591A (en) * 2011-06-30 2011-11-16 南京熊猫信息产业有限公司 Method for improving Loader-upgrading stability of set top box by adopting two zone bits
WO2014029181A1 (en) * 2012-08-21 2014-02-27 武汉电信器件有限公司 In-application upgrade method for optical module firmware not breaking service
US20140351569A1 (en) * 2010-11-08 2014-11-27 Gemalto Sa Software updating process for an embedded device
CN104360877A (en) * 2014-10-24 2015-02-18 同济大学 ECU (electronic control unit) firmware updating method based on Bootloader self update
EP3131005A1 (en) * 2015-08-14 2017-02-15 ALSTOM Transport Technologies Train embedded electronic device comprising a boot program with one or more startpartitions, and the associated train vehicle and system
WO2017095955A1 (en) * 2015-12-04 2017-06-08 Alibaba Group Holding Limited Implementing application jumps
CN107632862A (en) * 2017-09-20 2018-01-26 江苏兆能电子有限公司 A kind of multistage start-up loading method of vehicle electronic control unit ECU
CN108920196A (en) * 2018-06-28 2018-11-30 国机智骏(北京)汽车科技有限公司 Entire car controller bootload upgrade method, device, entire car controller and vehicle
CN109189461A (en) * 2018-11-27 2019-01-11 上海辛格林纳新时达电机有限公司 The programme upgrade method and elevator control system and lift facility of elevator control system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140351569A1 (en) * 2010-11-08 2014-11-27 Gemalto Sa Software updating process for an embedded device
CN102243591A (en) * 2011-06-30 2011-11-16 南京熊猫信息产业有限公司 Method for improving Loader-upgrading stability of set top box by adopting two zone bits
WO2014029181A1 (en) * 2012-08-21 2014-02-27 武汉电信器件有限公司 In-application upgrade method for optical module firmware not breaking service
CN104360877A (en) * 2014-10-24 2015-02-18 同济大学 ECU (electronic control unit) firmware updating method based on Bootloader self update
EP3131005A1 (en) * 2015-08-14 2017-02-15 ALSTOM Transport Technologies Train embedded electronic device comprising a boot program with one or more startpartitions, and the associated train vehicle and system
WO2017095955A1 (en) * 2015-12-04 2017-06-08 Alibaba Group Holding Limited Implementing application jumps
CN107632862A (en) * 2017-09-20 2018-01-26 江苏兆能电子有限公司 A kind of multistage start-up loading method of vehicle electronic control unit ECU
CN108920196A (en) * 2018-06-28 2018-11-30 国机智骏(北京)汽车科技有限公司 Entire car controller bootload upgrade method, device, entire car controller and vehicle
CN109189461A (en) * 2018-11-27 2019-01-11 上海辛格林纳新时达电机有限公司 The programme upgrade method and elevator control system and lift facility of elevator control system

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362327A (en) * 2019-07-12 2019-10-22 北京经纬恒润科技有限公司 Application program update method, apparatus and system
CN110362327B (en) * 2019-07-12 2023-05-16 北京经纬恒润科技股份有限公司 Application program updating method, device and system
CN110209420A (en) * 2019-08-01 2019-09-06 潍柴动力股份有限公司 A kind of method and device updating bootstrap loader
CN110618825A (en) * 2019-08-02 2019-12-27 惠州市德赛西威汽车电子股份有限公司 Self-updating method for Boot Loader of car machine
CN110688135A (en) * 2019-09-20 2020-01-14 浙江吉利汽车研究院有限公司 Program flashing method, device and medium for controller
CN110794804A (en) * 2019-09-25 2020-02-14 潍柴动力股份有限公司 System, ECU, motor vehicle and method for flashing ECU
CN110704076A (en) * 2019-10-15 2020-01-17 上海元城汽车技术有限公司 Data processing method and device, vehicle-mounted controller and computer-readable storage medium
CN110990041A (en) * 2019-12-16 2020-04-10 杭州涂鸦信息技术有限公司 Bootloader upgrading method and bootloader upgrading system
CN111061500A (en) * 2019-12-31 2020-04-24 宝能汽车有限公司 bootloader program updating method and bootloader program updating device
CN111459508A (en) * 2020-03-27 2020-07-28 北京经纬恒润科技有限公司 Boot L loader self-upgrading method and system
CN111459508B (en) * 2020-03-27 2023-12-01 北京经纬恒润科技股份有限公司 BootLoader self-upgrading method and system
CN111666091A (en) * 2020-06-12 2020-09-15 成都极米科技股份有限公司 System updating method, device, electronic equipment and computer readable storage medium
CN111666091B (en) * 2020-06-12 2023-08-29 成都极米科技股份有限公司 System updating method, device, electronic equipment and computer readable storage medium
EP4006718A1 (en) * 2020-11-30 2022-06-01 Carrier Corporation Failsafe update of bootloader firmware
CN112596766A (en) * 2020-12-24 2021-04-02 浙江合众新能源汽车有限公司 Software upgrading method and device based on Bootloader
CN112988172A (en) * 2021-02-20 2021-06-18 浙江禾川科技股份有限公司 Program updating method, device and system of encoder
CN113343314A (en) * 2021-07-02 2021-09-03 北京汽车集团越野车有限公司 Data verification method and device for data flashing
CN113741943B (en) * 2021-11-08 2022-03-18 湘投云储科技有限公司 Embedded equipment program upgrading system and method
CN113741943A (en) * 2021-11-08 2021-12-03 湘投云储科技有限公司 Embedded equipment program upgrading system and method
CN114281392A (en) * 2022-03-04 2022-04-05 季华实验室 Serial port upgrading method and system for multi-MCU slave station
CN114610415A (en) * 2022-03-23 2022-06-10 北京经纬恒润科技股份有限公司 Program starting method, system, storage medium and electronic equipment
CN114610415B (en) * 2022-03-23 2024-01-16 北京经纬恒润科技股份有限公司 Program starting method, system, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109933348B (en) 2023-02-14

Similar Documents

Publication Publication Date Title
CN109933348A (en) The update method and device of Bootloader in a kind of electronic control unit
CN106095620B (en) A kind of development approach of built-in Linux partition holding
CN105511911B (en) The generation method and device of system firmware upgrade package
CN103412561B (en) A kind of method for refreshing of automobile controller
CN101344854B (en) Method for upgrading embedded type Linux equipment through SD card
US20220317997A1 (en) Online Upgrade Method for Household Appliance Multi-MCU System, Electronic Device and Medium
CN107066305B (en) Method and device for updating server firmware of server and server
CN109165055B (en) Unmanned system component loading method and device, computer equipment and medium
CN103577201B (en) The update method and system of Embedded Double system
CN101739266A (en) Firmware updating method
CN105718281A (en) Touch screen firmware upgrading method and device
CN109189434A (en) A kind of online upgrading method of electric energy meter
CN111045712A (en) Single system upgrading method and system with backup function
CN108121686B (en) Multiprocessor and multiprocessor system
CN104050006A (en) Updating system and updating method of FPGA
CN214376406U (en) Integrated circuit, vehicle-mounted controller and vehicle
CN106201584B (en) Version upgrading method and terminal device
CN111008101A (en) Debugging verification platform and testing method of RISC-V processor system
JP2008198060A (en) Information processor, patch code mounting system, electronic equipment, and patch code mounting method
CN110413310A (en) Programme upgrade method and terminal device
CN116560688A (en) Software updating method for domain controller
CN110688135A (en) Program flashing method, device and medium for controller
CN105630530A (en) Multilevel boot method and system of digital signal processor
CN108052316A (en) A kind of development system of vehicle device client
CN115344292A (en) Firmware automatic upgrading method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB03 Change of inventor or designer information

Inventor after: Xie Shaowei

Inventor before: Xie Shaowei

Inventor before: Zhou Zhimin

CB03 Change of inventor or designer information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant