Calibration file generation method and device, storage medium and electronic equipment

By obtaining and processing compiled files of multiple processing units, and generating target calibration files that match the target vehicle processor, the technical difficulties of A2L file generation in heterogeneous multi-core processors are solved, and unified calibration file generation and improvement of calibration is achieved. Document accuracy and efficiency.

CN119311648APending Publication Date: 2025-01-14FOSS (HANGZHOU) INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411440247.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The prior art cannot extract calibration/observation variables from files of different cores and different forms to generate a unified A2L file, making it difficult to generate standard A2L files during calibration of automotive electronic control unit (ECU).

Method used

By obtaining the compiled files matching multiple processing units, the initial variable objects are obtained respectively, and processing according to the organizational structure indicated by the target template file, a target calibration file matching the target vehicle processor is generated.

Benefits of technology

It realizes the generation of unified calibration files from heterogeneous multi-core processors, simplifies the generation process of A2L files, improves the accuracy and efficiency of calibration files, and avoids the redundant generation of multiple A2L files and variable address conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311648A_ABST
    Figure CN119311648A_ABST
Patent Text Reader

Abstract

The invention discloses a calibration file generation method and device, a storage medium and electronic equipment. The method comprises the steps that a plurality of compilation files matched with a plurality of processing units are obtained, the processing units are integrated on a target vehicle-mounted processor, and the compilation files are compilation products of project files of the processing units matched with the compilation files; respectively acquiring respective corresponding initial variable objects from the plurality of compiled files; according to a target organization structure indicated by the target template file, the multiple initial variable objects are processed, multiple target variable objects are obtained, and object organization structures of the target variable objects are matched with the target organization structure; and generating a target calibration file matched with the target vehicle-mounted processor according to the plurality of target variable objects. The technical problem that a unified calibration file cannot be generated for a heterogeneous multi-core processor in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of autonomous driving, and more specifically, to a method, device, storage medium, and electronic device for generating a calibration file. Background Art

[0002] A2L file is a text description file used in the calibration process of automotive electronic control units (ECUs). It follows the ASAM_MCD-2MC standard specification and defines the communication method and data exchange format between ECUs and external systems, such as vehicle components or diagnostic tools. In the software development phase, A2L files can be used as reference materials to ensure the compatibility of software and hardware, and can also be used in diagnostic tools to help technicians quickly locate and connect ECU-related problems. In the vehicle testing phase, automotive calibration engineers can import A2L files into calibration host computer tools for calibration, such as CANape, to set ECU parameters and modes, to collect ECU operating data for monitoring, and to calibrate specific variables in order to analyze and improve ECU performance to meet specific performance and safety standards. In general, automotive industry calibration engineers can use A2L files to effectively perform calibration observation, calibration and troubleshooting, improving the development efficiency and performance of automotive electronic systems.

[0003] In the development of the automotive industry, with the continuous improvement of the performance of vehicle processors, the use of Soc heterogeneous multi-core is also increasing. For example, the TAD4VM processor has 2 A72, 6 R5F, two C66, 5 C7X and other cores. Different cores run in different modes. Each core can run multiple processes. Each process can have scenarios that need to be calibrated or tested. Each scenario needs to generate an independent A2L file for calibration. However, it is very troublesome to generate an A2L file for each core, because the form and communication method of each core may be different. It is also a technical difficulty to generate a unified standard A2L corresponding to these different forms of files, including executable files on Linux, dynamic libraries on Linux, executable files of MCU, and entire packages of MCU. That is, the existing technology cannot extract calibration / observation variables from files of different forms of different cores to generate A2L files. Summary of the invention

[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for generating a calibration file, so as to at least solve the technical problem that the related technology cannot extract calibration / observation variables from files of different cores and different forms to generate an A2L file.

[0005] According to one aspect of an embodiment of the present application, a method for generating a calibration file is provided, including: obtaining multiple compiled files that match multiple processing units respectively, wherein the multiple processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the processing units that match them; obtaining respectively corresponding initial variable objects from the multiple compiled files; processing the multiple initial variable objects respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure; and generating a target calibration file that matches the target vehicle-mounted processor based on the multiple target variable objects.

[0006] According to another aspect of an embodiment of the present application, a calibration file generation device is also provided, including: a first acquisition unit, which acquires multiple compiled files that match multiple processing units respectively, wherein the multiple processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the processing units that match them; a second acquisition unit, which acquires respectively corresponding initial variable objects from the multiple compiled files; a processing unit, which processes the multiple initial variable objects respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure; and a generation unit, which generates a target calibration file that matches the target vehicle-mounted processor based on the multiple target variable objects.

[0007] As an optional solution, the device for generating the calibration file further includes: a third acquisition unit, used to acquire a current variable object to be processed from the multiple initial variable objects; acquiring current description information matching the current variable object according to a variable configuration file, wherein the variable configuration file records object identifiers of the multiple initial variable objects to be processed, and variable description information respectively matching the multiple initial variable objects; based on the target organizational structure indicated by the target template file, processing the current description information matching the current variable object and the variable parameter information of the current variable object to obtain the target variable object matching the current variable object, wherein the variable parameter information includes at least one of the following: a variable type and a first variable address.

[0008] As an optional solution, the above-mentioned third acquisition unit includes: a first determination module, used to obtain the second variable address from the above-mentioned variable description information, wherein the above-mentioned second variable address is used to indicate the processing unit identifier corresponding to the above-mentioned current variable object; write the above-mentioned second variable address into the target position indicated by the above-mentioned target organizational structure; determine the above-mentioned target variable object based on the above-mentioned second variable address that has been written.

[0009] As an optional scheme, the above-mentioned third acquisition unit includes: a fourth acquisition module, used to obtain the current format specification corresponding to the above-mentioned current variable object in the target template file, wherein the above-mentioned current format specification includes at least one of the following: calibration protocol specification, data structure specification, communication protocol specification; based on the above-mentioned current format specification, at least one description object in the above-mentioned current description information is combined with the above-mentioned variable parameter information to obtain the above-mentioned target variable object, wherein the above-mentioned description object includes a second variable address for indicating the processing unit identifier corresponding to the above-mentioned current variable object.

[0010] As an optional scheme, the above-mentioned third acquisition unit includes: a second determination module, used to obtain the processing unit core identifier, process identifier and library file identifier that match the reference variable object from the above-mentioned variable description information; write a first numerical value matching the above-mentioned processing unit core identifier in the first bit interval of the reference data of the target length, write a second numerical value matching the above-mentioned process identifier in the second bit interval of the above-mentioned reference data, and write a third numerical value matching the above-mentioned library file identifier in the third bit interval of the above-mentioned reference data; determine the second variable address matching the above-mentioned reference variable object according to the above-mentioned reference data.

[0011] As an optional solution, the third acquisition module further includes a fifth acquisition module, which is used to obtain an object identifier from the variable configuration file as the current object identifier, wherein the current object identifier is used to indicate the current variable object to be processed; when the current description information matching the current object identifier indicates that the current variable object is configured with a dependent library, parse the first compiled file and the second compiled file matching the current variable object under the target path, wherein the first compiled file is the compiled file of the object process matching the current variable object, and the second compiled file is the compiled file matching the dependent library of the object process; and obtain the current variable object from the first compiled file and the second compiled file.

[0012] As an optional solution, the above-mentioned device also includes: a sixth acquisition module, used to determine the variable type of the above-mentioned current variable object; when the above-mentioned current variable object is a basic variable type, obtain the variable address of the above-mentioned current variable object; when the above-mentioned current variable object is a structure variable type, determine the variable addresses of the member variables included in the above-mentioned current variable object in sequence; when the above-mentioned current variable object is an array variable type, determine the variable addresses of the array element variables included in the above-mentioned current variable object in sequence; when the above-mentioned current variable object is a pointer variable type, obtain the variable address of the associated variable object matching the above-mentioned current variable object, wherein the above-mentioned associated variable object is the variable object pointed to by the above-mentioned current variable object.

[0013] As an optional solution, the processing unit is further used to obtain a variable identifier in a configuration container used to edit the template file; in response to an editing operation received in the configuration container, adjust the template organization structure indicated by the variable identifier in the template file.

[0014] As an optional solution, the above-mentioned generation unit includes: a loading unit, used to load the above-mentioned target calibration file into the calibration software; establish a communication connection with the vehicle-mounted system through the above-mentioned calibration software; configure the calibration parameters of the above-mentioned target variable object based on the above-mentioned communication connection; determine the performance parameters of the above-mentioned vehicle-mounted system according to the above-mentioned calibration parameters; adjust the above-mentioned calibration parameters of the above-mentioned target variable object according to the above-mentioned performance parameters.

[0015] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for generating a calibration file as described above.

[0016] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the calibration file generation method through the computer program.

[0017] In the above-mentioned embodiment of the present application, a plurality of compiled files respectively matching a plurality of processing units are obtained, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the processing units matching therewith; respectively corresponding initial variable objects are obtained from the plurality of compiled files; the plurality of initial variable objects are respectively processed according to the target organizational structure indicated by the target template file to obtain a plurality of target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure; and a target calibration file matching the target vehicle-mounted processor is generated according to the plurality of target variable objects.

[0018] Through the above-mentioned implementation mode of the present application, multiple compilation files respectively matching multiple processing units are obtained, wherein the multiple processing units are integrated on a target vehicle-mounted processor, and the compilation files are compilation products of project files of the processing units matching therewith; respectively corresponding initial variable objects are obtained from the multiple compilation files, and then the multiple initial variable objects are respectively processed according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable object matches the target organizational structure, and then a target calibration file matching the target vehicle-mounted processor can be generated based on the multiple target variable objects, thereby solving the technical problem that the related technology cannot generate a unified calibration file for heterogeneous multi-core processors. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 is a schematic diagram of an application environment of an optional method for generating a calibration file according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of an optional method for generating a calibration file according to an embodiment of the present application;

[0022] Figure 3 is a schematic diagram of an optional method for generating a calibration file according to an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of another optional method for generating a calibration file according to an embodiment of the present application;

[0024] Figure 5 is a schematic diagram of another optional method for generating a calibration file according to an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of another optional method for generating a calibration file according to an embodiment of the present application;

[0026] Figure 7 is a flowchart of another optional method for generating a calibration file according to an embodiment of the present application;

[0027] Figure 8 is a schematic diagram of another optional method for generating a calibration file according to an embodiment of the present application;

[0028] Fig. 9 is a flowchart of another optional method for generating a calibration file according to an embodiment of the present application;

[0029] Fig.10 is a schematic diagram of a device for generating a calibration file according to an embodiment of the present application;

[0030] Fig.11 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] 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 should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] According to one aspect of an embodiment of the present application, a method for generating a calibration file is provided. Optionally, the method for generating a calibration file can be applied to, but is not limited to, Figure 1 In the hardware environment shown. Optionally, the method for generating the calibration file provided in the present application can be applied to a vehicle terminal. Figure 1 A side view of a vehicle terminal 101 is shown, and the vehicle terminal 101 can travel on a travel surface 113. The vehicle terminal 101 includes an onboard navigation system 103, a memory 102 storing a digitized road map 104, a space monitoring system 117, a vehicle controller 109, a GPS (Global Positioning System) sensor 110, an HMI (Human / Machine Interface) device 111, and also includes an autonomous controller 112 and a telematics controller 114.

[0034] In one embodiment, the space monitoring system 117 includes one or more space sensors and systems, which are used to monitor the visible area 105 in front of the vehicle terminal 101. The space monitoring system 117 also includes a space monitoring controller 118; the space sensors used to monitor the visible area 105 include a laser radar sensor 106, a radar sensor 107, a camera 108, etc. The space monitoring controller 118 can be used to generate data related to the visible area 105 based on the data input from the space sensor. The space monitoring controller 118 can determine the linear range, relative speed and trajectory of the vehicle terminal 101 based on the input from the space sensor, for example, determine the current speed of the vehicle and the relative speed compared to the front vehicle. The space sensor of the vehicle terminal space monitoring system 117 may include an object positioning sensing device, and the object positioning sensing device may include a range sensor, which can be used to locate the front object.

[0035] The camera 108 is advantageously mounted and positioned on the vehicle terminal 101 in a position that allows capturing an image of the visible area 105, wherein at least a portion of the visible area 105 includes a portion of the travel surface 113 in front of the vehicle terminal 101 and including the trajectory of the vehicle terminal 101. The visible area 105 may also include the surrounding environment. Other cameras may also be used, for example, including a second camera disposed on the rear or side portion of the vehicle terminal 101 to monitor the rear of the vehicle terminal 101 and one of the right or left sides of the vehicle terminal 101.

[0036] The autonomous controller 112 is configured to implement autonomous driving or advanced driver assistance system (ADAS) vehicle terminal functionality. Such functionality may include a vehicle terminal onboard control system capable of providing a certain level of driving automation. Driving automation may include a series of dynamic driving and vehicle terminal operations. Driving automation may include a certain level of automatic control or intervention involving a single vehicle terminal function (e.g., steering, acceleration, and / or braking). For example, the above-mentioned autonomous controller can be used to generate a vehicle calibration / observation scenario for a vehicle control unit by performing the following steps:

[0037] S102, acquiring a plurality of compiled files respectively matching a plurality of processing units, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the matching processing units;

[0038] S104, respectively obtaining corresponding initial variable objects from multiple compiled files;

[0039] S106, processing the multiple initial variable objects respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure;

[0040] S108, generating a target calibration file matching the target vehicle-mounted processor according to the multiple target variable objects.

[0041] The HMI device 111 provides human-machine interaction for the purpose of guiding the operation of the infotainment system, GPS (Global Positioning System) sensor 110, onboard navigation system 103 and the like, and includes a controller. The HMI device 111 monitors operator requests and provides the operator with status, service and maintenance information of the vehicle terminal system. The HMI device 111 communicates with multiple operator interface devices and / or controls the operation of multiple operator interface devices. The HMI device 111 may also communicate with one or more devices that monitor biometric data associated with the vehicle terminal operator. For simplicity of description, the HMI device 111 is depicted as a single device, but in the embodiments of the system described herein, it may be configured as multiple controllers and associated sensing devices.

[0042] Operator controls may be included in the passenger compartment of the vehicle terminal 101, and may include, by way of non-limiting example, a steering wheel, an accelerator pedal, a brake pedal, and an operator input device, which is an element of the HMI device 111. The operator controls enable a vehicle terminal operator to interact with the operating vehicle terminal 101 and direct the operation of the vehicle terminal 101 to provide passenger transportation.

[0043] The onboard navigation system 103 uses the digitized road map 104 for the purpose of providing navigation support and information to the vehicle terminal operator. The autonomous controller 112 uses the digitized road map 104 for the purpose of controlling the autonomous vehicle terminal operation or ADAS vehicle terminal functions.

[0044] The vehicle terminal 101 may include a telematics controller 114, which includes a wireless telematics communication system capable of communicating outside the vehicle terminal (including communicating with a communication network 115 having wireless and wired communication capabilities). The wireless telematics communication system includes an off-board server 116 capable of short-range wireless communication with a mobile terminal.

[0045] As an optional implementation, Figure 2 As shown, the method for generating the calibration file can be executed by an electronic device, such as Figure 1 The autonomous controller shown includes the following steps:

[0046] S202, acquiring a plurality of compiled files respectively matching a plurality of processing units, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the matching processing units;

[0047] S204, respectively obtaining corresponding initial variable objects from multiple compiled files;

[0048] S206, processing the multiple initial variable objects respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure;

[0049] S208: Generate a target calibration file matching the target vehicle-mounted processor according to the multiple target variable objects.

[0050] In S202 of the above embodiment, a plurality of compiled files respectively matching the plurality of processing units are obtained. It should be noted that the plurality of processing units are integrated on the target vehicle-mounted processor, and the compiled files are compiled products of the project files of the processing units matching therewith;

[0051] It should be noted that the following specific implementation methods recorded in this solution all take the generation of target calibration files based on a heterogeneous multi-core processor as an example. It can be understood that the calibration files can be expanded to multiple processors, multiple cores, and multiple processes based on the principles of this solution.

[0052] Optionally, the processor unit may be a core, a CPU, etc., and multiple processes may run on one core. The target on-board processor may be a Soc. The compiled file may be, but is not limited to, an elf file. A corresponding elf file is generated for each process on each core in a multi-core system. There are processes that need to rely on library files, so corresponding library files elf files also need to be generated. Specifically, the elf file is obtained by compiling the source code file of each process. The elf file contains the executable code, data, symbol table and other necessary information of the program, which is loaded into the memory by the system loader for execution during loading.

[0053] S204 is further executed to obtain the initial variable objects corresponding to each of the multiple compiled files; the initial variable objects can be obtained by, but not limited to, the following methods: first, the elf file header is read, which contains the overall information of the entire file, such as whether it is executable, the entry point address, the location of the program header table and the section header table, etc., and then the section is identified to search the symbol table, which contains the address and size information of all symbols (such as variables and functions) in the program, and then the initial variable object including the above information is obtained.

[0054] In the above step S206, the multiple initial variable objects are processed respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure;

[0055] In some optional implementations, the target template file may have the following Figure 3 The template A2L file of the organizational structure shown in the figure records the following from begin PROJECT to end PROJECT: from begin HEADER to end HEADER, fill in the project description information, including but not limited to recording: calibration purpose, calibration object, test conditions and other information; from begin MODULE to end MODULE, the ECU description information is recorded, one ECU corresponds to one MODULE, for example, it can be: ECU name: Body Control Module (Body Control Module, BCM), which manages the vehicle's lighting system, including interior lighting, exterior lighting, turn signal lights and other information; specifically, the following contents are recorded: from begin A2ML to end A2ML, the calibration protocol definition, data structure definition, network protocol definition, etc. are recorded; from begin MOD_PAR to end MOD_PAR, ECU data are recorded; from begin MOD_COMMON to end MOD_COMMON, data alignment is recorded; from begin COMPU_METHOD to end COMPU_METHOD, calculation conversion formula is recorded; from begin IF_DATA to end IF_DATA records interface parameters and other information. It can be understood that this application pre-adapts a template A2L file adapted for Soc heterogeneous multi-core multi-process scenarios, unifies the A2L version, standardizes data structure definitions, calibration protocol definitions, and data transmission definitions, and merges and splices variable information according to the organizational structure shown in the target template to generate a complete A2L file.

[0056] In the above step S208, a target calibration file matching the target vehicle-mounted processor is generated according to the multiple target variable objects;

[0057] As an optional implementation, the target variable object includes information such as the variable's extended address information, variable type, variable size, and variable actual address, and can be specifically as follows: Figure 4The form shown has attributes and corresponding information, such as the following main information: Name represents the name of the variable, Type represents the type of the variable, LowerLimit represents the minimum value of the type, UpperLimit represents the maximum value of the type, Address represents the specific address of the variable, which can be an actual physical address or a logical address (address offset needs to be done in the calibration tool), ECU_ADDRESS_EXTENSION represents the extended address of the variable, for example, it represents that the current observation usage scenario is the process A72_process0 on the A core A72, / begin IF_DATA CANAPE_EXT to / end IF_DATA configure the interface configuration information and address mapping information of the current variable, and then the software tool can generate a target calibration file based on multiple target variable objects, such as an A2L file containing variable information of all target calibration objects. It can be understood that if the ECU software is updated, it needs to be recompiled and updated in the A2L file. The tool can be used to update the address of the variable in the A2L file according to the elf file.

[0058] It should be noted that the above-mentioned calibration file generated recorded in this application can be used to calibrate variables to realize the calibration function, and the observation file can be generated according to the same logic to realize the observation function. Calibration variables can be generated in the calibration file to realize the calibration function and observation variables can be generated in the calibration file to realize the observation function.

[0059] Through the above implementation mode of the present application, a template A2L file is used to unify the specification definition and data structure definition of A2L, avoid the problem of inconsistent A2L versions and conflicts in data structure definitions, parse and merge the elf files in the Soc heterogeneous multi-core multi-process scenario to generate an A2L file, avoid the redundant generation of multiple A2L files, facilitate operation, improve efficiency, configure variable extended addresses to distinguish various scenarios, and avoid variable address conflicts in various scenarios.

[0060] In an optional implementation, multiple initial variable objects are processed separately according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, including:

[0061] S1, obtaining the current variable object to be processed from multiple initial variable objects;

[0062] S2, obtaining current description information matching the current variable object according to the variable configuration file, wherein the variable configuration file records the object identifiers of multiple initial variable objects to be processed and the variable description information matching the multiple initial variable objects respectively;

[0063] S3, based on the target organizational structure indicated by the target template file, the current description information matching the current variable object and the variable parameter information of the current variable object are processed to obtain a target variable object matching the current variable object, wherein the variable parameter information includes at least one of the following: a variable type and a first variable address.

[0064] In the above steps S1-S2, a current variable object to be processed is obtained from a plurality of initial variable objects; current description information matching the current variable object is obtained according to the variable configuration file. It should be noted that the variable configuration file records the object identifiers of a plurality of initial variable objects to be processed, and variable description information matching the plurality of initial variable objects respectively;

[0065] As an optional implementation, the current variable object in the elf file can be obtained in sequence according to the variable type, variable name, etc., and then the current description information matching the current variable object can be obtained according to the variable configuration file. The variable configuration file can be a variable configuration file that describes the variable in Excel format. The information in the variable configuration file is as follows: Figure 5 As shown, the above variable configuration file records the object identifier (such as variable name) of each initial variable object, and the variable description information that matches multiple initial variable objects respectively, including but not limited to the core, process, library file to which the initial variable object belongs, the variable function type and the template A2L file version used, etc., without specific restrictions here.

[0066] Furthermore, in the above step S3, based on the target organizational structure indicated by the target template file, the current description information matching the current variable object and the variable parameter information of the current variable object are processed to obtain the target variable object matching the current variable object. It should be noted that the variable parameter information includes at least one of the following: a variable type and a first variable address;

[0067] Specifically, the variable type may be an integer, a floating point, a structure, an array, etc. The first variable address is the address for actually obtaining the corresponding parameter value after the variable is determined to belong to the core, the process, or the library file.

[0068] In some optional embodiments, for example, when the target template file indicates that the structure variable contains 3 member variables and the number of elements of the array variable does not exceed 5, according to the target organizational structure indicated by the target template file, the current description information matching the current variable object and the variable parameter information of the current variable object are spliced ​​in the template file to obtain the target variable object. The spliced ​​target variable object is as follows: Figure 4As shown in the figure, the name of the variable corresponding to Name is lib1_A72_process0_A[0].a[0], the type of the variable corresponding to Type is VALUE, the minimum value of the type corresponding to LowerLimit is 0, the maximum value of the type corresponding to UpperLimit is 65535, and the specific address of the variable corresponding to Address is 0x1111, which can be an actual physical address or a logical address (address offset needs to be done in the calibration tool). ECU_ADDRESS_EXTENSION corresponds to the extended address of the variable 0x2222. For example, the current observation usage scenario is the process A72_process0 on the A core A72. The interface configuration information and address mapping information of the current variable are written in / begin IF_DATA CANAPE_EXT to / end IF_DATA.

[0069] Through the above-mentioned implementation mode of the present application, a current variable object to be processed is obtained from multiple initial variable objects; current description information matching the current variable object is obtained according to the variable configuration file, wherein the variable configuration file records the object identifiers of multiple initial variable objects to be processed, and variable description information matching the multiple initial variable objects respectively; based on the target organizational structure indicated by the target template file, the current description information matching the current variable object and the variable parameter information of the current variable object are processed to obtain a target variable object matching the current variable object, wherein the variable parameter information includes at least one of the following: a variable type and a first variable address, to distinguish between the process of the processing unit to which the variable belongs and the corresponding dependent library scenario, and each variable is configured with a corresponding scenario number to prevent conflicts between variable names and addresses, thereby achieving the ability to generate a unified A2L file.

[0070] In an optional implementation, based on the target organizational structure indicated by the target template file, the variable description information and the variable parameter information matching the current variable object are processed to obtain the target variable object matching the current variable object, including:

[0071] S1, obtaining a second variable address from the variable description information, wherein the second variable address is used to indicate a processing unit identifier corresponding to the current variable object;

[0072] S2, writing the second variable address into the target location indicated by the target organizational structure;

[0073] S3, determining the target variable object according to the written second variable address.

[0074] In the above step S1, a second variable address is obtained from the variable description information, wherein the second variable address is used to indicate the processing unit identifier corresponding to the current variable object;

[0075] Specifically, the above-mentioned variable description information includes the core, process and library file corresponding to the processing unit where the variable is located, and then the second address used to indicate the processing unit identifier corresponding to the current variable object can be determined according to the above-mentioned variable description information. Optionally, the above-mentioned processing unit identifier is not limited to an identifier used to determine the name of the processing unit core, the process name, the library file name, etc.

[0076] Further in steps S2-S3, the second variable address is written into the target position indicated by the target organizational structure; the target variable object is determined according to the written second variable address, for example, Figure 4 As shown, the second variable address is written into the corresponding part of "ECU_ADDRESS_EXTENSION", and then the above target variable object is determined after all data of multiple target variable objects are written;

[0077] Through the above-mentioned implementation mode of the present application, the second variable address is obtained from the variable description information, wherein the second variable address is used to indicate the processing unit identifier corresponding to the current variable object; the second variable address is written to the target position indicated by the target organizational structure; the target variable object is determined based on the written second variable address, and a complete a2l file is generated by combining according to the template a2l file.

[0078] In an optional implementation, based on the target organizational structure indicated by the target template file, the variable description information and the variable parameter information matching the current variable object are processed to obtain the target variable object matching the current variable object, including:

[0079] S1, obtaining a current format specification corresponding to a current variable object in a target template file, wherein the current format specification includes at least one of the following: a calibration protocol specification, a data structure specification, and a communication protocol specification;

[0080] S2. Based on the current format specification, at least one description object in the current description information is combined with the variable parameter information to obtain a target variable object, wherein the description object includes a second variable address for indicating a processing unit identifier corresponding to the current variable object.

[0081] It can be understood that, in the above steps S1-S2, the current format specification corresponding to the current variable object in the target template file is obtained, wherein the current format specification includes at least one of the following: a calibration protocol specification, a data structure specification, and a communication protocol specification; based on the current format specification, at least one description object in the current description information is combined with the variable parameter information to obtain the target variable object, wherein the description object includes a second variable address for indicating the processing unit identifier corresponding to the current variable object;

[0082] It should be noted that, taking the target template file as a template A2L file as an example, the template A2L file may define the format specification of variables, the calibration protocol specification may be the calibration or observation interval of the standard variable in the calibration or observation variable, such as only being able to observe the engine system, or the conditional logic between the standard variables, for example, an A2L file may define a calibration parameter, the calculation of whose physical value depends on the value of another parameter and other calibration protocol specifications; the data structure specification may be the specification of the type, access rights, member functions and inheritance relationship of the structure member; the communication protocol specification may be the specification of the communication method between the host computer and the ECU, such as stipulating the use of XCP protocol process data communication, etc., which is not specifically limited here;

[0083] Furthermore, based on the above-mentioned format specification, at least one description object in the current description information is combined with the variable parameter information, which may be the splicing of attributes and corresponding attribute values. For example, when the description object is the core and process of the variable, the core name and the process name are spliced ​​respectively to obtain the target variable object. It can be understood that the second variable address of the variable can be determined according to the core and process to which the variable belongs. The above-mentioned second variable address is an address used to indicate the scene to which the variable belongs, that is, to determine in which core, process and library file the variable is.

[0084] Through the above-mentioned implementation mode of the present application, the current format specification corresponding to the current variable object in the target template file is obtained, wherein the current format specification includes at least one of the following: calibration protocol specification, data structure specification, communication protocol specification; based on the current format specification, at least one description object in the current description information is combined with the variable parameter information to obtain the target variable object, wherein the description object includes a second variable address for indicating the processing unit corresponding to the current variable object, and the template A2L file is used to unify the specification definition and data structure definition of A2L to avoid the problem of inconsistent A2L versions and conflicts in data structure definitions.

[0085] In an optional implementation, before obtaining the current description information matching the current variable object according to the variable configuration file, the method further includes:

[0086] S1, obtaining a processing unit core identifier, a process identifier, and a library file identifier that match a reference variable object from the variable description information;

[0087] S2, write a first value matching the processing unit core identifier in a first bit interval in the reference data of the target length, write a second value matching the process identifier in a second bit interval in the reference data, and write a third value matching the library file identifier in a third bit interval in the reference data;

[0088] S3, determining a second variable address matching the reference variable object according to the reference data.

[0089] In the above steps S1-S3, the processing unit core identifier, process identifier and library file identifier that match the reference variable object are obtained from the variable description information; a first value that matches the processing unit core identifier is written in the first bit interval of the reference data of the target length, a second value that matches the process identifier is written in the second bit interval of the reference data, and a third value that matches the library file identifier is written in the third bit interval of the reference data; a second variable address that matches the reference variable object is determined according to the reference data;

[0090] As an optional implementation, the reference variable object is a variable that needs to be distinguished in the scene, that is, the variable that needs to determine the processing unit (ie, core), process and library file to which it belongs. Optionally, obtain Figure 5 The variable description information of variable A1 in the table shown is analyzed to obtain that the processing unit core identifier is the identifier corresponding to the small core 1, the process identifier is the identifier corresponding to process A, and the library file identifier is the identifier corresponding to the library file 1;

[0091] You can write the corresponding values ​​in the corresponding intervals according to the following rules to get the reference data of the target length:

[0092] The target length (two bytes, 6 bits) is used as the extended address to distinguish scenarios. The highest bit (15) is a reserved bit, which is 0 by default and not configured. The second highest bit (14) is 0 for the small core and 1 for the A core. The 9 bits from bit (13) to bit (5) indicate the process running on the A core / small core. The 5 bits from bit (4) to bit (0) indicate the library file that the process depends on.

[0093] For example, according to the above rule, it is determined that the first value written into the first bit interval that matches the core identifier of the processing unit is "1", the second value written into the second bit interval that matches the process identifier is "000000010", and the third value written into the third bit interval that matches the library file identifier is "00001", and the obtained reference data is "0100000001000001";

[0094] Then, the address after base conversion according to the reference data is "0x4041", which is used as the second variable address, and then a configuration file with the second variable address information can be obtained, such as Figure 6 As shown, the second variable address is a variable extension address, which extends the corresponding core, process and library file. The core, process and library file to which the variable belongs can be directly determined based on the address.

[0095] Through the above-mentioned implementation mode of the present application, the correspondence between the variable, the variable description information and the second variable address is determined, so that the core, process and library file where the variable is located can be quickly and accurately determined.

[0096] In an optional implementation, obtaining respective corresponding initial variable objects from multiple compiled files includes:

[0097] S1, obtaining an object identifier from a variable configuration file as a current object identifier, wherein the current object identifier is used to indicate a current variable object to be processed;

[0098] S2, when the current description information matching the current object identifier indicates that the current variable object is configured with a dependent library, parsing the first compiled file and the second compiled file matching the current variable object under the target path, wherein the first compiled file is a compiled file of the object process matching the current variable object, and the second compiled file is a compiled file matching the dependent library of the object process;

[0099] S2, obtaining the current variable object from the first compiled file and the second compiled file.

[0100] In the above step S1, an object identifier is obtained from the variable configuration file as the current object identifier, wherein the current object identifier is used to indicate the current variable object to be processed. Specifically, the object identifier may be the variable name of the variable, and the variable object to be processed is determined according to the variable name.

[0101] In the above step S2, when the current description information matching the current object identifier indicates that the current variable object is configured with a dependent library, the first compiled file and the second compiled file matching the current variable object under the target path are parsed. It should be noted that the first compiled file is a compiled file of the object process matching the current variable object, and the second compiled file is a compiled file matching the dependent library of the object process.

[0102] It should be noted that when variables in a program need to use functions defined in library files, they depend on these library files, that is, there is a current description information that matches the current object identifier indicating that the current variable object is configured with a dependent library, such as Figure 5 As shown, the dependent library of process A to which variable A1 belongs is library file 1;

[0103] As an optional implementation, the elf file of the Soc heterogeneous multi-core calibration scenario, each scenario has a folder named after the corresponding core process, and the folder contains the corresponding elf file. For example, in the C66_1 folder, C66_process1.elf represents the elf file corresponding to the process porcess1 running on the small core C66, and the lib.elf file represents the elf file corresponding to the library file that the process depends on. Therefore, it is necessary to parse the process elf file and library file elf file under the target path (which can be the folder path named after the core).

[0104] Then in step S3, the current variable object is obtained from the first compiled file and the second compiled file. For example, variable 1 is obtained after parsing according to the first compiled file corresponding to process A and the second compiled file corresponding to library file B, and variable 1 calls the calculation formula in the library file to obtain the corresponding operation result variable 2. This is just an example.

[0105] Through the above-mentioned implementation mode of the present application, an object identifier is obtained from the variable configuration file as the current object identifier, wherein the current object identifier is used to indicate the current variable object to be processed; when the current description information matching the current object identifier indicates that the current variable object is configured with a dependent library, the first compiled file and the second compiled file matching the current variable object under the target path are parsed, wherein the first compiled file is a compiled file of the object process matching the current variable object, and the second compiled file is a compiled file matching the dependent library of the object process; the current variable object is obtained from the first compiled file and the second compiled file, thereby improving the accuracy of obtaining the variable object, and further improving the accuracy of generating the A2L file.

[0106] In an optional implementation, obtaining the current variable object from the first compiled file and the second compiled file includes:

[0107] S1, determine the variable type of the current variable object;

[0108] S2, when the current variable object is a basic variable type, obtain the variable address of the current variable object;

[0109] S3, when the current variable object is a structure variable type, determining the variable addresses of the member variables included in the current variable object in sequence;

[0110] S4, when the current variable object is an array variable type, determining the variable addresses of the array element variables included in the current variable object in sequence;

[0111] S5, when the current variable object is a pointer variable type, obtain the variable address of an associated variable object that matches the current variable object, wherein the associated variable object is the variable object pointed to by the current variable object.

[0112] The following is as follows Figure 7 The flowchart shown illustrates the above steps:

[0113] First, execute S702 to read the elf file;

[0114] S704, traverse the obtained variable list;

[0115] S706, variable TypeDef is obtained; it should be noted that typedef is a keyword used to create a new name for an existing data type, and this process is called "type definition";

[0116] S708, whether it is TypeDef; if it is TypeDef, execute S706, obtain the variable TypeDef; it is understandable that since typedef is used to create an alias for a type, it may lead to nested definition of the type, so after obtaining the "TypeDef" of the variable, it is necessary to continue to trace the alias to find the "real" type of the variable;

[0117] If it is not TypeDef, execute S710 to determine whether it is a structure Sturct; if it is a structure Sturct, execute S708-1 to process the structure Sturct variables; further execute S718 to process variables and addresses. Specifically, the structure member variables can be accessed to obtain the variable size, type, etc., and then the address is calculated to obtain the address of the structure member variable.

[0118] If it is not a structure Sturct, execute S712 to determine whether it is an array Array; if it is an array Array, execute S710-1 to process the array Array variable; further execute S718 to process the variables and addresses. Specifically, the element variables in the array can be traversed to obtain the variable size, type, etc., and then the address can be calculated to obtain the address of the array element.

[0119] If it is not an array, execute S714 to determine whether it is a Pointer pointer type;

[0120] If it is a Pointer pointer type, execute S706 to obtain the variable TypeDef; that is, it is necessary to find the real type of the variable pointed to by the pointer and then perform corresponding processing;

[0121] If it is not a Pointer pointer type, execute S716 to determine whether it is a BaseType;

[0122] If it is BaseType, execute S718 to process the variable and address. Optionally, BaseType is a basic type of variable, and the address, data size and other information corresponding to the variable can be directly obtained by taking the address; if not, execute S706 to obtain the variable TypeDef.

[0123] Specifically, take a specific implementation process as an example:

[0124] S1, parse the debugging section content in elf, obtain the variable set, and traverse to obtain the variable content of variable A;

[0125] S2, the variable content contains the name, starting address and variable type of variable A. At this time, the variable type of variable A is TypeDef, and further judgment is required;

[0126] S3, finally the variable type is obtained as array, and the array processing logic is entered, where the variable information indicates that the size of the array array is 64, that is, from 0 to 63, and then the type of a single element in the array needs to be found;

[0127] S4, optionally, if the type of a single element is a basic type, the corresponding address can be directly obtained. If the type of a single element in the array is a complex type, such as a structure type, it means that the variable is a structure array, and the structure processing logic is entered to determine the address of the member variable of the structure. For example, the first child in the structure is a 2-byte unsigned short type integer. The address of each child element in the variable can be calculated based on the corresponding starting address of the variable in elf and the type of the variable, for example: structure starting address + member variable offset;

[0128] Through the above implementation of the present application, object operations are performed on different types of data, which improves the accuracy of obtaining variable object addresses and data information, thereby improving the accuracy of generating A2L files.

[0129] In an optional implementation, before the plurality of initial variable objects are processed respectively according to the target organizational structure indicated by the target template file, the method includes:

[0130] S1, obtaining a variable identifier in a configuration container used to edit a template file;

[0131] S2: In response to the editing operation received in the configuration container, the template organization structure indicated by the variable identifier is adjusted in the template file.

[0132] In the above step S1, a variable identifier is obtained in a configuration container for editing a template file. For example, the template file is edited using eclipse, and the variable identifier that needs to be edited, such as the variable name, is obtained in the interface.

[0133] In step S2, in response to the editing operation received in the configuration container, the template organization structure indicated by the variable identifier is adjusted in the template file;

[0134] As an optional implementation, the present application can configure and define the data specifications in the template file in eclipse, and then use the script to directly execute the script to generate the A2L file after packaging, which is convenient for the project integration pipeline compilation and operation. If the ECU or software changes the data definition and variables, you only need to modify the configuration container (such as Excel) corresponding to the variable and recompile and execute it without re-modification and re-release.

[0135] The present application provides an A2L interface editing method, which provides a graphical operation interface in the interface. Users can adjust the template organization structure and edit operations through intuitive methods such as clicking and dragging without having to remember complex commands or syntax.

[0136] In an optional implementation, after generating a target calibration file matching the target vehicle-mounted processor according to the plurality of target variable objects, the method further includes:

[0137] S1, load the target calibration file into the calibration software;

[0138] S2, establishing a communication connection with the vehicle system through the calibration software;

[0139] S3, configuring calibration parameters of the target variable object according to the communication connection;

[0140] S4, determining the performance parameters of the vehicle-mounted system according to the calibration parameters;

[0141] S5, adjusting calibration parameters of the target variable object according to the performance parameters.

[0142] The above process is described below with a complete implementation method:

[0143] S1, determine the calibration software, and record the target calibration file (A2L file) to the calibration software. The A2L file includes the address, data type, minimum / maximum value, etc. of the target variable object (i.e., calibration variable), and defines the variables that can be accessed and modified through the XCP protocol;

[0144] S2, using a communication protocol such as XCP to establish a connection with the vehicle system ECU via CAN or other communication interfaces;

[0145] S3, sending a read command through the calibration software, and reading the current calibration parameter value in the ECU according to the address information of the variable object provided in the A2L file;

[0146] S4, in the calibration software, manually adjust the calibration parameter values ​​according to the test requirements and performance targets. For example, if the air-fuel ratio of the engine needs to be optimized, the parameters of the fuel injection amount may be adjusted. After the parameters are modified, the new values ​​are written to the corresponding addresses of the ECU through the calibration software;

[0147] S5, then, conduct a real vehicle test or a bench test to verify the effect of the parameter change.

[0148] It should be noted that the present application is based on a heterogeneous multi-core processing unit. Therefore, when the main core obtains the address that needs to be calibrated, it needs to determine whether the address is the address of the small core process or the address of the main core sub-process. The process to which the above target variable belongs can be determined based on the variable description information that matches the target variable object. For example, if the target variable corresponds to the address of the small core, it needs to be transmitted to the small core through inter-core communication. The target variable corresponds to the address of the main core sub-process and needs to be transmitted to the corresponding process through inter-process transmission.

[0149] It should also be noted that if the target variable address corresponds to the main core process file and depends on the dynamic library, when obtaining the address of the target variable, it is necessary to obtain the loading base address of the dynamic library, and then calculate the actual virtual address, and perform read and write operations on the address to complete the calibration operation.

[0150] The calibration process is described below in a specific implementation manner:

[0151] S1, determine the calibration variable that needs to be calibrated, and determine the address of the calibration variable from the A2L file;

[0152] S2, select the corresponding control unit and variable address, send a read command to the variable address, and record the current variable value of the calibration variable stored in the variable address;

[0153] S3, testing the vehicle system according to the current variable values ​​and analyzing the vehicle performance;

[0154] S4, if the test result does not meet expectations, adjust the variable parameters according to the analysis results; specifically, in the calibration software, select the variable address corresponding to the calibration variable, modify the variable parameter value stored in the corresponding variable address, send a write command, and re-read the variable parameter value stored in the variable address to confirm whether the change is successful;

[0155] S5, test the vehicle system again to analyze whether the vehicle performance has achieved the target effect.

[0156] As an optional implementation, the calibration protocol specification is defined but not limited to defining the data type of variable A as an integer, the unit is milliseconds, the interval is 1-10, and the conditional statement is: if the engine temperature exceeds 85°C, variable A will increase a compensation value.

[0157] As another optional implementation, the definition of data structure specifications may include but is not limited to defining the data type of structure members in a variable of structure type, with access rights of public, protected or private, member functions for obtaining variable parameter values ​​of structure members, and inheritance relationships of direct inheritance, etc.; in an array variable, the data type of array elements is int, and the number is int array[5], or int matrix

[10] [5] for a multi-dimensional array; in a pointer type variable, the pointer may point to an int type parameter, the address of a parameter, or a callback function, etc.

[0158] In some optional embodiments, the signal routing information defines the transmission path of data in the automobile network. The definition of signal routing information includes but is not limited to defining the source node, destination node, transmission protocol and priority of the signal. The definition of network message structure includes but is not limited to defining the message identifier (ID), data length, data field, timestamp, etc.; the definition of network communication parameters includes but is not limited to defining the baud rate, message sending frequency, network topology, etc.; the definition of configuration information includes but is not limited to defining the ECU role, etc.

[0159] Through the above implementation methods of this application.

[0160] The present scheme is described below in a complete implementation method;

[0161] S1, configuration variable data source;

[0162] Optionally, the solution architecture diagram is as follows Figure 8As shown, the Soc802 on the left takes the TAD4VM processing unit as an example. The TAD4VM processing unit has 2 A72, 6 R5F, two C66, 5 C7X and other cores. Different cores run in different modes. Each core can run multiple processes, such as A72_process0, A72_process1, R5F_process2, etc. In the actual calibration scenario, there is a folder named after the corresponding core process for each scenario, and the folder contains the corresponding elf file. For example, in the C66_1 folder, C66_process1.elf represents the elf file corresponding to the process porcess1 running on the small core C66, and the lib.elf file represents the elf file corresponding to the library file that the process depends on. The elf files in the files corresponding to these process names are used as the input source of calibration or observation variables, such as Figure 8 The Soc802 processing unit includes the elf file corresponding to core 1, the elf file corresponding to core 2, the elf file corresponding to core 3, the elf file corresponding to core 4, and so on.

[0163] S2, configure extended addresses to distinguish scenarios according to the scenarios;

[0164] Since the variables of each process on the Soc heterogeneous multi-core are generated into an A2L file, it is necessary to consider the problem of variable and address duplication and the matching problem of each scenario. Therefore, this application adopts the variable extension address ECU_ADDRESS_EXTENSION and the mapping in LINK_MAP to avoid the problem of variable name duplication and address conflict in multiple scenarios. The variable extension address is determined according to the variable information table and the process information table, that is, the core, process and library file to which the variable belongs. The mapping in LINK_MAP is used to map the virtual address to the actual physical address to solve the problem of dynamic linking. The container example configuration of the variable extension address is as follows Figure 6 shown.

[0165] S3, configure the template A2L file according to the specification and business;

[0166] As an optional implementation, in order to avoid A2L version differences, ECU data definition, data structure definition, communication protocol definition and other configuration conflicts between A2L files in multiple scenarios, the present application uses the concept of templates, and predetermines a template A2L file 804 that is adapted to multiple scenarios. By unifying the A2L version, standardizing the data structure definition, calibration protocol definition and data transmission and other configurations, it is used as the main A2L framework to cooperate with the A2L generation module to generate a complete A2L file. As shown in the figure, the template A2L file 804 is obtained according to the A2L parsing / editing module 806, and before generating the A2L file, the template A2L file is parsed according to the A2L parsing module, the elf file is parsed according to the elf parsing module 808, and the variable information table 812 and the process information table 814 are parsed according to the excel parsing module 810, so as to obtain the generated A2L file 818 according to the A2L generation module 816.

[0167] S4, configure the list of variables that need to be observed / calibrated according to the needs of each process and calibration business;

[0168] According to the needs of each process and calibration business, pre-plan which variables in which processes on which cores need to be observed. For example, if you want to observe variable A1 on A72_process0, you need to configure the following in the variable configuration container: Figure 5 As shown, the configuration variable A1 uses the template A2L file of version 1, and the variable A1 is an observation variable used for observation, which belongs to core 1, process A, and library file 1.

[0169] S5, configuration scheme execution script;

[0170] The execution script is used to generate the A2L file, which needs to be configured with the elf folder prepared in the above steps, the template A2L file, the variable configuration container, the extended address configuration container, etc.

[0171] S6, the above steps configure the copywriting, execute the script to generate the A2L file;

[0172] This application uses bat script execution, which is integrated into the project's Jenkins (automation server) pipeline. After clicking build, the script generation logic is automatically executed. The specific A2L file generation process is as follows Fig. 9 As shown:

[0173] S902, parsing the module A2L file to obtain the A2L metamodel object;

[0174] The path where template.a2l (template file) is located is obtained according to the template path parameter configured in the script. The A2L parsing module parses the template.a2l file and generates an A2L metamodel object.

[0175] S904, according to the file path of the variable container, parse and obtain a list of variables that need to be calibrated or observed;

[0176] Specifically, according to the variable container path parameters configured in the script, the excel parsing module is used to parse the configured variable list, the table is configured with variable information that needs to be calibrated or observed, and the core (core) and process (out) corresponding to the variable and the variable type (calibration or observation) are obtained according to the parsed variable information and grouped for use.

[0177] S906, configuring the file path of the container according to the extended address, parsing and obtaining the core, process, and dependent library corresponding to each scene elf file;

[0178] Optionally, according to the extended address path parameter configured in the script, the extended addresses of the core (core) and process (out) corresponding to the elf files of each scene are parsed using the excel parsing module for backup.

[0179] S908, according to the directory of the data input of multiple scenes, obtain the elf file corresponding to each scene;

[0180] It can be understood that according to the data input path parameter configured by the script, the folder path is obtained. Each scene has a folder named after the corresponding core, and the folder contains the corresponding elf file. If there is a dependent library, there is also a corresponding dependent library elf file.

[0181] S910, traverse the elf file list, parse the elf file, assemble data and addresses according to variable types, filter the variable list of the elf file according to the scene and configuration to which the elf belongs, assemble the metamodel object for each variable according to the type and put it into the specified data container;

[0182] Specifically, traverse the files corresponding to each scene, such as scene A72_process0, obtain A72_process0.elf and lib.elf files, use the elf parsing module, first parse out the variable list data in the debug_info segment, for example, variable A, first obtain the excel variable data list according to the core A72_process0, and determine whether variable A is in the list. If not, filter it and do not process it. If it exists, obtain the corresponding extended address, such as 0x11, and continue to determine whether the type of variable to be processed in excel is an observation or a calibration variable, and process it separately. For example, if it is a calibration variable, assemble the meta-model data corresponding to the calibration variable;

[0183] In order to prevent the duplication of variable names in different scenarios, the variable name generation rules can be set as follows: {dynamic library name (optional)}-{process name}-{variable name}, the first sub-element name of variable A is lib1_A72_process0_A[0].a, the variable type Type is __UWORD_Z, the variable address Address is 0x1111, the variable type min is 0, the max is 65535, the extension address ECU_ADDRESS_EXTENSION is 0x2222, etc. After assembling the metamodel object of the variable, put it in the CHARACTERISTICS list of the A2L metamodel object.

[0184] S912, generating an A2L file according to the assembled A2L metamodel object; specifically, the A2L generation module generates a merged A2L file according to the assembled A2L metamodel object.

[0185] It should be noted that, since multiple calibration variables or observation variables may be preset, it is necessary to repeatedly execute S910 to assemble the parameter information processes of all calibration variables or observation variables, and then generate a complete A2L file.

[0186] It should be noted that the metamodel defines the building blocks of the model (such as classes, attributes, relationships, etc.) and the rules for how these building blocks are combined. The metamodel objects are entities defined in the metamodel and are elements that can be used when building a model. For example, in the Unified Modeling Language (UML), metamodel objects may include classes, interfaces, associations, attributes, etc.; based on the collected variable data, the corresponding objects defined in the metamodel can be created. For example, if the metamodel defines a "class" element, then a specific class instance can be created based on the variable data.

[0187] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0188] According to another aspect of the embodiments of the present application, a calibration file generation device for implementing the calibration file generation method is also provided. Fig.10 As shown, the device comprises:

[0189] A first acquisition unit 1002 acquires a plurality of compiled files respectively matching a plurality of processing units, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the matching processing units;

[0190] The second obtaining unit 1004 obtains the initial variable objects corresponding to each of the plurality of compiled files;

[0191] Processing unit 1006, according to the target organizational structure indicated by the target template file, processes the multiple initial variable objects respectively to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure;

[0192] The generating unit 1008 generates a target calibration file matching the target vehicle-mounted processor according to the multiple target variable objects.

[0193] As an optional solution, the device for generating the calibration file further includes: a third acquisition unit, used to acquire a current variable object to be processed from the multiple initial variable objects; acquiring current description information matching the current variable object according to a variable configuration file, wherein the variable configuration file records object identifiers of the multiple initial variable objects to be processed, and variable description information respectively matching the multiple initial variable objects; based on the target organizational structure indicated by the target template file, processing the current description information matching the current variable object and the variable parameter information of the current variable object to obtain the target variable object matching the current variable object, wherein the variable parameter information includes at least one of the following: a variable type and a first variable address.

[0194] As an optional solution, the above-mentioned third acquisition unit includes: a first determination module, used to obtain the second variable address from the above-mentioned variable description information, wherein the above-mentioned second variable address is used to indicate the processing unit identifier corresponding to the above-mentioned current variable object; write the above-mentioned second variable address into the target position indicated by the above-mentioned target organizational structure; determine the above-mentioned target variable object based on the above-mentioned second variable address that has been written.

[0195] As an optional scheme, the above-mentioned third acquisition unit includes: a fourth acquisition module, used to obtain the current format specification corresponding to the above-mentioned current variable object in the target template file, wherein the above-mentioned current format specification includes at least one of the following: calibration protocol specification, data structure specification, communication protocol specification; based on the above-mentioned current format specification, at least one description object in the above-mentioned current description information is combined with the above-mentioned variable parameter information to obtain the above-mentioned target variable object, wherein the above-mentioned description object includes a second variable address for indicating the processing unit identifier corresponding to the above-mentioned current variable object.

[0196] As an optional scheme, the above-mentioned third acquisition unit includes: a second determination module, used to obtain the processing unit core identifier, process identifier and library file identifier that match the reference variable object from the above-mentioned variable description information; write a first numerical value matching the above-mentioned processing unit core identifier in the first bit interval of the reference data of the target length, write a second numerical value matching the above-mentioned process identifier in the second bit interval of the above-mentioned reference data, and write a third numerical value matching the above-mentioned library file identifier in the third bit interval of the above-mentioned reference data; determine the second variable address matching the above-mentioned reference variable object according to the above-mentioned reference data.

[0197] As an optional solution, the third acquisition module further includes a fifth acquisition module, which is used to obtain an object identifier from the variable configuration file as the current object identifier, wherein the current object identifier is used to indicate the current variable object to be processed; when the current description information matching the current object identifier indicates that the current variable object is configured with a dependent library, parse the first compiled file and the second compiled file matching the current variable object under the target path, wherein the first compiled file is the compiled file of the object process matching the current variable object, and the second compiled file is the compiled file matching the dependent library of the object process; and obtain the current variable object from the first compiled file and the second compiled file.

[0198] As an optional solution, the above-mentioned device also includes: a sixth acquisition module, used to determine the variable type of the above-mentioned current variable object; when the above-mentioned current variable object is a basic variable type, obtain the variable address of the above-mentioned current variable object; when the above-mentioned current variable object is a structure variable type, determine the variable addresses of the member variables included in the above-mentioned current variable object in sequence; when the above-mentioned current variable object is an array variable type, determine the variable addresses of the array element variables included in the above-mentioned current variable object in sequence; when the above-mentioned current variable object is a pointer variable type, obtain the variable address of the associated variable object matching the above-mentioned current variable object, wherein the above-mentioned associated variable object is the variable object pointed to by the above-mentioned current variable object.

[0199] As an optional solution, the processing unit is further used to obtain a variable identifier in a configuration container used to edit the template file; in response to an editing operation received in the configuration container, adjust the template organization structure indicated by the variable identifier in the template file.

[0200] As an optional solution, the above-mentioned generation unit includes: a loading unit, used to load the above-mentioned target calibration file into the calibration software; establish a communication connection with the vehicle-mounted system through the above-mentioned calibration software; configure the calibration parameters of the above-mentioned target variable object based on the above-mentioned communication connection; determine the performance parameters of the above-mentioned vehicle-mounted system according to the above-mentioned calibration parameters; adjust the above-mentioned calibration parameters of the above-mentioned target variable object according to the above-mentioned performance parameters.

[0201] For the specific implementation, reference may be made to the example shown in the method for generating the calibration file described above, which will not be described in detail in this example.

[0202] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for generating the calibration file in the embodiment of the present invention. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, realizing the above-mentioned method for generating the calibration file. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include a memory remotely arranged relative to the processor 1104, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1102 can be specifically, but not limited to, used to store file information such as target files. As an example, such as Fig.11 As shown, the memory 1102 may include, but is not limited to, the first acquisition unit 1002, the second acquisition unit 1004, the processing unit 1006, and the generation unit 1008 in the calibration file generation device. In addition, it may also include, but is not limited to, other module units in the calibration file generation device, which will not be repeated in this example.

[0203] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0204] In addition, the electronic device mentioned above further includes: a display 1108, and a connection bus 1110, which is used to connect various module components in the electronic device mentioned above.

[0205] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.

[0206] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0207] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0208] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.

[0209] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.

[0210] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0211] S1, obtaining a plurality of compiled files respectively matching a plurality of processing units, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the matching processing units;

[0212] S2, respectively obtain the corresponding initial variable objects from multiple compiled files;

[0213] S3, processing the multiple initial variable objects respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure;

[0214] S4, generating a target calibration file matching the target vehicle processor according to the multiple target variable objects.

[0215] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the electronic device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0216] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0217] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.

[0218] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0219] In the several embodiments provided in the present application, it should be understood that the disclosed user equipment can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0220] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0221] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0222] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a calibration file, characterized in that: include: Acquire a plurality of compiled files respectively matching a plurality of processing units, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the matching processing units; Obtaining respectively corresponding initial variable objects from the plurality of compiled files; According to the target organizational structure indicated by the target template file, the plurality of initial variable objects are processed respectively to obtain a plurality of target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure; A target calibration file matching the target vehicle-mounted processor is generated according to the plurality of target variable objects.

2. The method according to claim 1, characterized in that The multiple initial variable objects are processed respectively according to the target organizational structure indicated by the target template file to obtain multiple target variable objects, including: Obtaining a current variable object to be processed from the multiple initial variable objects; Acquire current description information matching the current variable object according to a variable configuration file, wherein the variable configuration file records object identifiers of a plurality of the initial variable objects to be processed and variable description information respectively matching the plurality of the initial variable objects; Based on the target organizational structure indicated by the target template file, the current description information matching the current variable object and the variable parameter information of the current variable object are processed to obtain the target variable object matching the current variable object, wherein the variable parameter information includes at least one of the following: a variable type and a first variable address.

3. The method according to claim 2, characterized in that The step of processing the variable description information and the variable parameter information matching the current variable object based on the target organizational structure indicated by the target template file to obtain the target variable object matching the current variable object includes: Acquire a second variable address from the variable description information, wherein the second variable address is used to indicate a processing unit identifier corresponding to the current variable object; Writing the second variable address into a target location indicated by the target organizational structure; The target variable object is determined according to the written second variable address.

4. The method according to claim 2, characterized in that: The step of processing the variable description information and the variable parameter information matching the current variable object based on the target organizational structure indicated by the target template file to obtain the target variable object matching the current variable object includes: Obtaining a current format specification corresponding to the current variable object in a target template file, wherein the current format specification includes at least one of the following: a calibration protocol specification, a data structure specification, and a communication protocol specification; Based on the current format specification, at least one description object in the current description information is combined with the variable parameter information to obtain the target variable object, wherein the description object includes a second variable address for indicating a processing unit identifier corresponding to the current variable object.

5. The method according to claim 2, characterized in that: Before obtaining the current description information matching the current variable object according to the variable configuration file, the method further includes: Acquire a processing unit core identifier, a process identifier, and a library file identifier that match the reference variable object from the variable description information; In a first bit interval of the reference data of the target length, a first value matching the core identifier of the processing unit is written, in a second bit interval of the reference data, a second value matching the process identifier is written, and in a third bit interval of the reference data, a third value matching the library file identifier is written; A second variable address matching the reference variable object is determined according to the reference data.

6. The method according to claim 2, characterized in that The obtaining respectively corresponding initial variable objects from the plurality of compiled files comprises: Obtaining an object identifier from the variable configuration file as a current object identifier, wherein the current object identifier is used to indicate the current variable object to be processed; When the current description information matching the current object identifier indicates that the current variable object is configured with a dependent library, parsing a first compiled file and a second compiled file matching the current variable object under the target path, wherein the first compiled file is the compiled file of the object process matching the current variable object, and the second compiled file is the compiled file matching the dependent library of the object process; The current variable object is obtained from the first compiled file and the second compiled file.

7. The method according to claim 6, characterized in that The obtaining the current variable object from the first compiled file and the second compiled file comprises: Determine the variable type of the current variable object; When the current variable object is a basic variable type, obtaining the variable address of the current variable object; In the case where the current variable object is a structure variable type, determining the variable addresses of the member variables included in the current variable object in sequence; In the case where the current variable object is an array variable type, determining the variable addresses of the array element variables included in the current variable object in sequence; In the case that the current variable object is a pointer variable type, a variable address of an associated variable object matching the current variable object is obtained, wherein the associated variable object is a variable object pointed to by the current variable object.

8. The method according to claim 1, characterized in that Before the multiple initial variable objects are processed respectively according to the target organizational structure indicated by the target template file, it includes: In a configuration container for editing the template file, obtaining a variable identifier; In response to an editing operation received in the configuration container, the template organization structure indicated by the variable identifier is adjusted in the template file.

9. The method according to claim 1, characterized in that: After generating a target calibration file matching the target vehicle-mounted processor according to the plurality of target variable objects, the method includes: Loading the target calibration file into the calibration software; Establishing a communication connection with the vehicle-mounted system through the calibration software; configuring calibration parameters of the target variable object based on the communication connection; Determining performance parameters of the vehicle-mounted system according to the calibration parameters; The calibration parameters of the target variable object are adjusted according to the performance parameters.

10. A device for generating a calibration file, characterized in that: include: A first acquisition unit acquires a plurality of compiled files respectively matching a plurality of processing units, wherein the plurality of processing units are integrated on a target vehicle-mounted processor, and the compiled files are compiled products of project files of the matching processing units; A second acquisition unit is configured to acquire respectively corresponding initial variable objects from the plurality of compiled files; A processing unit, according to the target organizational structure indicated by the target template file, processes the plurality of initial variable objects respectively to obtain a plurality of target variable objects, wherein the object organizational structure of the target variable objects matches the target organizational structure; A generating unit generates a target calibration file matching the target vehicle-mounted processor according to the plurality of target variable objects.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 9 when executed by an electronic device.

12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 through the computer program.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Semiconductor machine output data processing method and processing device

    CN121031547A