Combined compiling and flashing method, device and equipment of vehicle control unit and storage medium

Through the joint compilation and writing method of vehicle controllers, software and hardware requirements matching and automated writing are realized, solving the problem of poor adaptability of different controllers and improving development efficiency and reliability.

CN120407005APending Publication Date: 2025-08-01FAW JIEFANG AUTOMOTIVE CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510474092.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing vehicle controller flashing method cannot be adapted to different controllers, resulting in the development process taking time, error-prone, poor flexibility and robustness, and the convenience of the application layer cannot be taken into account.

Method used

It provides a joint compilation and flashing method for vehicle controllers, through automatic data type change, automatic configuration and simulation error checking tools, combined with communication configuration and flashing package generation, to realize software and hardware matching and automated flashing process.

Benefits of technology

It improves development flexibility and robustness, reduces the cost of human configuration time, reduces the probability of errors, has automated one-click operation, and adapts to the needs of different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407005A_ABST
    Figure CN120407005A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle control unit combined compiling and flashing method, device and equipment and a storage medium, and belongs to the technical field of vehicles. On one hand, communication of controller hardware is configured in application layer software, a sleep mechanism is awakened, the development flexibility can be enhanced, and requirements of different scenes can be met; and on the other hand, on the basis of automatic matching tools such as an automatic simulation debugging tool, a data type automatic configuration tool and a data type automatic change tool, change can be carried out according to project requirements, the robustness is good, the time cost consumed by manual configuration can be reduced, and the probability of occurrence of configuration errors can be reduced. The invention provides a set of vehicle control unit flashing process method which can adapt to different scene requirements and complete software and hardware demand degree matching and setting in an application layer, the method has an automation attribute, the whole set of tool can realize one-key fool operation, technical background and requirements are not needed, the inheritability is high, the tool is convenient to spread and use, and the method is suitable for popularization and application. And the software development period is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of vehicles, and in particular, to a method, device, equipment and storage medium for joint compilation and flashing of a vehicle controller. Background Art

[0002] In a vehicle, the vehicle controller, regarded as the "brain" of the vehicle, is mainly responsible for coordinating and monitoring the operating state and behavior of the vehicle, and is crucial for the vehicle.

[0003] Currently, for newly developed functions of the vehicle and the embodiment of function optimization data, flashing of the controller needs to be performed. Different controller manufacturers have inconsistent adaptability and requirements for the development software, which leads to a large amount of time consumption in the manual matching process of software and hardware in the early stage of the project, is error-prone, and has poor development flexibility, scenario universality and robustness. This not only prolongs the vehicle development process, but also wastes a great deal of energy and financial resources of the vehicle factory. At the same time, the existing controller flashing methods are either limited to a single type of controller and cannot be adapted to the flashing of other controllers, or focus on the bottom layer of the controller and are difficult to take into account the convenience of the application layer. Summary of the Invention

[0004] The embodiments of the present invention provide a method, device, equipment and storage medium for joint compilation and flashing of a vehicle controller, so as to at least develop a vehicle controller flashing process method that can be adapted to different scenario requirements and complete the matching and setting of software and hardware requirements at the application layer, reduce the time cost of manual configuration, reduce the occurrence probability of configuration errors, and enhance development flexibility and robustness.

[0005] In a first aspect, the embodiments of the present invention provide a method for joint compilation and flashing of a vehicle controller, which at least includes the following steps:

[0006] Open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model;

[0007] Run the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model, so that the development model matches the data type requirements of the controller;

[0008] Run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message is reported to the developer. If there is no error in the configuration, at least generate a compilation folder of the development model, which at least includes a compilation file and an A2L file;

[0009] When the joint compilation and flashing method of the vehicle controller is executed for the first time or the configuration of the controller is changed, run the communication configuration tool to perform determination and configuration operations on at least the communication and sleep / wake-up mechanism of the controller;

[0010] If the Hex file does not exist, run the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file; if the Hex file already exists, run the Hex file format configuration tool to perform an alignment operation on the Hex file;

[0011] Run the flashing package generation tool in the application layer to generate a program flashing package that includes at least the Hex file, the A2L file, the controller handshake protocol, and the calibration file;

[0012] Run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start formal flashing until the flashing is successful.

[0013] Optionally, after running the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller, it further includes:

[0014] Run the software cache compilation management tool in the application layer to identify the sub-models in the development model that have not been changed and retain the cache files of each sub-model, and delete the cache records of the sub-models in the development model that have been changed.

[0015] Optionally, after running the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model, if there is an error in the configuration, report an error to the developer until the correctness detection passes, and if there is no error in the configuration, at least generate a compilation folder of the development model that includes at least the compilation file and the A2L file, it further includes:

[0016] Run the compilation file integration and modification tool in the application layer to obtain the header files representing software functions by traversing the compilation folder, modify the statements of the header files, and then transfer the modified header files to the controller project path.

[0017] Optionally, after running the flashing tool and sending a flashing request to the controller, and starting formal flashing with the flashing tool after receiving the positive response from the controller until the flashing is successful, it further includes:

[0018] Run the software backup tool in the application layer, and at least through the copying and path transfer of the files in the compilation folder, realize the backup of the compilation folder corresponding to the development model after successful flashing.

[0019] Optionally, before running the flashing package generation tool in the application layer to generate a program flashing package that at least includes the Hex file, the A2L file, the controller handshake protocol, and the calibration file, it further includes:

[0020] Run the A2L address replacement tool to fill the controller address in the A2L file containing empty addresses;

[0021] Run the software APP occupancy space calculation tool in the application layer to calculate the APP size according to the proportion of each software partition in the generated or aligned Hex file. If the APP size exceeds the memory space limit of the corresponding controller, notify the developer.

[0022] In a second aspect, an embodiment of the present invention further provides a vehicle controller joint compilation and flashing device, which at least includes:

[0023] A type change module for opening the development model and running the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model;

[0024] An attribute change module for running the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller;

[0025] A correctness detection module for running the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configurations of the development model. If there is an error in the configuration, report an error prompt to the developer. If there is no error in the configuration, at least generate a compilation folder of the development model that at least includes the compilation file and the A2L file;

[0026] A controller configuration module for running the communication configuration tool to at least determine and configure the communication and sleep / wake-up mechanism of the controller when the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes;

[0027] A Hex file processing module for running the project compilation tool to at least write the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file when the Hex file does not exist; when the Hex file already exists, run the Hex file format configuration tool to perform an alignment operation on the Hex file;

[0028] The programming package generation module is used to run the programming package generation tool in the application layer to generate a program programming package that at least includes the Hex file, the A2L file, the controller handshake protocol, and the calibration file.

[0029] The controller programming module is used to run the programming tool and send a programming request to the controller. After receiving the positive response from the controller, it starts the formal programming using the programming tool until the programming is successful.

[0030] Optionally, it further includes:

[0031] The cache management module is used to run the software cache compilation management tool in the application layer to identify the sub-models that have not been changed in the development model and retain the cache files of each sub-model, and delete the cache records of the sub-models that have been changed in the development model.

[0032] Optionally, it further includes:

[0033] The header file processing module is used to run the compilation file integration and modification tool in the application layer, obtain the header files representing the software functions by traversing the compilation folder, modify the statements of the header files, and then transfer the modified header files to the controller project path.

[0034] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the vehicle controller joint compilation and programming method described in the first aspect are run.

[0035] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps in the vehicle controller joint compilation and programming method described in the first aspect are implemented.

[0036] For the technical solution provided by the embodiment of the present invention, first, open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model; further, run the data type automatic configuration tool in the application layer to re - apply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller; further, run the automatic simulation error - checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message will be reported to the developer. If there is no error in the configuration, at least a compilation folder of the development model, including at least the compilation file and the A2L file, will be generated; further, when the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to perform determination and configuration operations on at least the communication and sleep - wake - up mechanism of the controller; further, when the Hex file does not exist, run the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file. When the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file; further, run the flashing package generation tool in the application layer to generate a program flashing package including at least the Hex file, the A2L file, the controller handshake protocol, and the calibration file; further, run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, start the formal flashing using the flashing tool until the flashing is successful.

[0037] It can be seen that, on the one hand, by configuring the communication and wake - up / sleep mechanism of the controller hardware in the application - layer software in the embodiment of the present invention, the development flexibility can be enhanced to meet the needs of different scenarios; on the other hand, based on automated matching tools such as the automatic simulation error - checking tool, the data type automatic configuration tool, the data type automatic change tool, and the flashing package generation tool in the embodiment of the present invention, changes can be made according to project needs, with good robustness, and it can reduce the time cost consumed by manual configuration and lower the probability of configuration errors. The embodiment of the present invention provides a vehicle controller flashing process method that can adapt to the requirements of different scenarios and complete the matching and setting of software and hardware requirements in the application layer. It has the attribute of automation. The whole set of tools can achieve one - key fool - proof operation, without technical background and requirements, with high inheritance, facilitating the dissemination and use of the tools, and helping to shorten the software development cycle. Brief Description of the Drawings

[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0039] Figure 1 It is a flowchart of a method for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention;

[0040] Figure 2 It is a flowchart of another method for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention;

[0041] Figure 3 It is a flowchart of yet another method for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention;

[0042] Figure 4 It is a schematic structural diagram of a device for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention;

[0043] Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Specific Embodiments

[0044] In order to make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the present application in detail with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0045] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms of "a", "the", and "said" used in the embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. "Plural" generally includes at least two.

[0046] It should be understood that the term " / and / " used herein is only a description of the associated relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0047] It should be understood that although terms such as first, second, and third may be used in the embodiments of the present application for description, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.

[0048] Depending on the context, the words "if", "when" as used herein can be interpreted as "when...", "when...", "in response to determining", or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" can be interpreted as "when determined", "in response to determining", "when detected (stated condition or event)", or "in response to detecting (stated condition or event)".

[0049] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the commodity or device comprising said element.

[0050] It should be particularly noted that symbols and / or numbers present in the specification that are not marked in the drawings description are not drawing reference numerals.

[0051] Figure 1 is a flowchart of a method for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention. This embodiment is at least applicable to the scenario of compilation and flashing of a vehicle controller. The method for joint compilation and flashing of the vehicle controller can be, but is not limited to, executed by the device for joint compilation and flashing of the vehicle controller in the embodiments of the present invention as the execution subject, and the execution subject can be implemented in software and / or hardware. As Figure 1 shown, the method for joint compilation and flashing of the vehicle controller at least includes the following steps:

[0052] S1. Open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model.

[0053] Among them, the development model can correspond to the vehicle controller, which can be composed of multiple sub-models, and each sub-model corresponds to the control function of each component controller under the vehicle controller. The sub-models can be, for example, a warm air sub-model, an air conditioner sub-model, a drive sub-model, a brake sub-model, a thermal management sub-model, an energy absorption sub-model, etc.

[0054] S2. Run the data type automatic configuration tool in the application layer to reapply the modified data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller.

[0055] The aforementioned steps S1 and S2 essentially involve hardware-defined data type matching.

[0056] For the existing development model, in order to realize the subsequent real vehicle calibration and variable observation, and also to save hardware resource space and maximize the use of space, the variable data of the software needs to be changed to match the variable matching required by the hardware. Steps S1 and S2 use the data type automatic change tool in the application layer automatic matching toolbox (the automatic matching toolbox can be composed of automatic simulation error checking tools, data type automatic configuration tools, data type automatic change tools, software cache compilation management tools, compilation file integration and modification tools, software APP space occupied calculation tools, flash package generation tools, software backup tools, etc., tools not mentioned in this embodiment or implementation method, which will be described in detail later) to realize the global type change of the data set, and then use the data type automatic configuration tool to realize the automatic association of the data set with the application layer software.

[0057] S3. Run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error prompt will be reported to the developer. If there is no error in the configuration, at least a compilation folder containing at least the compilation file and the A2L file of the development model will be generated.

[0058] The aforementioned step S3 essentially involves checking the correctness of the software environment configuration.

[0059] In a specific implementation, an automatic simulation error checking tool can be used in the development software to run the compiled software. The development software will match and verify the software's operating environment, parameter configuration, and interface type according to the controller's required configuration; if there is no problem, the software's compiled file and A2L file will be generated; if there is a problem, the automatic simulation error checking tool will capture the software error prompt and notify the software developer through email, prompt tone, etc. to modify and test the developed software functions to meet the dual environment configuration requirements of the modeling software and controller hardware, and then re-execute the software correctness monitoring until the software is normal and error-free.

[0060] S4. When the vehicle controller joint compilation flashing method is executed for the first time or the controller configuration is changed, run the communication configuration tool to at least determine and configure the controller's communication and sleep / wake-up mechanisms.

[0061] The aforementioned step S4 essentially involves flashing the controller engineering configuration.

[0062] In another specific embodiment, the communication configuration tool in the flashing tool chain (the flashing tool chain may be composed of an engineering compilation tool, an A2L address replacement tool, a communication configuration tool, a Hex file format configuration tool, a flashing tool, etc., and tools not mentioned in this embodiment or implementation manner will be described in detail later) can be run to determine the Controller Area Network (CAN) communication, Local Interconnect Network (LIN) communication, and sleep wake-up mechanism of the controller. It can be understood that this step generally only needs to be executed when the controller is first configured, and this step can be skipped if there is no controller change subsequently.

[0063] S5. If the Hex file does not exist, run the engineering compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the engineering compilation file and generate a Hex file; if the Hex file already exists, run the Hex file format configuration tool to perform an alignment operation on the Hex file.

[0064] Among them, the aforementioned step S5 essentially involves the engineering compilation of the controller flashing and the matching of the Hex file format.

[0065] In yet another specific embodiment, when the Hex file does not exist, the project can be compiled through the controller compilation software, and the software information and communication configuration are written into the project compilation file to generate a Hex file; when the Hex file exists, the Hex file, as the configuration and data set of the software, needs to meet the format requirements of the controller to be recognized, so an alignment operation needs to be performed on the Hex.

[0066] S6. Run the flashing package generation tool in the application layer to generate a program flashing package that includes at least a Hex file, an A2L file, a controller handshake protocol, and a calibration file.

[0067] Among them, the aforementioned step S6 is essentially to match the flashing mechanism of the controller, perform compression and path transfer operations on the above files (i.e., the Hex file, the A2L file, the controller handshake protocol, and the calibration file), and finally generate a flashed compressed package, which is the program flashing package.

[0068] S7. Run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start the formal flashing until the flashing is successful.

[0069] Among them, the aforementioned step S7 essentially involves flashing the compressed package. Specifically, the host computer can be used to perform embedded flashing on the program. The flashing tool will send a flashing request to the controller. After receiving the positive response from the controller, the flashing tool starts the formal flashing until the flashing is successful.

[0070] For the technical solution provided in this embodiment, first, open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model; further, run the data type automatic configuration tool in the application layer to re - apply the changed data dictionary to the development model and perform attribute changes on the variables in the development model, so that the development model matches the data type requirements of the controller; further, run the automatic simulation error - checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message will be reported to the developer. If there is no error in the configuration, at least a compilation folder of the development model, which at least includes compilation files and A2L files, will be generated; further, when the vehicle controller joint compilation flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to at least determine and configure the communication and sleep - wake - up mechanism of the controller; further, when the Hex file does not exist, run the project compilation tool to at least write the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file. When the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file; further, run the flashing package generation tool in the application layer to generate a program flashing package that at least includes the Hex file, A2L file, controller handshake protocol, and calibration file; finally, run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start the formal flashing until the flashing is successful.

[0071] Thus, on the one hand, by configuring the communication and wake - up / sleep mechanism of the controller hardware in the application layer software in this embodiment, the development flexibility can be enhanced to meet the needs of different scenarios; on the other hand, based on automated matching tools such as the automatic simulation error - checking tool, data type automatic configuration tool, data type automatic change tool, and flashing package generation tool in this embodiment, changes can be made according to project needs, with good robustness, and it can reduce the time cost consumed by manual configuration and reduce the probability of configuration errors. This embodiment provides a vehicle controller flashing process method that can adapt to different scenario requirements and complete the matching and setting of software and hardware requirements in the application layer. It has an automated property, and the whole set of tools can achieve one - key fool - proof operation, without technical background and requirements, with high inheritance, facilitating the dissemination and use of the tools, and helping to shorten the software development cycle.

[0072] It should be noted that the tools in the automated matching toolbox and the flashing tool chain involved in this embodiment or implementation can be obtained through Matlab software.

[0073] Based on the above embodiment or implementation, Figure 2 is a flowchart of another method for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention. Figure 3 is a flowchart of yet another method for joint compilation and flashing of a vehicle controller provided by an embodiment of the present invention. This embodiment is an addition based on the above embodiment.

[0074] As Figure 2 shown, the method for joint compilation and flashing of the vehicle controller at least includes the following steps:

[0075] S1. Open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model (equivalent to Figure 3 the "automatic data type change" step in

[0076] S2. Run the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model, so that the development model matches the data type requirements of the controller (equivalent to Figure 3 the "automatic data type configuration" step in

[0077] S8. Run the software cache compilation management tool in the application layer to identify the sub-models in the development model that have not been changed and retain the cache files of each sub-model, and delete the cache records of the sub-models in the development model that have been changed (equivalent to Figure 3 the "delete application layer cache compilation folder" step in

[0078] Among them, the aforementioned step S8 essentially involves software cache and compilation file management.

[0079] Specifically, through the software cache compilation management tool in the application layer automated matching toolbox, the sub-software models and data sets in the software that have not been involved in changes can be automatically identified, and their cache files are retained. These cache files can ensure that the sub-models will not be recompiled repeatedly during subsequent compilation, which can save the time of the entire compilation process. For the models that have changed, deleting their previous cache records can prevent the development software from reporting an error due to the mismatch between the existing software and the cached software.

[0080] S3. Run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, report an error to the developer. If there is no error in the configuration, at least generate a compilation folder for the development model that contains at least the compilation files and A2L files (equivalent to Figure 3 the steps of "model simulation compilation", "judging whether the compilation is normal", "collecting model error information", "mail or sound notification", and "model correction" in

[0081] S9. Run the compilation file integration and modification tool in the application layer. By traversing the compilation folder, obtain the header files representing software functions, modify the statements of the header files, and then transfer the modified header files to the controller project path (equivalent to Figure 3 the step of "compilation file integration and modification" in

[0082] Among them, the compilation file integration and modification tool can be run to traverse the compilation folder in step S3, obtain the c and h file header files representing software functions therein, modify the statements to meet the needs of pre-compilation, and at the same time transfer these two types of modified files to the controller project path.

[0083] S4. When the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to perform at least determination and configuration operations on the communication and sleep / wake-up mechanism of the controller (equivalent to Figure 3 the steps of "CAN and LIN communication configuration" and "sleep / wake-up configuration" in

[0084] S5. If the Hex file does not exist, run the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file. If the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file (equivalent to Figure 3 the steps of "flashing project compilation" and "Hex file format reset" in

[0085] S11. Run the A2L address replacement tool to fill the controller address in the A2L file containing empty addresses (equivalent to Figure 3 the step of "A2L address replacement" in

[0086] Among them, in order to realize the visualization variables of the controller, it is necessary to assign addresses to software variables. The specific step S11 can be to fill the controller address in the A2L file containing empty addresses in step S3 to clarify the mapping relationship between the address and the variable.

[0087] S12. Run the software APP space calculation tool in the application layer to calculate the size of the APP based on the proportion of each software partition in the generated or aligned Hex file. If the size of the APP exceeds the memory space limit of the corresponding controller, notify the developer (equivalent to Figure 3 the steps of "determining the size of software APP", "judging whether the APP size reaches the hardware limit", and "alarming, indicating that the hardware space is insufficient and the controller cannot meet the requirements" in

[0088] Among them, the internal space of the controller is limited. To avoid software bloat and reaching the controller memory upper limit, it is necessary to accumulate and calculate the software APP sizes of each partition shown in the Hex file and compare them with the memory space limit value. In a specific implementation, if the APP size reaches 85% of the controller memory upper limit, the developer will be notified; if the APP size is lower than 85% of the controller memory upper limit, step S6 can be executed.

[0089] S6. Run the flashing package generation tool in the application layer to generate a program flashing package that includes at least the Hex file, A2L file, controller handshake protocol, and calibration file (equivalent to Figure 3 the step of "generating the flashing package" in

[0090] S7. Run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, start the formal flashing using the flashing tool until the flashing is successful (equivalent to Figure 3 the step of "program flashing" in

[0091] S10. Run the software backup tool in the application layer to back up the compilation folder corresponding to the development model after successful flashing, at least by copying and transferring the files in the compilation folder (equivalent to Figure 3 the step of "software automatic backup" in

[0092] Among them, the fact that the software can be flashed proves that the developed software is normally available. To implement software version management, it is necessary to back up and manage the currently flashed software. At least, files in the existing folder can be copied and transferred, and the top-level folder can be renamed and the suffix can be added with time description for differentiation.

[0093] For the technical solution provided in this embodiment, first, open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model; further, run the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller; further, run the software cache compilation management tool in the application layer to identify the sub-models in the development model that have not been changed and retain the cache files of each sub-model, and delete the cache records of the sub-models in the development model that have been changed; further, run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message will be reported to the developer. If there is no error in the configuration, at least a compilation folder of the development model containing at least the compilation file and the A2L file will be generated; further, run the compilation file integration and modification tool in the application layer to obtain the header file representing the software function by traversing the compilation folder, modify the statements in the header file, and then transfer the modified header file to the controller project path; further, when the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to perform determination and configuration operations on at least the communication and sleep / wake-up mechanism of the controller; further, when the Hex file does not exist, run the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file. When the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file; further, run the A2L address replacement tool to fill the controller address in the A2L file containing null addresses; further, run the software APP space occupancy calculation tool in the application layer to calculate the APP size according to the proportion of each software partition in the generated or aligned Hex file. If the APP size exceeds the memory space limit of the corresponding controller, the developer will be notified; further, run the flashing package generation tool in the application layer to generate a program flashing package containing at least the Hex file, the A2L file, the controller handshake protocol, and the calibration file; further, run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start the formal flashing until the flashing is successful; finally, run the software backup tool in the application layer to implement the backup of the compilation folder corresponding to the development model after successful flashing, at least through the copying and path transfer of the files in the compilation folder.

[0094] It can be seen that on the one hand, in this embodiment, by configuring the communication and wake-up / sleep mechanisms of the controller hardware in the application layer software, the development flexibility can be enhanced to meet the needs of different scenarios. On the other hand, based on automated matching tools such as an automatic simulation error-checking tool, a data type automatic configuration tool, a data type automatic change tool, and a flashing package generation tool, this embodiment can be changed according to project needs, has good robustness, can reduce the time cost consumed by manual configuration, and reduce the occurrence probability of configuration errors. On the other hand, this embodiment also adds a software and hardware warning mechanism, which gives prompts to developers whether it is a software problem itself or a problem that the flashing APP exceeds the applicable space limit. This embodiment provides a vehicle controller flashing process method that can adapt to the requirements of different scenarios and complete the matching and setting of software and hardware requirements in the application layer. It has an automated property, and the entire set of tools can achieve one-key foolproof operation, without technical background and requirements, has high inheritance, is convenient for the dissemination and use of the tools, and helps to shorten the software development cycle.

[0095] It should be noted that Figures 1 - 3 the execution order of the steps shown above is only for illustrative purposes. Developers can adjust the execution steps according to the actual situation of the project, and the present invention does not make any limitations in this regard.

[0096] Figure 4 is a schematic structural diagram of a vehicle controller joint compilation and flashing device provided by an embodiment of the present invention. This embodiment is at least applicable to the compilation and flashing scenario of a vehicle controller, and the vehicle controller joint compilation and flashing device can be implemented in software and / or hardware. As Figure 4 shown, the vehicle controller joint compilation and flashing device at least includes:

[0097] A type change module, configured to open a development model and run a data type automatic change tool in the application layer to perform type changes on a data dictionary associated with the development model;

[0098] An attribute change module, configured to run a data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on variables in the development model, so that the development model matches the data type requirements of the controller;

[0099] A correctness detection module, configured to run an automatic simulation error-checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, it reports an error to the developer for prompt. If there is no error in the configuration, it generates at least a compilation folder of the development model, which at least includes a compilation file and an A2L file;

[0100] A controller configuration module, which is used to run a communication configuration tool when the joint compilation and flashing method of the vehicle controller is executed for the first time or when the configuration of the controller changes, so as to perform determination and configuration operations on at least the communication of the controller and the sleep / wake-up mechanism;

[0101] A Hex file processing module, which is used to run an engineering compilation tool when the Hex file does not exist, so as to write at least the software information in the compilation folder and the communication configuration of the controller into the engineering compilation file and generate a Hex file; when the Hex file already exists, run a Hex file format configuration tool to perform an alignment operation on the Hex file;

[0102] A flashing package generation module, which is used to run a flashing package generation tool in the application layer to generate a program flashing package that at least includes a Hex file, an A2L file, a controller handshake protocol, and a calibration file;

[0103] A controller flashing module, which is used to run a flashing tool and send a flashing request to the controller. After receiving a positive response from the controller, start formal flashing using the flashing tool until the flashing is successful.

[0104] Optionally, it further includes:

[0105] A cache management module, which is used to run a software cache compilation management tool in the application layer to identify sub-models that have not changed in the development model and retain the cache files of each sub-model, and delete the cache records of sub-models that have changed in the development model.

[0106] Optionally, it further includes:

[0107] A header file processing module, which is used to run a compilation file integration and modification tool in the application layer, obtain header files representing software functions by traversing the compilation folder, modify the statements of the header files, and then transfer the modified header files to the controller project path.

[0108] Optionally, it further includes:

[0109] A software backup module, which is used to run a software backup tool in the application layer to implement the backup of the compilation folder corresponding to the development model after successful flashing at least through the copying and path transfer of files in the compilation folder.

[0110] Optionally, it further includes:

[0111] An address replacement module, which is used to run an A2L address replacement tool to fill the controller address in the A2L file containing null addresses;

[0112] The APP size calculation module is used to run the software APP occupancy space calculation tool in the application layer to calculate the APP size according to the proportion of each software partition in the generated or aligned Hex file. If the APP size exceeds the memory space limit of the corresponding controller, the developer will be notified.

[0113] For the technical solution provided in this embodiment, first, the type change module opens the development model and runs the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model. Further, the attribute change module runs the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model, so that the development model matches the data type requirements of the controller. Further, the correctness detection module runs the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message will be sent to the developer. If there is no error in the configuration, at least a compilation folder of the development model, including at least the compilation file and the A2L file, will be generated. Further, when the vehicle controller joint compilation and flashing method is executed for the first time or the configuration of the controller changes, the controller configuration module runs the communication configuration tool to perform determination and configuration operations on at least the communication and sleep / wake-up mechanism of the controller. Further, when the Hex file does not exist, the Hex file processing module runs the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file. When the Hex file already exists, the Hex file processing module runs the Hex file format configuration tool to perform alignment operations on the Hex file. Further, the flashing package generation module runs the flashing package generation tool in the application layer to generate a program flashing package including at least the Hex file, the A2L file, the controller handshake protocol, and the calibration file. Finally, the controller flashing module runs the flashing tool and sends a flashing request to the controller. After receiving the positive response from the controller, the flashing tool starts the formal flashing until the flashing is successful.

[0114] It can be seen that, on the one hand, in this embodiment, by configuring the communication and wake-up / sleep mechanisms of the controller hardware in the application layer software, the development flexibility can be enhanced to meet the needs of different scenarios; on the other hand, based on automated matching tools such as the automatic simulation error checking tool, the data type automatic configuration tool, the data type automatic change tool, and the flashing package generation tool, this embodiment can be changed according to the project needs, has good robustness, can reduce the time cost consumed by manual configuration, and reduce the probability of configuration errors. This embodiment provides a vehicle controller flashing process method that can adapt to the requirements of different scenarios and complete the matching and setting of software and hardware requirements in the application layer. It has automation attributes, and the whole set of tools can achieve one-key fool operation, without technical background and requirements, has high inheritance, is convenient for the dissemination and use of the tools, and helps to shorten the software development cycle.

[0115] The embodiment of the present invention also provides an electronic device. Figure 5 It is a schematic structural diagram of an electronic device provided by the embodiment of the present invention. See Figure 5, the electronic device 1000 includes a processor 1001 and a memory 1002. The memory 1002 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 1001, the steps in any one of the above vehicle controller joint compilation and flashing methods are run. Through the above technical solution, the processor 1001 and the memory 1002 are interconnected and communicate with each other through a communication bus and / or other forms of connection mechanisms (not marked). The memory 1002 stores a computer program executable by the processor. When the electronic device 1000 runs, the processor 1001 executes the computer program to execute the vehicle controller joint compilation and flashing method in any optional implementation manner of the above embodiments, so as to at least implement the following functions: open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model; run the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model, so that the development model matches the data type requirements of the controller; run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message is reported to the developer. If there is no error in the configuration, at least a compilation folder of the development model, including at least a compilation file and an A2L file, is generated; when the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to at least perform determination and configuration operations on the communication and sleep / wake-up mechanism of the controller; if the Hex file does not exist, run the project compilation tool to at least write the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate a Hex file; if the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file; run the flashing package generation tool in the application layer to generate a program flashing package including at least a Hex file, an A2L file, a controller handshake protocol, and a calibration file; run the flashing tool and send a flashing request to the controller. After receiving a positive response from the controller, use the flashing tool to start formal flashing until the flashing is successful.

[0116] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the vehicle controller joint compilation and flashing method provided by all the inventive embodiments of the present application: Open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model; Run the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller; Run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, an error message is reported to the developer. If there is no error in the configuration, at least a compilation folder of the development model is generated, which at least includes compilation files and A2L files; When the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to perform determination and configuration operations on at least the communication and sleep / wake-up mechanism of the controller; If the Hex file does not exist, run the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file; If the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file; Run the flashing package generation tool in the application layer to generate a program flashing package that at least includes the Hex file, A2L file, controller handshake protocol, and calibration file; Run the flashing tool and send a flashing request to the controller. After receiving a positive response from the controller, use the flashing tool to start formal flashing until the flashing is successful.

[0117] One or more computer-readable media in any combination can be adopted. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.

[0118] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take many forms, including - but not limited to - electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0119] The program code contained on a computer-readable medium may be transmitted using any appropriate medium, including - but not limited to - wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0120] The computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages - such as Java, Smalltalk, C++ - and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or, alternatively, may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0121] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for joint compilation and flashing of a vehicle controller, characterized in that, At least include the following steps: Open the development model and run the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model; Run the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller; Run the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, report an error to the developer. If there is no error in the configuration, at least generate a compilation folder of the development model that at least includes compilation files and A2L files; When the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes, run the communication configuration tool to at least perform determination and configuration operations on the communication and sleep wake-up mechanisms of the controller; If the Hex file does not exist, run the project compilation tool to at least write the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file; if the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file; Run the flashing package generation tool in the application layer to generate a program flashing package that at least includes the Hex file, the A2L file, the controller handshake protocol, and the calibration file; Run the flashing tool and send a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start formal flashing until the flashing is successful.

2. The method for joint compilation and flashing of the vehicle controller according to claim 1, characterized in that, After running the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller, it further includes: Run the software cache compilation management tool in the application layer to identify the sub-models in the development model that have not been changed and retain the cache files of each sub-model, and delete the cache records of the sub-models in the development model that have been changed.

3. The method for combined compilation and flashing of the vehicle controller according to claim 1, characterized in that After running the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configuration of the development model. If there is an error in the configuration, report an error to the developer until the correctness detection passes. If there is no error in the configuration, at least generate a compilation folder of the development model that at least includes compilation files and A2L files, it further includes: Run the compilation file integration and modification tool in the application layer to obtain the header files representing software functions by traversing the compilation folder, and perform statement modification on the header files, and then transfer the modified header files to the controller project path.

4. The method for joint compilation and flashing of the vehicle controller according to claim 1, characterized in that After running the flashing tool and sending a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start formal flashing until the flashing is successful, it further includes: Run the software backup tool in the application layer to back up the compilation folder corresponding to the development model after successful flashing, at least by copying the files in the compilation folder and transferring the paths.

5. The method for joint compilation and flashing of the vehicle controller according to claim 1, wherein Before running the flashing package generation tool in the application layer to generate a program flashing package that includes at least the Hex file, the A2L file, the controller handshake protocol, and the calibration file, it further includes: Run the A2L address replacement tool to fill the controller address in the A2L file containing empty addresses. Run the software APP occupancy space calculation tool in the application layer to calculate the APP size based on the proportion of each software partition in the generated or aligned Hex file. If the APP size exceeds the memory space limit of the corresponding controller, notify the developer.

6. A vehicle controller combined compilation and flashing device, characterized in that It at least includes: A type change module for opening the development model and running the data type automatic change tool in the application layer to perform type changes on the data dictionary associated with the development model. An attribute change module for running the data type automatic configuration tool in the application layer to reapply the changed data dictionary to the development model and perform attribute changes on the variables in the development model so that the development model matches the data type requirements of the controller. A correctness detection module for running the automatic simulation error checking tool in the application layer to perform correctness detection on the software and hardware environment configurations of the development model. If there are errors in the configuration, report an error to the developer. If there are no errors in the configuration, at least generate a compilation folder of the development model that includes at least the compilation file and the A2L file. A controller configuration module for running the communication configuration tool to perform determination and configuration operations on at least the communication and sleep / wake-up mechanisms of the controller when the vehicle controller joint compilation and flashing method is executed for the first time or when the configuration of the controller changes. A Hex file processing module for running the project compilation tool to write at least the software information in the compilation folder and the communication configuration of the controller into the project compilation file and generate the Hex file when the Hex file does not exist. When the Hex file already exists, run the Hex file format configuration tool to perform alignment operations on the Hex file. A flashing package generation module for running the flashing package generation tool in the application layer to generate a program flashing package that includes at least the Hex file, the A2L file, the controller handshake protocol, and the calibration file. A controller flashing module for running the flashing tool and sending a flashing request to the controller. After receiving the positive response from the controller, use the flashing tool to start formal flashing until the flashing is successful.

7. The vehicle controller combined compilation and flashing device according to claim 6, characterized in that It further includes: A cache management module for running the software cache compilation management tool in the application layer to identify the sub-models in the development model that have not been changed and retain the cache files of each sub-model, and delete the cache records of the sub-models in the development model that have been changed.

8. The vehicle controller combined compilation and flashing device according to claim 6, characterized in that, It further includes: The header file processing module is used to run the compilation file integration and modification tool in the application layer, obtain the header files representing software functions by traversing the compilation folder, modify the statements of the header files, and then transfer the modified header files to the controller project path.

9. An electronic device, characterized in that, It includes a processor and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the vehicle controller joint compilation and flashing method according to any one of claims 1-5 are run.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the vehicle controller joint compilation and flashing method according to any one of claims 1-5.