A vehicle controller flashing system, method and related equipment
By designing the vehicle controller flash writing system, including ECU information processing, flash file processing, instruction recognition and message generation modules, the problem of poor applicability of the flash writing system in the existing technology is solved, and the system can be used for multiple controllers and CAN Efficient flashing of devices.
Patent Information
- Application Number
- CN202010215701.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-03-24
AI Technical Summary
In the existing technology, the controller flashing system has poor applicability and cannot effectively flash different types of controllers and CAN devices, resulting in low flashing efficiency.
A vehicle controller flashing system is designed, including an ECU information processing module, a flashing file processing module, an instruction identification module and a message generation module. It can parse the configuration information of the target ECU, generate binary files and flashing instruction sets, and Supports multiple communication protocols and CAN hardware devices, enabling simultaneous flashing of multiple controllers.
It improves the applicability and efficiency of controller flashing, supports a variety of different types of controllers and CAN hardware devices, and significantly improves the efficiency of controller flashing.
Smart Images

Figure CN113448596B
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle controller flashing system, method and related equipment. Background Art
[0002] The Electronic Control Unit (ECU), also known as the on-board computer, can control the engine's air intake, fuel injection, ignition timing, etc., thereby indirectly determining the engine's operating efficiency, power, torque, etc.
[0003] By reflashing the ECU, the parameters that indirectly determine the engine's operating efficiency, power, torque, etc., which are controlled by the ECU, can be changed to improve the vehicle's power performance and reduce the vehicle's fuel consumption.
[0004] However, in the prior art, the controller flashing system used when flashing the ECU is developed based on a specific controller, a Controller Area Network (CAN) device, and a communication protocol. When any one of the controller, CAN device, and communication protocol of another vehicle does not correspond to the controller flashing system, the ECU of the other vehicle cannot be flashed, and the applicability of the controller flashing system is poor. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a vehicle controller flashing system, method and related equipment, which can realize simultaneous flashing of multiple different types of controllers, has strong applicability, and improves the efficiency of flashing controllers.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] In a first aspect, the present application provides a vehicle controller flashing system, comprising: an electronic control unit ECU information processing module, a flashing file processing module, a command recognition module and a message generation module;
[0008] The ECU information processing module is used to parse the configuration information of the target ECU according to the configuration file of the target ECU; wherein the configuration information includes the address and size of the data storage area of the target ECU;
[0009] The flash file processing module is used to parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU;
[0010] The instruction recognition module is used to parse out the flash instruction set of the target ECU according to the communication protocol and the flash instruction configuration file of the target ECU;
[0011] The message generation module is used to encapsulate the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU.
[0012] Optionally, the target ECU includes a first ECU and a second ECU;
[0013] The ECU information processing module is used to parse out the first address and the first size of the data storage area of the first ECU and the second address and the second size of the data storage area of the second ECU according to the configuration files of the first ECU and the second ECU, and save them into an array;
[0014] The flash file processing module is used to generate a first bin file of the first ECU according to the first address and the first size obtained from the array, and to generate a second bin file of the second ECU according to the second address and the second size obtained from the array.
[0015] Optionally, the system further includes: a message sending module;
[0016] The message sending module is used to determine the driving interface and communication protocol of the controller area network (CAN) device, and send the message data to the CAN hard line to facilitate the transmission of the message data.
[0017] Optionally, the system further includes an input module and a CAN device initialization module;
[0018] The input module is used to input target CAN device information;
[0019] The CAN device initialization module is used to initialize the driver of the target CAN device based on the target CAN device information.
[0020] Optionally, the system further comprises a display;
[0021] The display is used to display the configuration information of the target ECU;
[0022] The input module is also used to correct the configuration information of the target ECU.
[0023] Optionally, the system further includes an ECU information management module;
[0024] The input module is used to input the configuration file of the target ECU;
[0025] The ECU information management module is used to update the ECU configuration file database according to the configuration file of the target ECU; and is also used to determine whether the configuration file of the target ECU is consistent with the configuration file in the ECU configuration file database before flashing the target ECU; if not, stop flashing;
[0026] The display is also used to display abnormal information if there is inconsistency, so as to prompt the correctness of the configuration file of the target ECU input;
[0027] The ECU information management module is further configured to download the configuration file of the target ECU from the ECU configuration file database if there is no inconsistency and the information for correcting the configuration file of the target ECU input by the input module is not received.
[0028] Optionally, the system further includes a flash file management module;
[0029] The flash file management module is used to upload the file to be flashed to the flash file database after the target ECU is successfully flashed; and is also used to download the file to be flashed from the flash file database.
[0030] Optionally, the system further includes an instruction management module;
[0031] The input module is used to input the communication protocol and flashing instruction configuration file of the target ECU;
[0032] The instruction management module is used to update the instruction database according to the communication protocol and the flash instruction configuration file of the target ECU; and is also used to determine whether the communication protocol and the flash instruction configuration file of the target ECU are consistent with those in the instruction database before flashing the target ECU; if they are inconsistent, the flashing is stopped;
[0033] The display is also used to display abnormal information if there is any inconsistency, so as to prompt the correctness of the communication protocol and the flashing instruction configuration file of the target ECU;
[0034] The instruction management module is also used to download the communication protocol and flashing instruction configuration file of the target ECU from the instruction database if there is inconsistency and the communication protocol and flashing instruction configuration file for correcting the target ECU input by the input module are not received.
[0035] In a second aspect, the present application provides a vehicle controller flashing method, which is applied to a vehicle controller flashing system, and the method includes:
[0036] According to the configuration file of the target ECU, the configuration information of the target ECU is parsed; wherein the configuration information includes the address and size of the data storage area of the target ECU;
[0037] Parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU;
[0038] Parsing the flashing instruction set of the target ECU according to the communication protocol and the flashing instruction configuration file of the target ECU;
[0039] The configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set are encapsulated into message data; wherein the message data is used to flash the target ECU.
[0040] Optionally, the target ECU includes a first ECU and a second ECU;
[0041] The step of parsing the configuration information of the target ECU according to the configuration file of the target ECU includes:
[0042] According to the configuration files of the first ECU and the second ECU, a first address and a first size of the data storage area of the first ECU and a second address and a second size of the data storage area of the second ECU are parsed; and the first address and the first size of the data storage area of the second ECU are saved in an array;
[0043] The step of parsing the file to be flashed according to the address and size of the ECU data storage area and generating a binary bin file of the target ECU includes:
[0044] A first bin file of the first ECU is generated according to the first address and the first size obtained from the array, and a second bin file of the second ECU is generated according to the second address and the second size obtained from the array.
[0045] Optionally, the method further includes:
[0046] Determine the drive interface and communication protocol of the controller area network (CAN) device, and send the message data to the CAN hard line to facilitate the transmission of the message data.
[0047] Optionally, the method further includes:
[0048] Get the target CAN device information;
[0049] Based on the target CAN device information, a driver of the target CAN device is initialized.
[0050] Optionally, the method further includes:
[0051] Displaying configuration information of the target ECU;
[0052] The configuration information of the target ECU is modified.
[0053] Optionally, the method further includes:
[0054] According to the configuration file of the target ECU, an ECU configuration file database is updated;
[0055] Before flashing the target ECU, determine whether the configuration file of the target ECU is consistent with that in the ECU configuration file database; if they are inconsistent, stop flashing;
[0056] If the information for correcting the configuration file of the target ECU is not received, the configuration file of the target ECU is downloaded from the ECU configuration file database.
[0057] Optionally, the method further includes:
[0058] After the target ECU is successfully flashed, the file to be flashed is uploaded to a flash file database, or;
[0059] Before flashing the target ECU, the file to be flashed is downloaded from the flashing file database.
[0060] Optionally, the method further includes:
[0061] Updating the instruction database according to the communication protocol and the flash instruction configuration file of the target ECU;
[0062] Before flashing the target ECU, determine whether the communication protocol and flashing instruction configuration file of the target ECU are consistent with those in the instruction database; if they are inconsistent, stop flashing;
[0063] If the communication protocol and the flashing instruction configuration file for correcting the target ECU are not received, the communication protocol and the flashing instruction configuration file for the target ECU are downloaded from the instruction database.
[0064] In a third aspect, the present application provides a vehicle controller flashing device, comprising the flashing system described in any one of the first aspects of the present application; the device also includes a controller to be flashed;
[0065] The flashing system is used to flash the controller to be flashed.
[0066] It can be seen from the above technical solution that the embodiment of the present application has the following advantages:
[0067] The present invention provides a vehicle controller flashing system, method and related equipment, the system includes: an electronic control unit ECU information processing module, a flashing file processing module, an instruction recognition module and a message generation module; the ECU information processing module is used to parse the configuration information of the target ECU according to the configuration file of the target ECU; wherein the configuration information includes the address and size of the data storage area of the target ECU; the flashing file processing module is used to parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU; the instruction recognition module is used to parse the flashing instruction set of the target ECU according to the communication protocol and the flashing instruction configuration file of the target ECU; the message generation module is used to encapsulate the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU. The controller flashing system supports controller flashing of multiple communication protocols, supports multiple different types of controller flashing, and supports multiple CAN hardware devices, has strong applicability, and high efficiency of flashing controllers. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 A schematic diagram of a vehicle controller flashing system provided in an embodiment of the present application;
[0070] Figure 2 A flowchart of a flash file processing module processing data provided in an embodiment of the present application;
[0071] Figure 3 A flowchart of a message generation module processing data provided in an embodiment of the present application;
[0072] Figure 4 A schematic diagram of another vehicle controller flashing system provided in an embodiment of the present application;
[0073] Figure 5 A flowchart of a message sending module processing data provided in an embodiment of the present application;
[0074] Figure 6 A schematic diagram of another vehicle controller flashing system provided in an embodiment of the present application;
[0075] Figure 7A flow chart of a vehicle controller flashing method provided in an embodiment of the present application;
[0076] Figure 8 A schematic diagram of a vehicle controller flashing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] In the prior art, the controller flashing system is developed based on a specific controller, CAN device and communication protocol. Therefore, it only supports the flashing of one type of controller and cannot flash other different types of controllers. In addition, the CAN device and communication protocol also have poor adaptability to the corresponding controller.
[0078] In order to solve the above problems, the present application provides a vehicle controller flashing system, method and related equipment.
[0079] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0080] Embodiment 1:
[0081] The first embodiment of the present application provides a vehicle controller flashing system, which is described in detail below with reference to the accompanying drawings.
[0082] See also Figure 1 , which is a schematic diagram of a vehicle controller flashing system provided in an embodiment of the present application.
[0083] The system comprises: an electronic control unit ECU information processing module 101 , a flash file processing module 102 , an instruction recognition module 103 and a message generation module 104 .
[0084] The ECU information processing module 101 is used to parse the configuration information of the target ECU according to the configuration file of the target ECU; wherein the configuration information includes the address and size of the data storage area of the target ECU.
[0085] The flash file processing module 102 is used to parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU.
[0086] The instruction recognition module 103 is used to parse out the flash instruction set of the target ECU according to the communication protocol and the flash instruction configuration file of the target ECU.
[0087] The message generation module 104 is used to encapsulate the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU.
[0088] As a possible implementation manner, the target ECU includes a first ECU and a second ECU.
[0089] The ECU information processing module 101 is used to parse out the first address and the first size of the data storage area of the first ECU and the second address and the second size of the data storage area of the second ECU according to the configuration files of the first ECU and the second ECU, and save them into an array;
[0090] The flash file processing module 102 is used to generate a first bin file of the first ECU according to the first address and the first size obtained from the array, and to generate a second bin file of the second ECU according to the second address and the second size obtained from the array.
[0091] The vehicle controller flashing system provided in the embodiment of the present application not only supports flashing of a single controller, but also supports flashing of multiple different controllers at the same time. The following is a detailed introduction of two cases.
[0092] The first method: flash multiple controllers.
[0093] See also Figure 2 , which is a flow chart of processing data by a flash file processing module provided in an embodiment of the present application.
[0094] The process of the flash file processing module processing data to generate a bin file includes:
[0095] Step 201: Obtain paths of files to be flashed of multiple controllers and save them in an array.
[0096] It can be understood that the file to be flashed of each controller uniquely corresponds to each controller.
[0097] The file to be flashed may be a hex format file or an s19 format file.
[0098] Step 202: Determine whether there is any unprocessed file to be flashed corresponding to the controller.
[0099] It is understandable that the judgment process may be to check one by one whether the to-be-written file corresponding to each controller has been converted, or to judge by other methods, which are not limited in the embodiment.
[0100] Step 203: Obtain addresses and sizes of data storage areas of multiple controllers.
[0101] It is understandable that the ECU information processing module 101 can parse the configuration information of multiple controllers according to the configuration files of multiple controllers, and thus obtain the addresses and sizes of the data storage areas of the multiple controllers.
[0102] Step 204: parse the file to be flashed according to the address and size of the data storage area of the controller, and generate a bin file. Then execute "Step 202".
[0103] The second method: flash a single controller.
[0104] The flashing process for a single controller is similar to the flashing process for multiple controllers, that is, the above-mentioned "step 202" is not required, and "step 203" and "step 204" are performed after "step 201", which will not be repeated here.
[0105] The following describes in detail how the message generation module generates message data in conjunction with the flash instruction set parsed by the instruction recognition module.
[0106] See also Figure 3 , which is a flow chart of data processing by a message generation module provided in an embodiment of the present application.
[0107] After the above-mentioned "step 204", the process of the message generation module processing data to generate message data includes:
[0108] Step 301: Determine whether there is an unprocessed flash instruction set.
[0109] It is understandable that the flash instruction set may be flashed via the UDS protocol or via the CCP protocol.
[0110] See Table 1, which shows the flash instruction set configuration items.
[0111] Configuration items Example Com Protocol UDS / CCP Address Mode Function / Physical Delay Time(ms) 0 Erase Command Message Request Seed / Send Key Erase Command Req Data 0x27 0x05 / 0x27 0x06 Erase Command Resp Expect Data 0x67 0x05 / 0x67 0x06
[0112] Table 1
[0113] Step 302: Determine whether it is an erase command; if so, execute "step 303"; if not, execute "step 304".
[0114] Step 303: Encapsulate the configuration information of the ECU into a CAN message. Then execute "Step 309".
[0115] It can be understood that the configuration information includes the address and size of the target ECU data storage area.
[0116] Step 304: Determine whether it is a download command; if so, execute "Step 305"; if not, execute "Step 306".
[0117] Step 305: Encapsulate the bin file of the ECU into the CAN message. Then execute "Step 309".
[0118] Step 306: Determine whether it is a key request command; if so, execute "Step 307"; if not, execute "Step 308".
[0119] Step 307: Encapsulate the calculated key into the CAN message. Then execute "Step 309".
[0120] Step 308: Encapsulate the flash instruction set into a CAN message.
[0121] Step 309: Add file header information to the CAN message to generate message data.
[0122] The following describes how to transmit the message data.
[0123] See also Figure 4 , which is a schematic diagram of another vehicle controller flashing system provided in an embodiment of the present application.
[0124] Combination Figure 1 The system also includes: a message sending module 105.
[0125] The message sending module 105 is used to determine the driving interface and communication protocol of the CAN device, and send the message data to the CAN hard line to facilitate the transmission of the message data.
[0126] The system further includes an input module 106 and a CAN device initialization module 107 .
[0127] The input module 106 is used to input target CAN device information.
[0128] The CAN device initialization module 107 is used to initialize the driver of the target CAN device based on the target CAN device information.
[0129] It is understandable that the driver of the CAN device can be initialized according to the CAN device connected to the controller flashing system input in the input module 106, so as to transmit the message data. The CAN hardware described in the embodiment of the present application may include: ES581, Peak CAN, SPY3, ZLG CAN and VALUE CAN. The CAN hardware is not limited in the embodiment of the present application.
[0130] As a possible implementation, the message sending module 105 determines the drive interface of the CAN device by acquiring the CAN device identification information, and sends the message data generated by the message generating module 104 to the CAN hard line according to the drive interface and the communication protocol.
[0131] See also Figure 5 , which is a flow chart of data processing by a message sending module provided in an embodiment of the present application.
[0132] After the above-mentioned "step 309", the process of the message sending module processing data to transmit the message data includes:
[0133] Step 501: Determine whether the number of bytes in the CAN message stream is greater than a preset value; if so, execute "Step 502"; if not, execute "Step 503".
[0134] It should be noted that the preset value may be 7 Bytes, and those skilled in the art may set it according to actual needs. In this embodiment, 7 Bytes is preferred, thereby improving the CAN message transmission efficiency.
[0135] Step 502: Unpack the CAN message into continuous frames and transmit them using continuous frames.
[0136] Step 503: Transmit the CAN message using a single frame.
[0137] Step 504: Determine the driver interface and communication protocol of the CAN device.
[0138] Among them, the available driver interfaces of the CAN devices include: ES581 driver, Peak CAN driver, SPY3 driver, ZLG CAN driver and VALUE CAN driver. The available communication protocols include: UDS communication protocol, SAE J2534 communication protocol and CCP communication protocol. The specific selection is determined according to the CAN device information, and can also be determined according to the user's choice. Those skilled in the art can determine which driver interface and transmission protocol to select based on specific actual needs. Furthermore, the controller flashing system provided in the embodiment of the present application can support a variety of CAN hardware devices, thereby saving labor costs and hardware costs.
[0139] Step 505: Transmit CAN message via CAN hard line.
[0140] The following describes how the vehicle controller flashing system provided in the embodiment of the present application implements the management of ECU configuration information, controller software version management, and flashing instruction management.
[0141] See also Figure 6, which is a schematic diagram of another vehicle controller flashing system provided in an embodiment of the present application.
[0142] Combination Figure 1 and Figure 4 The system also includes: a display 108, an ECU information management module 109, a flash file management module 110 and an instruction management module 111.
[0143] The display 108 is used to display the configuration information of the target ECU.
[0144] The input module 106 is also used to modify the configuration information of the target ECU.
[0145] After the ECU information processing module 101 parses the configuration information of the ECU, the configuration information can be displayed on a designated interface through the display 108 , and the configuration information can be modified through the input module 106 .
[0146] See Table 2, which shows the configuration information of the ECU.
[0147] Configuration items Example Project Name HCU_MPC5746 ECU Type HCU Phy ID 0x485 Func ID 0x7DF Resp ID 0x4C5 ASWO_BaseAddr 0x80000000 ASWO_Size 0x00001000 ASW1_BaseAddr 0x80400000 ASW1_Size 0x00020000 CaliData0_BaseAddr 0x80600000 CaliData0_Size 0x00001000 CaliData1_BaseAddr - CaliData1_Size -
[0148] Table 2
[0149] The configuration information of the ECU in Table 2 of the embodiment of the present application is only an exemplary display. It is understandable that in the embodiment of the present application, the ECU includes one or more data storage areas, and the configuration information includes the address and size of the data storage area. For example, "ASWO_BaseAddr" and "Ox80000000" in Table 2 are the addresses of the first data storage area, and "ASWO_Size" and "0x00001000" are the sizes corresponding to the first data storage area. The present application is not limited to the examples shown in Table 2 above.
[0150] The following describes how to manage the configuration information of the ECU.
[0151] It is understandable that when there are fewer models to be developed, the local configuration files can be used to flash the controllers of each model. However, when there are more models, if the local configuration files are still used to flash the controllers of each model, a large number of controller configuration files will be faced, which will bring the burden of managing data to the developers. Therefore, the flashing system of the vehicle controller in the embodiment of the present application provides an ECU information management module 109.
[0152] As a possible implementation, the input module 106 is used to input the configuration file of the target ECU. The ECU information management module 109 is used to update the ECU configuration file database according to the configuration file of the target ECU; it is also used to determine whether the configuration file of the target ECU is consistent with that in the ECU configuration file database before flashing the target ECU; if not, the flashing is stopped. The display 108 is also used to display abnormal information in case of inconsistency to prompt the correctness of the configuration file of the input target ECU. The ECU information management module 109 is also used to download the configuration file of the target ECU from the ECU configuration file database if there is inconsistency and the information for correcting the configuration file of the target ECU input by the input module is not received.
[0153] In this embodiment, by establishing an ECU configuration file database to manage the configuration information of the ECU, the configuration files of the controllers of various vehicle models can be obtained, thereby quickly flashing the controllers of various vehicle models, thereby reducing the burden of developers in managing ECU configuration files.
[0154] The following describes how the vehicle controller flashing system provided in the embodiment of the present application implements version management of the controller software.
[0155] It is understandable that the controller software needs to be managed and controlled during the development process, and different versions may have data incompatibility issues such as flash files. Therefore, the flash system of the vehicle controller of the embodiment of the present application provides a flash file management module 110.
[0156] As a possible implementation manner, the flash file management module 110 is used to upload the file to be flashed to a flash file database after the target ECU is successfully flashed; and is also used to download the file to be flashed from the flash file database.
[0157] In this embodiment, the successfully written files to be flashed can be uploaded to the flash file database, and the files to be flashed can also be downloaded from the flash file database. Even after the controller software version is updated, the files to be flashed can be obtained from the flash file database, thus realizing the controller software version tracking and avoiding the problem of incompatible flash file data of different versions.
[0158] The following describes how the vehicle controller flashing system provided in the embodiment of the present application implements the management of flashing instructions.
[0159] It is understandable that when developing a small number of vehicle models, a local flash command configuration file can be used to manage the controller flash commands of each vehicle model. However, when there are many vehicle models, if the local flash command configuration file is still used to manage the controller flash commands of each vehicle model, a large number of controller flash command configuration files will be faced, which will bring a burden of managing data to the developers. Therefore, the flash system of the vehicle controller in the embodiment of the present application provides an instruction management module 111.
[0160] As a possible implementation, the input module 106 is used to input the communication protocol and flash instruction configuration file of the target ECU. The instruction management module 111 is used to update the instruction database according to the communication protocol and flash instruction configuration file of the target ECU; it is also used to determine whether the communication protocol and flash instruction configuration file of the target ECU are consistent with those in the instruction database before flashing the target ECU; if they are inconsistent, the flashing is stopped. The display 108 is also used to display abnormal information if there is inconsistency, so as to prompt the correctness of the communication protocol and flash instruction configuration file of the target ECU. The instruction management module 111 is also used to download the communication protocol and flash instruction configuration file of the target ECU from the instruction database if there is inconsistency and the input module has not been received to correct the communication protocol and flash instruction configuration file of the target ECU.
[0161] In this embodiment, by establishing an instruction database to manage the flash instruction configuration files, it is possible to obtain the flash instruction configuration files of each vehicle model controller, thereby reducing the burden of developers in managing the flash instruction configuration files.
[0162] It can be seen from the above technical solution that the embodiment of the present application has the following advantages:
[0163] The present invention provides a vehicle controller flashing system, which includes: an electronic control unit ECU information processing module, a flashing file processing module, an instruction recognition module and a message generation module; the ECU information processing module is used to parse the configuration information of the target ECU according to the configuration file of the target ECU; wherein the configuration information includes the address and size of the data storage area of the target ECU; the flashing file processing module is used to parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU; the instruction recognition module is used to parse the flashing instruction set of the target ECU according to the communication protocol and the flashing instruction configuration file of the target ECU; the message generation module is used to encapsulate the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU. The controller flashing system supports controller flashing of multiple communication protocols, supports multiple different types of controller flashing, and supports multiple CAN hardware devices, has strong applicability, and high efficiency of flashing controllers.
[0164] Embodiment 2:
[0165] The second embodiment of the present application provides a vehicle controller flashing method, which is described in detail below with reference to the accompanying drawings.
[0166] See also Figure 7 , which is a flow chart of a vehicle controller flashing method provided in an embodiment of the present application.
[0167] The vehicle controller flashing method comprises:
[0168] Step 701: According to the configuration file of the target ECU, the configuration information of the target ECU is parsed; wherein the configuration information includes the address and size of the data storage area of the target ECU.
[0169] Step 702: Parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU.
[0170] Step 703: According to the communication protocol and the flashing instruction configuration file of the target ECU, parse out the flashing instruction set of the target ECU.
[0171] Step 704: Encapsulate the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU.
[0172] As a possible implementation manner, the target ECU includes a first ECU and a second ECU; parsing the configuration information of the target ECU according to the configuration file of the target ECU includes: parsing the first address and the first size of the data storage area of the first ECU, and the second address and the second size of the data storage area of the second ECU according to the configuration files of the first ECU and the second ECU; and saving them in an array; parsing the file to be flashed according to the address and size of the ECU data storage area, and generating a binary bin file of the target ECU includes: generating a first bin file of the first ECU according to the first address and the first size obtained from the array, and generating a second bin file of the second ECU according to the second address and the second size obtained from the array.
[0173] As a possible implementation, the method further includes: determining a driver interface and a communication protocol of a controller area network (CAN) device, and sending the message data to the CAN hard line to facilitate transmission of the message data.
[0174] As a possible implementation, the method further includes: obtaining target CAN device information;
[0175] Based on the target CAN device information, a driver of the target CAN device is initialized.
[0176] As a possible implementation manner, the method further includes: displaying configuration information of the target ECU; and correcting the configuration information of the target ECU.
[0177] As a possible implementation, the method further includes: updating an ECU configuration file database according to the configuration file of the target ECU; before flashing the target ECU, determining whether the configuration file of the target ECU is consistent with that in the ECU configuration file database; if they are inconsistent, stopping the flashing; and downloading the configuration file of the target ECU from the ECU configuration file database if no information for correcting the configuration file of the target ECU is received.
[0178] As a possible implementation manner, the method further includes: after successfully flashing the target ECU, uploading the file to be flashed to a flash file database; or; before flashing the target ECU, downloading the file to be flashed from the flash file database.
[0179] As a possible implementation mode, the method further includes: updating the instruction database according to the communication protocol and the flash instruction configuration file of the target ECU; before flashing the target ECU, determining whether the communication protocol and the flash instruction configuration file of the target ECU are consistent with those in the instruction database; if they are inconsistent, stopping the flashing; if no corrections to the communication protocol and the flash instruction configuration file of the target ECU are received, downloading the communication protocol and the flash instruction configuration file of the target ECU from the instruction database.
[0180] The present invention provides a vehicle controller flashing method, the method comprising: parsing the configuration information of the target ECU according to the configuration file of the target ECU; wherein the configuration information includes the address and size of the data storage area of the target ECU; parsing the file to be flashed according to the address and size of the ECU data storage area, and generating a binary bin file of the target ECU; parsing the flashing instruction set of the target ECU according to the communication protocol and the flashing instruction configuration file of the target ECU; encapsulating the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU. The controller flashing method supports controller flashing of multiple communication protocols, supports flashing of multiple different types of controllers, and supports multiple CAN hardware devices, has strong applicability, and high efficiency in flashing controllers.
[0181] Embodiment three:
[0182] The third embodiment of the present application provides a vehicle controller flashing device, which is described in detail below in conjunction with the accompanying drawings.
[0183] See also Figure 8 , which is a schematic diagram of a vehicle controller flashing device provided in an embodiment of the present application.
[0184] The vehicle controller flashing device comprises the flashing system 801 described in any one of the first embodiments; the device further comprises a controller 802 to be flashed.
[0185] The flashing system 801 is used to flash the controller to be flashed 802 .
[0186] The present invention provides a vehicle controller flashing device, comprising a flashing system 801 as described in any one of the first embodiments; the device further comprises a controller to be flashed 802; the flashing system 801 is used to flash the controller to be flashed 802. The controller flashing device supports flashing of controllers of multiple communication protocols, supports flashing of multiple different types of controllers, and supports multiple CAN hardware devices, has strong applicability, and high efficiency in flashing controllers.
[0187] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A vehicle controller flashing system, It is characterized in that include: Electronic control unit ECU information processing module, flash file processing module, instruction recognition module and message generation module; The ECU information processing module is used to parse the configuration information of the target ECU according to the configuration file of the target ECU; wherein the configuration information includes the address and size of the data storage area of the target ECU; The flash file processing module is used to parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU; The instruction recognition module is used to parse out the flash instruction set of the target ECU according to the communication protocol and the flash instruction configuration file of the target ECU; The message generation module is used to encapsulate the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU; The system also includes an input module, a display and an ECU information management module; The input module is used to input the configuration file of the target ECU; The ECU information management module is used to update the ECU configuration file database according to the configuration file of the target ECU; and is also used to determine whether the configuration file of the target ECU is consistent with the configuration file in the ECU configuration file database before flashing the target ECU; if not, stop flashing; The display is also used to display abnormal information if there is inconsistency, so as to prompt the correctness of the configuration file of the target ECU input; The ECU information management module is further configured to download the configuration file of the target ECU from the ECU configuration file database if there is inconsistency and the information for correcting the configuration file of the target ECU input by the input module is not received; Wherein, the target ECU includes a first ECU and a second ECU; The ECU information processing module is used to parse out the first address and the first size of the data storage area of the first ECU and the second address and the second size of the data storage area of the second ECU according to the configuration files of the first ECU and the second ECU, and save them into an array; The flash file processing module is used to generate a first bin file of the first ECU according to the first address and the first size obtained from the array, and to generate a second bin file of the second ECU according to the second address and the second size obtained from the array.
2. The system according to claim 1, It is characterized in that The system also includes: a message sending module; The message sending module is used to determine the drive interface and communication protocol of the controller area network (CAN) device, and send the message data to the CAN hard line to facilitate the transmission of the message data.
3. The system according to claim 2, It is characterized in that The system also includes a CAN device initialization module; The input module is also used to input target CAN device information; The CAN device initialization module is used to initialize the driver of the target CAN device based on the target CAN device information.
4. The system according to claim 3, It is characterized in that The display is also used to display the configuration information of the target ECU; The input module is also used to correct the configuration information of the target ECU.
5. The system according to claim 3, It is characterized in that The system also includes a flash file management module; The flash file management module is used to upload the file to be flashed to the flash file database after the target ECU is successfully flashed; and is also used to download the file to be flashed from the flash file database.
6. The system according to claim 3, It is characterized in that The system also includes an instruction management module; The input module is also used to input the communication protocol and flashing instruction configuration file of the target ECU; The instruction management module is used to update the instruction database according to the communication protocol and the flash instruction configuration file of the target ECU; and is also used to determine whether the communication protocol and the flash instruction configuration file of the target ECU are consistent with those in the instruction database before flashing the target ECU; if they are inconsistent, the flashing is stopped; The display is also used to display abnormal information if there is any inconsistency, so as to prompt the correctness of the communication protocol and the flashing instruction configuration file of the target ECU; The instruction management module is used to download the communication protocol and the flashing instruction configuration file of the target ECU from the instruction database if there is inconsistency and the communication protocol and the flashing instruction configuration file of the target ECU input by the input module are not received.
7. A vehicle controller flashing method, It is characterized in that Applied to a vehicle controller flashing system, the method comprises: Update the ECU configuration file database according to the configuration file of the target ECU; Before flashing the target ECU, determine whether the configuration file of the target ECU is consistent with that in the ECU configuration file database; if they are inconsistent, stop flashing; If there is inconsistency and no information for correcting the configuration file of the target ECU is received, downloading the configuration file of the target ECU from the ECU configuration file database; According to the configuration file of the target ECU, the configuration information of the target ECU is parsed; wherein the configuration information includes the address and size of the data storage area of the target ECU; Parse the file to be flashed according to the address and size of the ECU data storage area, and generate a binary bin file of the target ECU; Parsing the flashing instruction set of the target ECU according to the communication protocol and the flashing instruction configuration file of the target ECU; Encapsulating the configuration information of the target ECU, the bin file of the target ECU and the flashing instruction set into message data; wherein the message data is used to flash the target ECU; Wherein, the target ECU includes a first ECU and a second ECU; The step of parsing the configuration information of the target ECU according to the configuration file of the target ECU includes: According to the configuration files of the first ECU and the second ECU, a first address and a first size of the data storage area of the first ECU and a second address and a second size of the data storage area of the second ECU are parsed; and the first address and the first size of the data storage area of the second ECU are saved in an array; The step of parsing the file to be flashed according to the address and size of the ECU data storage area and generating a binary bin file of the target ECU includes: A first bin file of the first ECU is generated according to the first address and the first size obtained from the array, and a second bin file of the second ECU is generated according to the second address and the second size obtained from the array.
8. The method according to claim 7, It is characterized in that The method further comprises: Determine the drive interface and communication protocol of the controller area network (CAN) device, and send the message data to the CAN hard line to facilitate the transmission of the message data.
9. The method according to claim 8, It is characterized in that The method further comprises: Get the target CAN device information; Based on the target CAN device information, a driver of the target CAN device is initialized.
10. The method according to claim 9, It is characterized in that The method further comprises: Displaying configuration information of the target ECU; The configuration information of the target ECU is modified.
11. The method according to claim 9, It is characterized in that The method further comprises: After the target ECU is successfully flashed, the file to be flashed is uploaded to a flash file database, or; Before flashing the target ECU, the file to be flashed is downloaded from the flashing file database.
12. The method according to claim 9, It is characterized in that The method further comprises: Updating the instruction database according to the communication protocol and the flash instruction configuration file of the target ECU; Before flashing the target ECU, determine whether the communication protocol and flashing instruction configuration file of the target ECU are consistent with those in the instruction database; if they are inconsistent, stop flashing; If they are inconsistent and the communication protocol and the flashing instruction configuration file for correcting the target ECU are not received, the communication protocol and the flashing instruction configuration file for the target ECU are downloaded from the instruction database.
13. A vehicle controller flashing device, It is characterized in that It comprises the flash writing system as described in any one of claims 1 to 6; the device further comprises a controller to be flashed; The flashing system is used to flash the controller to be flashed.
