CN117632153A - Software programming method, automobile electronic control unit, programming equipment and system - Google Patents

Software programming method, automobile electronic control unit, programming equipment and system Download PDF

Info

Publication number
CN117632153A
CN117632153A CN202210978239.0A CN202210978239A CN117632153A CN 117632153 A CN117632153 A CN 117632153A CN 202210978239 A CN202210978239 A CN 202210978239A CN 117632153 A CN117632153 A CN 117632153A
Authority
CN
China
Prior art keywords
control unit
electronic control
programming
slave
master
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
CN202210978239.0A
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.)
BYD Co Ltd
Original Assignee
BYD 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 BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN202210978239.0A priority Critical patent/CN117632153A/en
Publication of CN117632153A publication Critical patent/CN117632153A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The electronic control unit comprises a master electronic control unit and a slave electronic control unit which are connected through a serial programming debugging interface, wherein the master electronic control unit is connected with an automobile control bus, and loads a serial programming debugging interface driver according to the serial programming debugging interface driver issued by the programming equipment; receiving a slave control unit data packet issued by the programming equipment; after the data packet of the slave control unit is subjected to the adaptation processing, the data packet is transmitted to the slave electronic control unit through the serial programming debugging interface, so that the slave electronic control unit executes the update of the application program and completes the reset of the slave electronic control unit according to the reset instruction of the master electronic control unit; receiving a main control unit data packet issued by the programming equipment and executing application program update; and finishing self-reset according to the reset instruction of the programming equipment.

Description

Software programming method, automobile electronic control unit, programming equipment and system
Technical Field
The application belongs to the field of control of automobile electronic systems, and particularly relates to a software programming method, an automobile electronic control unit, programming equipment and a system.
Background
Steering wheels in automobiles and peripheral devices thereof integrate a large number of automobile control functions. The steering wheel switch of the automobile generally comprises a left controller and a right controller, wherein the left controller and the right controller respectively control different functional modules in the automobile and generally have the characteristic of independent left and right operation. For example, the left controller may include specific functions, including, for example: left board 2D touch system, left board pressure acquisition system, left board panel sense of touch feedback system, left board lighting system. The right controller may include additional specific functional modules including, for example: the system comprises a right plate 2D touch system, a right plate pressure acquisition system, a right plate touch feedback system, a right plate lighting system, a right plate power supply system, a right plate steering wheel vibration reminding system, a right plate steering wheel hand-off detection and constant temperature system and a right plate voice reminding system. The design of the steering wheel switch of the whole automobile is limited, the right controller is connected with an automobile control bus network (CAN), the left controller is communicated with the right controller through the automobile control bus network, and the right controller and the left controller form a relation between a master controller and a slave controller. The whole electric framework is characterized by bilateral symmetry and similar functions.
In the prior art, when the whole vehicle system program is programmed and updated, the controllers on two sides are required to be respectively driven and loaded, and the left board and the right board are respectively programmed one by one. The right plate is directly programmed and upgraded through the whole vehicle control bus network. When the left board is programmed, the right board is required to convert the data packet into a corresponding protocol format and then send the data packet to the left board through a UART or CAN or I2C or SPI interface for programming upgrading, so that the programming upgrading of the left board and the right board is completed.
The defects generated by the method are as follows:
firstly, the upgrade instruction files of the left board and the upgrade instruction files of the right board are required to be respectively selected on the programming equipment and respectively pushed by the programming equipment, so that confusion is easily caused, and the risk of incorrect programming is increased;
the second, left and right plates are separately programmed one by one, the efficiency is low, and the time cost is increased;
thirdly, under the high load rate of the bus, a certain data loss risk exists when data is forwarded from the right board to the left board, and programming and upgrading failure is easy to cause;
the ROM of the fourth and the left and the right controllers are respectively provided with a driving program for erasing the memory, so that when the program runs, the erasing memory is accidentally executed and the application program is easily lost accidentally;
fifthly, the left board is used as a slave controller, a bootstrap program (Bootloader) is solidified in a memory of the left board, when the bootstrap program has a BUG, the bootstrap program cannot be updated and repaired, permanent programming failure of the left board application program is easily caused, and the disassembling and repairing cost is increased;
disclosure of Invention
The embodiment of the application aims to provide a software programming method, an automobile electronic control unit, programming equipment and a system, which can solve the problems of complicated software programming operation, long time consumption, easy data loss, high failure rate and high disassembly repair rate in the prior art.
In a first aspect, an embodiment of the present application provides a software programming method of an electronic control unit of an automobile, where the method is applied to the electronic control unit, and the electronic control unit includes a master electronic control unit and a slave electronic control unit connected through a serial programming debug interface, where the master electronic control unit is connected with an automobile control bus, and includes:
the main electronic control unit loads the serial programming debugging interface driver according to the serial programming debugging interface driver issued by the programming equipment;
the master electronic control unit receives a slave control unit data packet issued by the programming equipment, wherein the slave control unit data packet comprises application program data required by updating of the slave electronic control unit;
after the data packet of the slave control unit is subjected to the adaptation processing by the master electronic control unit, the data packet is transmitted to the slave electronic control unit through the serial programming debugging interface so that the slave electronic control unit executes the update of an application program and completes the reset of the slave electronic control unit according to a reset instruction of the master electronic control unit;
the main electronic control unit receives a main control unit data packet issued by the programming equipment and executes application program update, wherein the main control unit data packet comprises application program data required to be updated by the main electronic control unit;
and the main electronic control unit completes the reset of the main electronic control unit according to the reset instruction of the programming equipment.
In a second aspect, an embodiment of the present application provides a method for programming software of an electronic control unit of an automobile, where the method is applied to programming equipment matched with the electronic control unit of the automobile, and the electronic control unit includes a master electronic control unit and a slave electronic control unit connected through a serial programming debug interface, where the master electronic control unit is connected with an automobile control bus, and includes:
storing a packaged programming file to the programming equipment, wherein the packaged programming file comprises information related to each driver file, application program file and configuration file required in the software programming process;
analyzing the packaged programming file to obtain an analyzed programming file;
transmitting a serial programming debugging interface driver acquired according to the parsed programming file to the main electronic control unit so that the main electronic control unit loads the serial programming debugging interface driver;
transmitting a slave control unit data packet acquired according to the parsed programming file to the master electronic control unit so that the master electronic control unit updates an application program of the slave electronic control unit through the serial programming debugging interface, wherein the slave control unit data packet comprises application program data required by the update of the slave electronic control unit;
and sending a main control unit data packet acquired according to the parsed programming file to the main electronic control unit so that the main electronic control unit executes application program updating, wherein the main control unit data packet comprises application program data required by the main electronic control unit for updating.
In a third aspect, an embodiment of the present application provides an electronic control unit for a vehicle, the electronic control unit comprising a master electronic control unit and a slave electronic control unit connected by a serial programming debug interface, wherein only the master electronic control unit is connected to a vehicle control bus, the vehicle electronic control unit being configured to perform the method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a software programming device of an electronic control unit of an automobile, where the software programming device is matched with the electronic control unit of the automobile, and the electronic control unit includes a master electronic control unit and a slave electronic control unit connected through a serial programming debug interface, where only the master electronic control unit is connected to a control bus of the automobile, and the software programming device is configured to perform the method according to the second aspect.
In a fifth aspect, an embodiment of the present application provides a software programming system of an electronic control unit of an automobile, including the electronic control unit of the automobile according to the third aspect and the software programming device according to the fourth aspect.
The method for programming and upgrading the automobile electronic control unit has the following beneficial effects:
firstly, the master electronic control unit writes and upgrades the slave electronic control unit through the serial writing and debugging interface before writing and upgrading the master electronic control unit, so that the problem that the slave electronic control unit cannot be upgraded due to the failure of writing and upgrading of the master electronic control unit is avoided, and the disassembly repair is caused.
Secondly, the slave electronic control unit and the master electronic control unit are directly communicated through a hardware-level interface-serial programming debugging interface, so that the problem that a bootstrap program needs to be resident or loaded in the slave electronic control unit is avoided, and further, the problem that the application program in the slave electronic control unit is further erased due to the fact that the bootstrap program accidentally executes an erasing instruction under abnormal conditions is avoided.
Third, since there is no need to reside a boot program from the electronic control unit, the memory space in the electronic control unit is freed up, allowing for a larger space for storing applications, providing support for large-storage complex applications.
Fourth, because the slave electronic control unit and the master electronic control unit are directly communicated through the hardware-level interface, namely the serial programming debugging interface, and the bus network is not occupied, the risk of frame loss of data under the high bus load rate caused by data transmission between the master electronic control unit and the slave electronic control unit through the bus is avoided.
Drawings
FIG. 1 is a schematic diagram of a system frame of an automotive electronic control unit and programming equipment according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a steering wheel switch electronic control unit frame according to an embodiment of the present invention;
FIG. 3 is a flow chart of a programming method according to one embodiment of the invention;
FIG. 4 is a flow chart of a programming method according to another embodiment of the present invention;
fig. 5 is a flow chart of the interaction of instructions between the electronic control unit and the programming device according to one specific example of the present invention.
Definition of terms:
NOB: node Bootloader, node bootstrap;
UAPPS: user Application Segment, user program segment;
SWD: serial Wire Debug, serial programming debug interface;
FLD: flash Driver, nonvolatile program memory Driver;
SWDD: serial Wire Debug Driver, serial communication driver;
USM: user Mode, namely normal function program Mode of operation;
PRM: programming Mode, programmer Mode, i.e. programming Mode.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The software programming method of the automobile electronic control unit provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof.
[ first embodiment ]
According to a first embodiment of the present invention, as shown in fig. 1, the automotive electronic control unit 100 implemented by the present invention is an automotive electronic control unit having a specific architecture, such as an automotive steering wheel switch, and includes a master electronic control unit 102 and a slave electronic control unit 103 connected through a serial programming debug (SWD) interface 101, wherein only the master electronic control unit 102 is connected to an automotive control bus 104. The slave electronic control unit 103 is not connected with the automobile control bus 104, and the slave electronic control unit 103 can only perform data bidirectional transmission with the master electronic control unit 102 through the serial programming debug interface 101.
In one embodiment, the master electronic control unit and the slave electronic control unit may control different specific functions, for example in the example of a steering wheel switch, as shown in fig. 2, the master electronic control unit may be a steering wheel right panel ECU-R, for example comprising: the intelligent control system comprises a right plate 2D touch system, a right plate pressure acquisition system, a right plate touch feedback system, a right plate light system, a right plate power supply system, a right plate steering wheel vibration reminding system, a right plate steering wheel constant temperature system, a right plate voice reminding system, a right plate bus interface and a left-right plate communication SWD interface. The slave electronic control unit may be a steering wheel left panel ECU-L comprising: left panel 2D touch system, left panel pressure acquisition system, left panel haptic feedback system, left panel lighting system and left-right inter-panel communication SWD interface. The master and slave electronic control units may be embodied as ECU, MCU, SOC or any other form of control device.
In the process of manufacturing the automobile application device in a manufacturing shop, the SWD interface communication line between the master and slave electronic control units is usually disconnected, and application programs of the slave electronic control units and a boot loader (Bootloader) and application programs of the master electronic control unit can be respectively recorded in the memory of the slave electronic control unit and the memory of the master electronic control unit in advance through a burner such as a Jlink.
After leaving the factory, if the application programs in the master and slave electronic control units are required to be updated, a mode of accessing the automobile control bus network through programming equipment to perform programming updating is required.
In one embodiment, the serial burn debug interface may be SWD, JTAG, ETM or SWV.
The programming method provided in this embodiment, as shown in fig. 3, includes the following steps:
in S301, the main electronic control unit loads the serial programming debug interface driver according to the serial programming debug interface driver issued by the programming device.
The serial burn-in debug interface driver may be, for example, a SWD driver.
In S302, the master ecu receives a slave unit data packet issued by the programming device, where the slave unit data packet includes application data required for updating by the slave ecu.
In S303, the master ecu performs the adaptation processing on the data packet of the slave ecu, and transmits the data packet to the slave ecu through the serial programming debug interface, so that the slave ecu executes the application program update and completes the reset of the slave ecu according to the reset instruction of the master ecu.
The main electronic control unit performs adaptation processing on the data packet of the slave control unit, and the adaptation processing comprises the following steps: unpacking the slave control unit data packet and re-packing according to the serial programming debugging interface communication protocol.
In S304, the main electronic control unit receives the main control unit data packet issued by the programming device and executes the application program update, where the main control unit data packet includes the application program data required for the main electronic control unit update.
In S305, the main electronic control unit updates and completes the reset of the main electronic control unit according to the reset instruction of the programming device.
Further, after step S303, the method may further include the steps of: and the main electronic control unit performs memory drive loading in the main electronic control unit according to the node bootstrap program and the memory drive program issued by the programming equipment so as to update the application program in the bootstrap program of the main electronic control unit.
In addition, before the serial programming debug interface driver (SWD driver) in step S301 is loaded, the main electronic control unit may further provide first information according to an instruction of the programming device, so that the programming device determines whether the electronic control unit meets a programming condition according to the first information, where the first information includes at least a version number of a current application program, a software code, and current state information of a vehicle.
In particular, software codes are stored within the node boot program, the software codes being used to identify the electronic control unit to be programmed and upgraded. The vehicle current state information may be current vehicle speed information of the vehicle. For example, when the version number of the application program required for updating is higher than that of the current application program, the electronic control unit to be subjected to programming upgrading is determined through software coding, and further, when the current state of the vehicle indicates that the vehicle speed is zero or is in a parking state, the electronic control unit is determined to be in accordance with the programming condition.
Optionally, the method further comprises the steps of: before the main electronic control unit loads a serial programming debugging interface driver (SWD driver), the main electronic control unit stops running the current application program according to the instruction of the programming equipment; and setting the functional mode of the main electronic control unit as a burning mode.
The writing method of the present invention has been described above according to the first embodiment of the present invention. The method for programming and upgrading the automobile electronic control unit has the following beneficial effects:
firstly, the master electronic control unit writes and upgrades the slave electronic control unit through the serial writing and debugging interface before writing and upgrading the master electronic control unit, so that the problem that the slave electronic control unit cannot be upgraded due to the failure of writing and upgrading of the master electronic control unit is avoided, and the disassembly repair is caused.
Secondly, the slave electronic control unit and the master electronic control unit are directly communicated through a hardware-level interface-serial programming debugging interface, so that the problem that a bootstrap program needs to be resident or loaded in the slave electronic control unit is avoided, and further, the problem that the application program in the slave electronic control unit is further erased due to the fact that the bootstrap program accidentally executes an erasing instruction under abnormal conditions is avoided.
Third, since there is no need to reside a boot program from the electronic control unit, the memory space in the electronic control unit is freed up, allowing for a larger space for storing applications, providing support for large-storage complex applications.
Fourth, because the slave electronic control unit and the master electronic control unit are directly communicated through the hardware-level interface, namely the serial programming debugging interface, and the bus network is not occupied, the risk of frame loss of data under the high bus load rate caused by data transmission between the master electronic control unit and the slave electronic control unit through the bus is avoided.
[ second embodiment ]
The software programming method according to the first embodiment of the present invention has been described above, the above embodiment is applied to one side of an electronic control unit, and the software programming method according to the second embodiment of the present invention is described below with reference to the accompanying drawings, and the method is applied to a programming device that is matched with an electronic control unit of an automobile. The electronic control unit comprises a master electronic control unit and a slave electronic control unit which are connected through a serial programming debugging interface, wherein only the master electronic control unit is connected with an automobile control bus, the slave electronic control unit is not connected with the automobile control bus, and the slave electronic control unit can only carry out data bidirectional transmission with the master electronic control unit through the serial programming debugging interface.
The programming device in this embodiment may be a complete vehicle diagnostic device VDS or a vehicle-mounted PAD, or may be a network access device through FOTA, which is all communicated with the electronic control unit through accessing an automobile bus control network, which is referred to as a programming device.
As shown in fig. 4, the method comprises the steps of:
in S401, the packaged programming file is stored in the programming device, where the packaged programming file includes information about each driver file, application file, and configuration file required in the software programming process.
In one embodiment, the driver files, application files, and configuration files may be binary files in file formats including, but not limited to, SREC files, S19 files, HEX files, BIN files. In one embodiment, the configuration file includes a SWD driver start address, a memory driver start address, a master electronic control unit application start address, a slave electronic control unit application start address, and a check value.
And in S402, analyzing the packaged programming file to obtain an analyzed programming file.
In S403, the serial programming debug interface driver (SWD driver) obtained according to the parsed programming file is sent to the main electronic control unit, so that the main electronic control unit loads the serial programming debug interface driver (SWD driver).
In S404, a slave unit data packet acquired according to the parsed programming file is sent to the master electronic control unit, so that the master electronic control unit updates an application program of the slave electronic control unit through the serial programming debug interface, and the slave unit data packet includes application program data required for updating the slave electronic control unit.
In S405, a main control unit data packet acquired according to the parsed write file is sent to the main electronic control unit, so that the main electronic control unit executes the application program update, and the main control unit data packet includes the application program data required for the update of the main electronic control unit.
Optionally, before the step S401, the method further includes: and sending an instruction to the main electronic control unit to acquire first information from the main electronic control unit so as to judge whether the electronic control unit accords with the programming condition according to the first information, wherein the first information at least comprises a version number of a current application program, a software code and current state information of a vehicle.
In particular, software codes are stored within the node boot program, the software codes being used to identify the electronic control unit to be programmed and upgraded. The vehicle current state information may be current vehicle speed information of the vehicle. For example, when the version number of the application program required for updating is higher than that of the current application program, the electronic control unit to be subjected to programming upgrading is determined through software coding, and further, when the current state of the vehicle indicates that the vehicle speed is zero or is in a parking state, the electronic control unit is determined to be in accordance with the programming condition.
The software programming method according to the second embodiment of the present invention has been described above, and is matched with the first embodiment, and the software programming method is applied to one side of the programming device, and by matching with the software programming method applied by the electronic control unit of the automobile, the following beneficial effects can be obtained:
firstly, all the information about various driver files, application program files and configuration files required by a master electronic control unit and a slave electronic control unit in the software programming process form a complete packaged programming file, and the complete packaged programming file is issued to programming equipment at one time, so that the problems of complex operation, confusion and incorrect programming caused by the need of respectively selecting an upgrade instruction file or a driver in the traditional software programming method are avoided.
In the second embodiment, in the alternative embodiment, the programming device determines whether the electronic control unit meets the programming conditions, and only executes the subsequent programming operation if the electronic control unit meets the programming conditions, thereby avoiding the programming failure caused by software version upgrade errors, mismatching of software and hardware, and failure of supporting the programming operation due to vehicle conditions.
[ third embodiment ]
In the following, a third embodiment according to the present invention is provided by continuing to refer to fig. 1, an electronic control unit 100 for a vehicle, comprising a master electronic control unit 102 and a slave electronic control unit 103 connected via a serial burn-in debug (SWD) interface 101, wherein only the master electronic control unit 102 is connected to a vehicle control bus 104, the vehicle electronic control unit 100 being adapted to perform the method according to the first embodiment.
[ fourth embodiment ]
With continued reference to fig. 1, a software programming device 105 of an electronic control unit of a vehicle according to a fourth embodiment of the present invention will be described, the software programming device 105 being adapted to cooperate with the electronic control unit 100 of the vehicle, the electronic control unit 100 comprising a master electronic control unit 102 and a slave electronic control unit 103 connected via a serial programming debug (SWD) interface 101, wherein only the master electronic control unit 102 is connected to the vehicle control bus 104, the software programming device 105 being adapted to perform the method according to the second embodiment of the present invention.
[ fifth embodiment ]
Next, with continued reference to fig. 1, a software programming system of an electronic control unit for an automobile according to a fifth embodiment of the present invention is described, which includes an electronic control unit 100 for an automobile according to a third embodiment of the present invention and a software programming device 105 according to a fourth embodiment of the present invention.
The programming method, the control unit, the programming equipment and the system have been described according to the embodiments of the five aspects of the invention, and the problems of complicated software programming operation, long time consumption, easy data loss, high failure rate and high disassembly repair rate in the prior art are solved by the scheme.
[ example ]
A specific example of command interaction between the electronic control unit and the programming device of the present invention will be described in detail below with reference to the example of the steering wheel switch system of fig. 2. In the steering wheel switch system, the main electronic control unit is a steering wheel right plate ECU-R, and the auxiliary electronic control unit is a steering wheel left plate ECU-L.
Fig. 5 shows a flow chart of the interaction of instructions between the electronic control unit and the programming device of the present invention. As shown in FIG. 5, SWD driver binary file, SREC and application UAPP binary file, SREC and right flash driver binary file, SREC and application UAPP binary file, SREC and configuration file, XML composition programming upgrade package, XCP, are downloaded to the programming device, e.g., VDS local or vehicle PAD local, at step S501.
Step S502, establishing communication connection between the programming equipment and the whole-vehicle ODB interface, and selecting a primary upgrade package file on the programming equipment without distinguishing a left board upgrade package from a right board upgrade package; or pushing the upgrade package file to the CANFD interface of the whole vehicle control bus in a vehicle-mounted FOTA wireless mode to establish communication connection with the right plate, and transmitting the upgrade package file.
In step S503, the left board is programmed and updated first, the programming device reads the UAPP software version and the bootstrap (NOB) software code of the application program from the right board according to the protocol request, and the right board receives the response result after the request, and the programming device determines whether the programming condition is met.
In step S504, the programming device analyzes XCP programming upgrade package, reads configuration file, requests the left board programming according to protocol, the right board stops the operation of function program UAPPS-R and responds to the request success message; the configuration file config. XML described herein includes, but is not limited to, the address of the start of the SWD program, the Flashdriver start address, the UAPPS-L, UAPPS-R start address, and the check value.
In step S505, the writing device switches from the user mode USM to the writing mode PRM according to the protocol transmission request, and the right panel responds to the switching success message.
In step S506, the programming device issues SWD driver SWDD data according to the protocol, and the right board stores the received data in the RAM, completes the loading operation, and responds to the loading result.
In step S507, the programming device issues UAPPS-L data requests according to the protocol, unpacks or packs the data in the PRM mode, the left board completes the programming update of the right board through the clock and the data interface, and the verification result is responded.
In step S508, the right board outputs a low level signal through the reset pin, so that the left board is passively reset, and the left board responds to the reset result.
In step S509, the programming device requests the right board to program according to the protocol, and the right board jumps from the UAPPS program to the NOB boot program running and responds to the jump result.
In step S510, the programming device loads the FlashDriver driver according to the protocol issuing bootstrap program, and the right board completes loading the FLD program into the RAM space and answers the result.
In step S511, the programming device issues the right board UAPPS-R according to the protocol, and the right board executes the FLD program to complete the right board erasing and programming updating and responds to the programming result.
In step S512, the writing device requests the right software reset according to the protocol, and the right software reset completes exiting the node boot program, running the UAPPS-R program, recovering to the functional mode USM, and answering the result.
In step S513, the writing device receives the writing success response and exits the upgrade request.
The memory to which embodiments of the present invention are directed may be used to store software programs as well as various data. The memory may mainly include a first memory area storing programs or instructions and a second memory area storing data, wherein the first memory area may store an operating system, application programs or instructions required for at least one function, and the like. Further, the memory may include volatile memory or nonvolatile memory, or the memory may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (11)

1. The method is characterized in that the method is applied to the electronic control unit, the electronic control unit comprises a master electronic control unit and a slave electronic control unit which are connected through a serial programming debugging interface, wherein the master electronic control unit is connected with an automobile control bus and comprises the following steps:
the main electronic control unit loads the serial programming debugging interface driver according to the serial programming debugging interface driver issued by the programming equipment;
the master electronic control unit receives a slave control unit data packet issued by the programming equipment, wherein the slave control unit data packet comprises application program data required by updating of the slave electronic control unit;
after the data packet of the slave control unit is subjected to the adaptation processing by the master electronic control unit, the data packet is transmitted to the slave electronic control unit through the serial programming debugging interface, so that the slave electronic control unit executes the update of an application program and completes the reset of the slave electronic control unit according to a reset instruction of the master electronic control unit;
the main electronic control unit receives a main control unit data packet issued by the programming equipment and executes application program update, wherein the main control unit data packet comprises application program data required to be updated by the main electronic control unit;
and the main electronic control unit completes the reset of the main electronic control unit according to the reset instruction of the programming equipment.
2. The software programming method of claim 1, further comprising:
after the slave electronic control unit finishes resetting, the master electronic control unit loads a memory drive in the master electronic control unit according to a node bootstrap program and a memory drive program issued by the programming equipment, so that an application program is updated in the bootstrap program of the master electronic control unit.
3. The software programming method of claim 1, further comprising:
before the main electronic control unit loads the serial programming debugging interface driver, the main electronic control unit provides first information according to an instruction of the programming equipment so that the programming equipment can judge whether the electronic control unit accords with programming conditions according to the first information, wherein the first information at least comprises a version number of a current application program, a software code and current state information of a vehicle.
4. The software programming method of claim 1, further comprising:
before the main electronic control unit loads the serial programming debugging interface driver, the main electronic control unit stops running the current application program according to the instruction of the programming equipment; and setting the functional mode of the main electronic control unit as a burning mode.
5. The software programming method according to claim 1, wherein the master ecu performing adaptation processing on the slave ecu packet includes: unpacking the slave control unit data packet, and reorganizing the packet according to the serial programming debugging interface communication protocol for transmission.
6. The method is applied to programming equipment matched with the automobile electronic control unit, and the electronic control unit comprises a master electronic control unit and a slave electronic control unit which are connected through a serial programming debugging interface, wherein the master electronic control unit is connected with an automobile control bus and comprises the following steps:
storing a packaged programming file to the programming equipment, wherein the packaged programming file comprises information related to each driver file, application program file and configuration file required in the software programming process;
analyzing the packaged programming file to obtain an analyzed programming file;
transmitting a serial programming debugging interface driver acquired according to the parsed programming file to the main electronic control unit so that the main electronic control unit loads the serial programming debugging interface driver;
transmitting a slave control unit data packet acquired according to the parsed programming file to the master electronic control unit so that the master electronic control unit updates an application program of the slave electronic control unit through the serial programming debugging interface, wherein the slave control unit data packet comprises application program data required by the update of the slave electronic control unit;
and sending a main control unit data packet acquired according to the parsed programming file to the main electronic control unit so that the main electronic control unit executes application program updating, wherein the main control unit data packet comprises application program data required by the main electronic control unit for updating.
7. The software programming method of claim 6, further comprising:
and sending an instruction to the main electronic control unit to acquire first information from the main electronic control unit, so as to judge whether the electronic control unit accords with the programming condition according to the first information, wherein the first information at least comprises a version number of a current application program, a software code and current state information of a vehicle.
8. The software programming method of claim 6, wherein the configuration file included in the packaged programming file comprises:
a serial programming debugging interface driver starting address, a memory driver starting address, a master electronic control unit application starting address and a slave electronic control unit application starting address.
9. An automotive electronic control unit comprising a master electronic control unit and a slave electronic control unit connected by a serial programming debug interface, wherein the master electronic control unit is connected to an automotive control bus, the automotive electronic control unit being adapted to perform the method of any of claims 1-5.
10. A software programming device of an automotive electronic control unit, wherein the software programming device is matched with the automotive electronic control unit, the electronic control unit comprises a master electronic control unit and a slave electronic control unit which are connected through a serial programming debugging interface, the master electronic control unit is connected with an automotive control bus, and the software programming device is used for executing the method of any one of claims 6-8.
11. A software programming system of an automotive electronic control unit comprising the automotive electronic control unit according to claim 9 and the software programming device according to claim 10.
CN202210978239.0A 2022-08-15 2022-08-15 Software programming method, automobile electronic control unit, programming equipment and system Pending CN117632153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210978239.0A CN117632153A (en) 2022-08-15 2022-08-15 Software programming method, automobile electronic control unit, programming equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210978239.0A CN117632153A (en) 2022-08-15 2022-08-15 Software programming method, automobile electronic control unit, programming equipment and system

Publications (1)

Publication Number Publication Date
CN117632153A true CN117632153A (en) 2024-03-01

Family

ID=90018685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210978239.0A Pending CN117632153A (en) 2022-08-15 2022-08-15 Software programming method, automobile electronic control unit, programming equipment and system

Country Status (1)

Country Link
CN (1) CN117632153A (en)

Similar Documents

Publication Publication Date Title
US10409587B2 (en) Method for programming vehicle electronic control modules
CN108279916B (en) Electronic control unit program updating method and device
CA2502113A1 (en) Method and system for remote reflash
CN112698854A (en) Vehicle multi-controller flashing device
US9569404B2 (en) In-vehicle controller and non-transitory tangible computer readable medium
EP3249531B1 (en) Control means, in-vehicle program rewriting device equipped with same, and in-vehicle program rewriting method
US20230297368A1 (en) Software update apparatus, software update method, non-transitory storage medium storing program, vehicle, and ota master
WO2019123747A1 (en) Electronic control device for automobile and control method thereof
CN111746630A (en) Electric power steering double-control system and cascade refreshing method thereof
CN116225501A (en) ECU upgrading method and device and readable storage medium
CN117632153A (en) Software programming method, automobile electronic control unit, programming equipment and system
CN110377303B (en) Method and equipment for upgrading program based on spare storage area mode
US20090210613A1 (en) Method for Programming a Controller in a Motor Vehicle
US11736577B2 (en) Server, update management method, non-transitory storage medium, software update device, and system including server and software update device
CN114895947A (en) Software upgrading method, device, equipment and storage medium of vehicle-mounted controller
CN101452263A (en) Automobile electronic controller and start-up control method thereof
CN113127043A (en) Method for upgrading BootLoader on line by using single chip microcomputer APP
KR20150043732A (en) System and method for software update of vehicle controller
CN112230848A (en) NVM automatic configuration method, device and equipment
CN110794735A (en) Remote control device and method
KR20110053056A (en) Self-updating method of audio-video system
CN112817629B (en) BIOS refreshing method and related device of ARM architecture server platform
CN112015452B (en) Firmware upgrading method and device for gate system and gate system
CN110377320B (en) DSP code online updating system and method based on double FLASH
JP7396216B2 (en) Server, update management method, update management program, and software update device

Legal Events

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