CN114684163A - Vehicle controller, program starting and flashing method thereof and storage medium - Google Patents

Vehicle controller, program starting and flashing method thereof and storage medium Download PDF

Info

Publication number
CN114684163A
CN114684163A CN202011618857.1A CN202011618857A CN114684163A CN 114684163 A CN114684163 A CN 114684163A CN 202011618857 A CN202011618857 A CN 202011618857A CN 114684163 A CN114684163 A CN 114684163A
Authority
CN
China
Prior art keywords
program
vehicle controller
storage area
boot
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011618857.1A
Other languages
Chinese (zh)
Inventor
樊轩逸
曾沈岚
刘文忠
沈远亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baoneng Automobile Group Co Ltd
Original Assignee
Baoneng Automobile Group 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 Baoneng Automobile Group Co Ltd filed Critical Baoneng Automobile Group Co Ltd
Priority to CN202011618857.1A priority Critical patent/CN114684163A/en
Publication of CN114684163A publication Critical patent/CN114684163A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W50/00Details of control systems for road vehicle drive control not related to the control of a particular sub-unit, e.g. process diagnostic or vehicle driver interfaces
    • B60W50/0098Details of control systems ensuring comfort, safety or stability not otherwise provided for
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a vehicle controller, a program starting and flashing method and a storage medium thereof, wherein a memory in the vehicle controller is provided with a first memory area, a second memory area, a third memory area, a fourth memory area, a fifth memory area and a storage medium, wherein the first memory area is used for storing a boot management program, the second memory area is used for storing a first boot program, the third memory area is used for storing a second boot program, the fourth memory area is used for storing a first application program, and the fifth memory area is used for storing a second application program, the method comprises the following steps: after the vehicle controller is powered on, operating a bootstrap management program to search a bootstrap starting identification bit; running a first bootstrap program or a second bootstrap program according to the position of the bootstrap program starting identification position to search the application program starting identification position; and running the first application program or the second application program according to the position of the application program starting identification position until the vehicle controller is powered off. Therefore, the redundant backup is carried out on the bootstrap program and the application program at the same time, and therefore the reliability and the stability of the vehicle controller are improved.

Description

Vehicle controller, program starting and flashing method thereof and storage medium
Technical Field
The present invention relates to the field of vehicle controller technologies, and in particular, to a method for starting and flashing a program of a vehicle controller, a computer-readable storage medium, and a vehicle controller.
Background
At present, an embedded software architecture commonly used in the automobile industry market is composed of a bootstrap program and an application program, the bootstrap program is executed after a vehicle controller is powered on, if a flash request is not received, the application program is entered, if a request for flashing the application program is received, a flash mode of the bootstrap program is entered, the application program is erased and then a new code is written, and if an error occurs in the flash process (power failure or verification failure), the application program cannot run and waits for flash again. In such an architecture, the boot program is not usually refreshed, because the boot program self-refresh exists, the code in the original memory can be erased before the new code is refreshed, once the power is cut off in the refreshing process, any application program can not be run in the electric controller, because the application program cannot be skipped after the boot program goes wrong, the controller loses the function, and the controller cannot be refreshed through bus communication.
In addition, remote refreshing also gradually becomes a necessary function of many vehicles, and through remote refreshing, a vehicle manufacturer can upgrade programs for vehicle controllers under the condition that the vehicles do not enter a 4s store for wired updating so as to achieve the purpose of repairing errors or increasing functions. Because the environmental conditions of remote updates are more uncertain than those of wired updates, it is necessary to backup the original application so that the failure of the flush can be restored to the pre-flush state. The function of restoring to the pre-refresh state is called rollback (rollback). At present, the common rollback mode is cloud backup or in-vehicle backup, however, both methods perform program backup from the outside, and if the flash always fails, the vehicle cannot recover the normal function, so that the vehicle owner/driver cannot normally operate the vehicle.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, a first objective of the present invention is to provide a method for starting and flashing a program of a vehicle controller, which can perform redundant backup on a boot program and an application program at the same time, thereby improving reliability and stability of the vehicle controller.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a vehicle controller.
In order to achieve the above object, a first aspect of the present invention provides a program starting and flashing method for a vehicle controller, wherein a memory in the vehicle controller is provided with first to fifth memory areas, the first memory area is used for storing a boot management program, the second memory area is used for storing a first boot program, the third memory area is used for storing a second boot program, the fourth memory area is used for storing a first application program, and the fifth memory area is used for storing a second application program, the method comprising: after the vehicle controller is powered on, operating the boot management program to search a boot program starting identification bit; running the first bootstrap program or the second bootstrap program according to the position of the bootstrap program starting identification position to search the application program starting identification position; and running the first application program or the second application program according to the position of the application program starting identification position until the vehicle controller is powered off.
According to the program starting and flashing method of the vehicle controller, after the vehicle controller is powered on, the boot management program is operated to search the boot program starting identification position, the first boot program or the second boot program is operated according to the position of the boot program starting identification position to search the application program starting identification position, and the first application program or the second application program is operated according to the position of the application program starting identification position until the vehicle controller is powered off. Therefore, the redundant backup is carried out on the bootstrap program and the application program at the same time, and therefore the reliability and the stability of the vehicle controller are improved.
In addition, the program starting and flashing method of the vehicle controller according to the above embodiment of the present invention may further have the following additional technical features:
according to one embodiment of the invention, during the process of running the first application program or the second application program, if watchdog reset occurs, self-restart is carried out to rerun the boot management program.
According to an embodiment of the present invention, in the process of running the first boot program, if a first flash request command is received, the data in the third storage area is erased, and the received running code is written into the third storage area, and after the writing is completed and the running code passes verification, the start identification bit before the address field of the second storage area is erased, and a new start identification bit is written before the address field of the third storage area.
According to an embodiment of the present invention, in the process of running the second boot program, if a first write request command is received, the data of the second storage area is erased, and the received running code is written into the second storage area, and after the writing is completed and the running code passes verification, the start identification bit before the address field of the third storage area is erased, and a new start identification bit is written before the address field of the second storage area.
According to an embodiment of the present invention, in the process of running the first bootstrap program or the second bootstrap program, if a second write request command is received, when it is determined according to the position of the start identification bit of the application program that the first application program is running, the data of the fifth storage area is erased, and the received running code is written into the fifth storage area, and after the writing is completed and the verification is passed, the start identification bit before the address field of the fourth storage area is erased, and a new start identification bit is written before the address field of the fifth storage area.
According to an embodiment of the present invention, in the process of running the first boot program or the second boot program, if a second write request command is received, when it is determined that the second application program is run according to the location of the start identification bit of the application program, the data in the fourth storage area is erased, the received running code is written into the fourth storage area, and after the writing is completed and the verification is passed, the start identification bit before the address field of the fifth storage area is erased, and a new start identification bit is written before the address field of the fourth storage area.
According to one embodiment of the invention, during the flashing of the boot program, if an abnormality occurs, the flashing of the boot program is continued after the vehicle controller restarts.
According to an embodiment of the invention, in the process of flushing the application program, if an exception occurs or the verification fails, the method stays in the running process of the first bootstrap program or the second bootstrap program so as to flush the application program again when the second flush request command is received.
In order to achieve the above object, a computer-readable storage medium is provided in an embodiment of a second aspect of the present invention, on which a program start-up and flashing program of a vehicle controller is stored, the program start-up and flashing program of the vehicle controller being executed by a processor to implement the program start-up and flashing method of the vehicle controller as described above.
According to the computer-readable storage medium of the embodiment of the invention, the processor executes the program starting and the program flashing of the vehicle controller stored on the processor, so that the redundant backup can be simultaneously carried out on the bootstrap program and the application program, and the reliability and the stability of the vehicle controller are improved.
In order to achieve the above object, a vehicle controller according to a third aspect of the present invention includes a memory, a processor, and a program start and refresh program of the vehicle controller stored in the memory and operable on the processor, where the processor implements the program start and refresh method of the vehicle controller when executing the program start and refresh program of the vehicle controller.
According to the vehicle controller provided by the embodiment of the invention, the processor executes the program starting and the program flashing of the vehicle controller stored in the memory, so that the redundant backup can be simultaneously carried out on the bootstrap program and the application program, and the reliability and the stability of the vehicle controller are improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flow chart illustrating a method for program initiation and flashing of a vehicle controller according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a brushless write request command according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a command with a first write-flash request according to an embodiment of the invention;
FIG. 4 is a flowchart illustrating a command with a second write-flash request according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A program starting and flashing method of a vehicle controller, a computer-readable storage medium, and a vehicle controller according to embodiments of the invention are described below with reference to the drawings.
Specifically, in an embodiment of the present invention, a memory in a vehicle controller is provided with first to fifth memory areas, the first memory area for storing a boot management program, the second memory area for storing a first boot program, the third memory area for storing a second boot program, the fourth memory area for storing a first application program, and the fifth memory area for storing a second application program.
Fig. 1 is a flowchart illustrating a program starting and flashing method of a vehicle controller according to an embodiment of the present invention.
As shown in fig. 1, the program starting and flashing method of the vehicle controller includes:
and S101, after the vehicle controller is powered on, operating a boot management program to search a boot program starting identification bit.
It is understood that after the vehicle controller is powered on, the boot manager is operated by default to search the boot program start flag, so that the vehicle controller selects to operate the first boot program or the second boot program according to the boot program start flag.
S102, operating the first bootstrap program or the second bootstrap program according to the position of the bootstrap program starting identification position to search the application program starting identification position.
That is, the vehicle controller may search for the application start flag by running the first bootstrap program or the second bootstrap program, thereby facilitating the vehicle controller to select to run the first application program or the second application program according to the application start flag.
And S103, running the first application program or the second application program according to the position of the application program starting identification position until the vehicle controller is powered off.
It should be noted that, if a watchdog reset occurs during the process of running the first application or the second application, the self-restart is performed to rerun the boot management program.
For example, as shown in fig. 2, after the vehicle controller is powered on, in the absence of a command for a flush request, the following steps are performed:
s10, the boot manager is executed.
S11, searching the bootstrap program start identification bit, if the bootstrap program start identification bit is before the first bootstrap program start address, executing the step S12; if the boot start flag is before the second boot start address, step S13 is performed.
S12, the first bootstrap program is operated, and the step S14 is executed.
And S13, running a second bootstrap program.
S14, searching the application program start identification position, if the application program start identification position is before the first application program start address, executing the step S15; if the application start identification bit is before the second application start address, step S16 is performed.
S15, the first application is run, and step S17 is performed.
And S16, running the second application program.
S17, judging whether the watchdog is reset, if yes, executing step S18; if not, step S19 is performed.
S18, a self-restart is performed to re-execute step S1.
And S19, powering down the vehicle controller, and waiting for the next time of powering up and restarting the vehicle controller.
Further, in the process of running the first bootstrap program, if a first flash request command is received, erasing data of the third storage area, writing the received running code into the third storage area, and after the writing is completed and the verification is passed, erasing the start identification bit before the address field of the second storage area, and writing the new start identification bit before the address field of the third storage area.
It is to be understood that the first flush request command is a bootstrap flush request command.
Specifically, when the vehicle controller receives a first flashing request command in the process of running the first bootstrap program, the data in the third storage area can be erased, and the received running code is written into the third storage area, so that the flashing of the second bootstrap program is realized, after the writing is completed and the verification is passed, the starting identification bit in front of the address field of the second storage area is erased, and a new starting identification bit is written in front of the address field of the third storage area, so that the vehicle controller can run a new second bootstrap program next time.
Further, in the process of running the second bootstrap program, if a first flash request command is received, erasing the data of the second storage area, writing the received running code into the second storage area, and after the writing is completed and the verification is passed, erasing the start identification bit before the address field of the third storage area, and writing the new start identification bit before the address field of the second storage area.
Specifically, when the vehicle controller receives a first flashing request command in the process of running the second bootstrap program, the data in the second storage area can be erased, and the received running code is written into the second storage area, so that the flashing of the first bootstrap program is realized, after the writing is completed and the verification is passed, the starting identification bit in front of the address field of the third storage area is erased, and a new starting identification bit is written in front of the address field of the second storage area, so that the vehicle controller can run a new first bootstrap program next time.
It should be noted that, in the process of flushing the boot program, if an abnormality occurs, the boot program is continuously flushed after the vehicle controller is restarted.
For example, as shown in fig. 3, after the vehicle controller is powered on, in the presence of a first flush request command, the following steps are performed:
s20, the boot manager is executed.
S21, searching the bootstrap program start identification bit, if the bootstrap program start identification bit is before the first bootstrap program start address, executing the step S22; if the boot start flag is before the second boot start address, step S23 is performed.
S22, running the first bootstrap program, and judging whether the first flash request command is received, if yes, executing the step S24; if not, step S28 is performed.
S23, operating the second bootstrap program, and judging whether the first flash request command is received, if yes, executing the step S26; if not, step S28 is performed.
It is understood that during the boot program flashing process, the address segment of the memory area to be flashed can be determined according to the boot program start identification bit.
S24, erasing the data in the third storage area, writing the received running code into the third storage area, judging whether the flash is successful, if so, executing the step S25; if not, step S22 is performed.
S25, erasing the start flag bit before the address field of the second storage area and writing the new start flag bit before the address field of the third storage area, and executing the step S29.
S26, erasing the data of the second storage area, writing the received operation code into the second storage area, and judging whether the flash is successful, if so, executing the step S27; if not, step S23 is performed.
S27, erasing the start flag bit before the address field of the third storage area and writing the new start flag bit before the address field of the second storage area, and executing the step S29.
And S28, operating the first application program or the second application program according to the application program starting identification bit.
And S29, powering down the vehicle controller, and waiting for the next time the vehicle controller is powered on and restarted.
Further, in the process of running the first bootstrap program or the second bootstrap program, if a second flash request command is received, when the first application program is determined to run according to the position of the application program start identification bit, erasing the data of the fifth storage area, writing the received running code into the fifth storage area, and after the writing is completed and the verification is passed, erasing the start identification bit before the address field of the fourth storage area, and writing a new start identification bit before the address field of the fifth storage area.
It is to be understood that the second flush request command is an application flush request command.
Specifically, when a second flash request command is received in the process that the vehicle controller runs the first bootstrap program or the second bootstrap program, the data in the fifth storage area is erased and the received running code is written into the fifth storage area when the first application program is determined to run according to the position of the starting identification bit of the application program, so that the flash of the second application program is realized, and after the writing is completed and the verification is passed, the starting identification bit before the address field of the fourth storage area is erased and a new starting identification bit is written in front of the address field of the fifth storage area, so that the vehicle controller runs a new second application program next time.
Further, in the process of running the first bootstrap program or the second bootstrap program, if a second flash request command is received, when the second application program is determined to run according to the position of the application program start identification bit, erasing the data of the fourth storage area, writing the received running code into the fourth storage area, and after the writing is completed and the verification is passed, erasing the start identification bit before the address field of the fifth storage area, and writing a new start identification bit before the address field of the fourth storage area.
Specifically, when a second flash request command is received in the process that the vehicle controller runs the first bootstrap program or the second bootstrap program, the data in the fourth storage area is erased and the received running code is written into the fourth storage area when the second application program is determined to run according to the position of the starting identification bit of the application program, so that the flash of the first application program is realized, and after the write is completed and the verification is passed, the starting identification bit before the address field of the fifth storage area is erased and a new starting identification bit is written in front of the address field of the fourth storage area, so that the vehicle controller runs a new first application program next time.
It should be noted that, in the process of flushing the application program, if an exception occurs or the check fails, the process stays in the running process of the first boot program or the second boot program, so that the application program is flushed again when the second flush request command is received.
For example, as shown in fig. 4, after the vehicle controller is powered on, in the presence of a second flush request command, the following steps are performed:
s30, the boot manager is executed.
And S31, operating the first bootstrap program or the second bootstrap program according to the bootstrap starting identification bit.
S32, judging whether a second flash request command is received, if yes, executing step S33; if not, step S38 is performed.
S33, searching the application program start identification position, if the application program start identification position is before the first application program start address, executing the step S34; if the application start identification bit is before the second application start address, step S35 is performed.
It is understood that during the application program flashing process, the address field of the memory area to be flashed can be determined according to the application program starting identification bit.
S34, erasing the data in the fifth storage area, writing the received operation code into the fifth storage area, and judging whether the flash is successful, if so, executing the step S36; if not, step S31 is performed.
S35, erasing the data in the fourth storage area, writing the received operation code into the fourth storage area, and judging whether the flash is successful, if so, executing the step S37; if not, step S31 is performed.
S36, the start flag bit before the address field of the fourth storage area is erased, and the new start flag bit is written before the address field of the fifth storage area, and step S39 is performed.
S37, erasing the start flag bit before the address field of the fifth storage area, writing the new start flag bit before the address field of the fourth storage area, and executing the step S39.
And S38, operating the first application program or the second application program according to the application program starting identification bit.
And S39, powering off the vehicle controller, and waiting for the next time that the vehicle controller is powered on and restarted.
In summary, according to the program starting and flashing method of the vehicle controller in the embodiment of the present invention, after the vehicle controller is powered on, the boot manager is run to search for the boot program start identifier, the first boot program or the second boot program is run according to the location of the boot program start identifier to search for the application program start identifier, and the first application program or the second application program is run according to the location of the application program start identifier until the vehicle controller is powered off. Therefore, the redundant backup is carried out on the bootstrap program and the application program simultaneously, so that the influence on the normal operation of the vehicle controller caused by the failure of the flash due to the external interference in the program flash process is avoided, and the reliability and the stability of the vehicle controller are improved.
Further, an embodiment of the present invention further provides a computer-readable storage medium, on which a program start-up and flashing program of a vehicle controller is stored, which when executed by a processor implements the program start-up and flashing method of the vehicle controller according to the foregoing embodiment of the present invention.
It should be noted that, when the computer-readable storage medium according to the embodiment of the present invention executes the program start and the flash program of the vehicle controller stored thereon, the specific implementation manner corresponding to the program start and the flash method of the vehicle controller according to the embodiment of the present invention one to one can be implemented, and details are not repeated herein.
In summary, according to the computer-readable storage medium of the embodiment of the present invention, the processor executes the program start and the program flash of the vehicle controller stored thereon, and the redundant backup of the boot program and the application program can be performed simultaneously, so that the influence of the failure of the program flash caused by external interference during the program flash on the normal operation of the vehicle controller is avoided, and the reliability and the stability of the vehicle controller are improved.
Further, the vehicle controller according to the embodiment of the present invention includes a memory, a processor, and a program start and refresh program of the vehicle controller that is stored in the memory and is executable on the processor, and when the processor executes the program start and refresh program of the vehicle controller, the method for starting and refreshing the program of the vehicle controller according to the embodiment of the present invention is implemented.
It should be noted that, when the vehicle controller according to the embodiment of the present invention executes the program starting and the program flashing of the vehicle controller stored thereon, a specific implementation manner corresponding to the program starting and the program flashing method of the vehicle controller according to the embodiment of the present invention can be implemented one to one, and details are not repeated herein.
In summary, according to the vehicle controller in the embodiment of the present invention, the processor executes the program start and the flash program of the vehicle controller stored in the memory, and the redundant backup can be performed on the boot program and the application program at the same time, so that the influence on the normal operation of the vehicle controller due to the flash failure caused by external interference in the program flash process is avoided, and the reliability and the stability of the vehicle controller are improved.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," and the like are used in the orientations and positional relationships indicated in the drawings for convenience in describing the invention and to simplify the description, and are not intended to indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and are therefore not to be considered limiting of the invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specified otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A program starting and flashing method of a vehicle controller is characterized in that a memory in the vehicle controller is provided with a first memory area, a second memory area, a third memory area, a fourth memory area, a fifth memory area and a fourth memory area, wherein the first memory area is used for storing a boot management program, the second memory area is used for storing a first boot program, the third memory area is used for storing a second boot program, the fourth memory area is used for storing a first application program, and the fifth memory area is used for storing a second application program, and the method comprises the following steps:
after the vehicle controller is powered on, operating the boot management program to search a boot program starting identification bit;
running the first bootstrap program or the second bootstrap program according to the position of the bootstrap program starting identification position to search the application program starting identification position;
and running the first application program or the second application program according to the position of the application program starting identification position until the vehicle controller is powered off.
2. The program startup and flash method of a vehicle controller according to claim 1, wherein during the running of the first application or the second application, if a watchdog reset occurs, a self-restart is performed to rerun the boot manager.
3. The program startup and flash method of a vehicle controller according to claim 1, wherein during the running of the first boot program, if a first flash request command is received, data of the third storage area is erased and a received operation code is written into the third storage area, and after the writing is completed and verified, a startup identification bit before an address field of the second storage area is erased and a new startup identification bit is written before the address field of the third storage area.
4. The program startup and flash method of a vehicle controller according to claim 1, wherein during the running of the second boot program, if a first flash request command is received, data of the second storage area is erased and a received operation code is written into the second storage area, and after the writing is completed and verified, a startup identification bit before an address field of the third storage area is erased and a new startup identification bit is written before the address field of the second storage area.
5. The program startup and flash method of a vehicle controller according to claim 1, wherein during the running of the first boot program or the second boot program, if a second flash request command is received, when it is determined that the first application program is running according to the location of the application program startup identification bit, the data in the fifth storage area is erased, and the received running code is written in the fifth storage area, and after the writing is completed and the verification is passed, the startup identification bit before the address field of the fourth storage area is erased, and a new startup identification bit is written in front of the address field of the fifth storage area.
6. The program starting and flashing method of the vehicle controller according to claim 1, wherein during the running of the first boot program or the second boot program, if a second flashing request command is received, when the second application program is determined to run according to the position of the application program start identification bit, data in the fourth storage area is erased, the received running code is written in the fourth storage area, and after the writing is completed and the verification is passed, the start identification bit before the address field of the fifth storage area is erased, and a new start identification bit is written in front of the address field of the fourth storage area.
7. The program startup and flashing method of a vehicle controller according to claim 3 or 4, wherein, during the flashing of the boot program, if an abnormality occurs, the flashing of the boot program is continued after the restart of the vehicle controller.
8. The program starting and flashing method of a vehicle controller according to claim 5 or 6, wherein during the flashing of the application program, if an abnormality occurs or the verification fails, staying in the running process of the first boot program or the second boot program so as to flash the application program again when the second flashing request command is received.
9. A computer-readable storage medium, characterized in that a program start-up and flush-up program of a vehicle controller is stored thereon, which when executed by a processor implements the program start-up and flush-up method of the vehicle controller according to any one of claims 1 to 8.
10. A vehicle controller comprising a memory, a processor and a program start-up and flash program of the vehicle controller stored in the memory and operable on the processor, wherein the processor implements the program start-up and flash method of the vehicle controller according to any one of claims 1 to 8 when executing the program start-up and flash program of the vehicle controller.
CN202011618857.1A 2020-12-31 2020-12-31 Vehicle controller, program starting and flashing method thereof and storage medium Pending CN114684163A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011618857.1A CN114684163A (en) 2020-12-31 2020-12-31 Vehicle controller, program starting and flashing method thereof and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011618857.1A CN114684163A (en) 2020-12-31 2020-12-31 Vehicle controller, program starting and flashing method thereof and storage medium

Publications (1)

Publication Number Publication Date
CN114684163A true CN114684163A (en) 2022-07-01

Family

ID=82135064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011618857.1A Pending CN114684163A (en) 2020-12-31 2020-12-31 Vehicle controller, program starting and flashing method thereof and storage medium

Country Status (1)

Country Link
CN (1) CN114684163A (en)

Similar Documents

Publication Publication Date Title
CN109634781B (en) Double-area backup image system based on embedded program and starting method
JP4333745B2 (en) Electronic control unit
CN111552592A (en) Double-backup starting method and system
CN106775674B (en) Equipment based on universal boot loader and starting method thereof
CN115061713A (en) Method and device for upgrading electronic equipment
CN112579135A (en) Flash control method and system for vehicle control unit and vehicle
CN113157303A (en) Upgrading method, embedded system, terminal and computer storage medium
CN116302005B (en) Chip, chip upgrading method and device, electronic equipment and readable storage medium
CN111475194A (en) Software upgrading method for new energy automobile controller
CN111459508B (en) BootLoader self-upgrading method and system
CN114684163A (en) Vehicle controller, program starting and flashing method thereof and storage medium
CN117112000A (en) Dual-partition upgrading method and system based on UDS protocol
CN112394965B (en) Battery management system upgrade and operation method, controller, battery management system and storage medium
JP2005284902A (en) Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating
CN113377425B (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN113176891B (en) Bootloader-based ECU (electronic control Unit) program programming method with backup function
CN112256285A (en) OTA (over the air) upgrading method of vehicle, computer-readable storage medium and electronic equipment
CN112685053B (en) Remote upgrade control method for singlechip program
CN112732301A (en) Vehicle upgrading method and device
CN115437670B (en) Automobile controller program upgrading system based on TFTP
CN116302019B (en) BootLoader program self-updating method, system and storage medium
WO2023123037A1 (en) Electronic device, starting method and apparatus for same, and storage medium and vehicle
CN113553112B (en) Vehicle, driving assistance system, and safe operation method for program thereof
CN117215604A (en) Software updating method and device, vehicle controller and readable storage medium
CN117289997A (en) Hardware device starting method, hardware device, computer program product and motor vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination