A2L files automatic generation method and system
Technical field
The present invention relates to automobile electronic controller development field.Relate in particular to a kind of A2L files automatic generation method
And system.
Background technology
A2L is the description file of controller, the message that calibration tool can provide according to A2L files, reads ECU
The numerical value of measurable amount and calibrating parameters in (Electronic Control Unit), and by the requirement calibrating parameters number of user
Value is with Optimal Control Strategy.But in the prior art, A2L files are mostly by the way of manual compiling and modification, if source code is literary
Part is changed, it would be desirable to and the relevant portion of the variable of many A2L files is modified by hand one by one, not only wasted time and energy, and
Error is very easy to, has influence on the development cost and quality of whole automobile product.
With the continuous progress of science and technology, automobile electrically-controlled system effect is become increasingly complex, and the update of automobile product is also got over
Come faster so that the Development of ECU for Compressed cycle is shorter and shorter, and the pressure of PHP is also growing day by day, using conservative
Development scheme has been difficult to meet the needs of vehicle electrically controlling system software development.Accordingly, it is desirable to provide one kind can quickly generate A2L
The method of file, to reduce the work difficulty of PHP, product development efficiency is being improved, is shortening the same of construction cycle
When can also reduce modification A2L files caused by error rate.
The content of the invention
Therefore, the technical problems to be solved by the invention are prior art in vehicle electrically controlling system Software Development mistake
It is by the relevant portion of manual amendment's A2L file variables in journey, wastes time and energy, error rate is high, causes product development efficiency
It is low, so as to provide a kind of A2L files automatic generation method that can improve product development efficiency and system.
In order to solve the above technical problems, technical scheme is as follows:
The invention provides a kind of A2L files automatic generation method, comprise the following steps:
The mapped file for importing sound code file and being generated after being compiled to sound code file;
Being obtained according to configuration file from the mapped file needs to generate the configuration information in A2L files;
Being obtained according to mark file from the sound code file needs to generate the other information in A2L files;
According to the configuration information and other information generation A2L files and export corresponding journal file.
A2L files automatic generation method of the present invention, needs are obtained from the mapped file according to configuration file
The process for generating the configuration information in A2L files comprises the following steps:
The relevant information of configuration demarcation address field, measurement address field and keyword, accordingly generates configuration file, and described
The relevant information of keyword is according to ASAP2 standard configurations;
The mapped file is scanned according to the configuration file, looked into respectively in demarcation address field, measurement address field
Scalar quantity and measurement amount are found out, and using the relevant information of the scalar quantity, the measurement amount and the keyword as needs
Generate the configuration information in A2L files.
A2L files automatic generation method of the present invention, needs are obtained from the sound code file according to mark file
The process for generating the other information in A2L files comprises the following steps:
The mark specification of sound code file is configured, and generates the mark file for including the mark specification, the mark specification
In give unique mark corresponding to same data message;
After the processing be scanned according to the mark file to the sound code file, parsed, by the sound code file
Data message be configured to identify corresponding to its, obtain the sound code file after mark;
The other information found out from the sound code file after the mark in addition to the scalar quantity and the measurement amount is made
To need to generate the other information in A2L files.
A2L files automatic generation method of the present invention, A2L is generated according to the configuration information and the other information
File simultaneously exports the process of corresponding journal file and comprised the following steps:
The configuration information and the other information are integrated, sorted and deleted unnecessary scalar quantity and measurement amount
After processing, the final information for generating A2L files is got, generation includes the A2L files of the final information;
The journal file of output record A2L file generated processes.
Present invention also offers a kind of A2L files automatic creation system, including:
Gatherer, for the mapped file for importing sound code file and generating after being compiled to sound code file;
First acquisition device, need to generate in A2L files for being obtained from the mapped file according to configuration file
Configuration information;
Second acquisition device, generated for obtaining needs from the sound code file according to mark file in A2L files
Other information;
Output device is generated, for generating A2L files according to the configuration information and the other information and exporting corresponding
Journal file.
A2L files automatic creation system of the present invention, first acquisition device include:
First dispensing unit, for configuring demarcation address field, measurement address field and the relevant information of keyword, give birth to accordingly
Into configuration file, and the relevant information of the keyword is according to ASAP2 standard configurations;
First query unit, for being scanned according to the configuration file to the mapped file, demarcation address field,
Measurement address field finds out scalar quantity and measurement amount respectively, and by the scalar quantity, the measurement amount and the keyword
Relevant information generates the configuration information in A2L files as needs.
A2L files automatic creation system of the present invention, second acquisition device include:
Second dispensing unit, for configuring the mark specification of sound code file, and generate the mark for including the mark specification
File, it is described to identify the unique mark given in specification corresponding to same data message;
Unit is identified, for being scanned according to the mark file to the sound code file, after the processing that parses, by institute
State the data message in sound code file to be configured to identify corresponding to it, obtain the sound code file after mark;
Second query unit, for being found out from the sound code file after the mark except the scalar quantity and the measurement
Other information outside amount generates the other information in A2L files as needs.
A2L files automatic creation system of the present invention, the generation output device include:
Generation unit, for being integrated, being sorted and being deleted unnecessary mark to the configuration information and the other information
After the quantitative and processing of measurement amount, the final information for generating A2L files is got, generation includes the final information
A2L files;
Output unit, for exporting the journal file of record A2L file generated processes.
The above-mentioned technical proposal of the present invention has advantages below compared with prior art:
The invention provides a kind of A2L files automatic generation method and system, imports sound code file and sound code file is entered
After the mapped file generated after row compiling, needs can be obtained from mapped file according to configuration file and generated in A2L files
Configuration information, being obtained according to mark file from sound code file is needed to generate the other information in A2L files, and last basis is matched somebody with somebody
Confidence ceases and other information generates A2L files and exports corresponding journal file.Therefore, A2L files of the present invention are given birth to automatically
Into method and system, when sound code file is changed, without being changed one by one by manually proofreading to original A2L variable relevant portion
Move and meet the new A2L files of exploitation demand to generate, and need to only use A2L files automatic generation method of the present invention and
System, you can automatically generate the new A2L files for meeting product development demand, and if emerged in operation problem, by analyzing day
Will file can quickly find out the failure during A2L file generateds, improve the efficiency of product development, be opened shortening product
Manual compiling is it also avoid while sending out the cycle and changes the defects of error rate brought of A2L files is high.
Brief description of the drawings
In order that present disclosure is more likely to be clearly understood, specific embodiment and combination below according to the present invention
Accompanying drawing, the present invention is further detailed explanation, wherein
Fig. 1 is the flow chart of A2L files automatic generation method described in embodiment 1;
Fig. 2 is the flow chart of A2L files automatic generation method described in embodiment 2;
Fig. 3 is the structured flowchart of A2L files automatic creation system described in embodiment 3.
Embodiment
Embodiment 1
A kind of A2L files automatic generation method is present embodiments provided, as shown in figure 1, comprising the following steps:
The mapped file for importing sound code file and being generated after being compiled to sound code file.
Being obtained according to configuration file from the mapped file needs to generate the configuration information in A2L files.
Being obtained according to mark file from the sound code file needs to generate the other information in A2L files.
According to the configuration information and other information generation A2L files and export corresponding journal file.
In concrete application, sound code file (* .c*.h) can be compiled using tasking softwares, naturally it is also possible to select
Take other types of composing software.After being compiled to sound code file, it is possible to generate mapped file (* .map), mapped file
In include the address that name variable (variable index quantitative and measurement amount) and variable store in memory, pass through scanning mapping
File, it is possible to get corresponding variable and address., can be according to configuration file after importing sound code file and mapped file
(map.cfg) being obtained from mapped file needs to generate the configuration information in A2L files, according to mark file (a2l.cfg)
Being obtained from sound code file needs to generate the other information in A2L files, is finally generated according to configuration information and other information
A2L files (* .a2l) simultaneously export corresponding journal file (* .log).
A2L files automatic generation method described in the present embodiment, when sound code file is changed, without the change to original A2L
Amount relevant portion meets the new A2L files of exploitation demand by manually proofreading to change one by one to generate, and need to only use this hair
Bright described A2L files automatic generation method and system, you can the new A2L files for meeting product development demand are automatically generated,
And if emerged in operation problem, the failure during can quickly finding out A2L file generateds by analyzing journal file, improve
The efficiency of product development, it also avoid while product development cycle is shortened manual compiling and change what A2L files were brought
The defects of error rate is high.
Embodiment 2
On the basis of embodiment 1, the A2L file automatic generation methods described in the present embodiment, as shown in Fig. 2 according to
Putting file and being obtained from the mapped file needs the process of configuration information of the generation in A2L files to comprise the following steps:
The relevant information of configuration demarcation address field, measurement address field and keyword, accordingly generates configuration file, and described
The relevant information of keyword is according to ASAP2 standard configurations.
The mapped file is scanned according to the configuration file, looked into respectively in demarcation address field, measurement address field
Scalar quantity and measurement amount are found out, and using the relevant information of the scalar quantity, the measurement amount and the keyword as needs
Generate the configuration information in A2L files.
ASAP2 standards (Application Systems Standardization WorkingGroup) are a set of obtain
The matching and calibration specification that industrial quarters is widely recognized as., can be to the data exchange used during exploitation by the implementation of the specification
Method and soft and hardware instrument are standardized, so as to reduce the development cost of vehicle electric field and shorten the construction cycle, to protect
Demonstrate,prove product quality.In concrete application, it can configure crucial in flash demarcation address field, measurement address field and ASAP2 standards
Word MEMORY-SEGMENT relevant information (including variable maximum, minimum value, address, span, unit, precision,
The information such as offset) so that above-mentioned configuration information meets the relevant regulations of ASAP2 standards.
As a preferred mode, as shown in Fig. 2 being obtained according to mark file from the sound code file needs to generate
The process of other information in A2L files comprises the following steps:
The mark specification of sound code file is configured, and generates the mark file for including the mark specification, the mark specification
In give unique mark corresponding to same data message.
After the processing be scanned according to the mark file to the sound code file, parsed, by the sound code file
Data message be configured to identify corresponding to its, obtain the sound code file after mark.
The other information found out from the sound code file after the mark in addition to the scalar quantity and the measurement amount is made
To need to generate the other information in A2L files.
In concrete application, because the source code style of each company may be different, for example company A may be in source code
The middle AXIS represented using data type MOUDLE_AXIS in A2l files, and B companies may use AXIS_ in source code
UNIT8 represents the AXIS in A2l files.Complete then to need configuration identifier file to the code scans of two above company
(a2l.cfg).In identifying file by the AXIS_ in MOUDLE_AXIS the and B companies source code in company A source code
UNIT8 is uniformly configured to recognizable AXIS marks.By the way that the data message of same content is represented with same mark, gram
Each intercompany in the prior art has been taken because caused by source code style difference the defects of product development matching difference, be the later stage from
It is dynamic to generate A2L document laids basis.
As a preferred mode, as shown in Fig. 2 generating A2L texts according to the configuration information and the other information
Part simultaneously exports the process of corresponding journal file and comprised the following steps:
The configuration information and the other information are integrated, sorted and deleted unnecessary scalar quantity and measurement amount
After processing, the final information for generating A2L files is got, generation includes the A2L files of the final information.
The journal file of output record A2L file generated processes.
In concrete application, the operation integrated, sorted is handled according to the relevant regulations of ASAP2 standards,
For example regulation variable will be ranked up according to alphabetical order in ASAP2 standards, then will to the configuration information and it is described its
He is ranked up information according to alphabetical order to variable.ASAP2 is complied fully with by the A2L files generated after above-mentioned processing
The relevant regulations of standard, matching is good, improves the development efficiency of product.
In concrete application, the software development environment (Microsoft of Microsoft can be utilized according to ASAP2 international standards
Visual Studio 2005) perform aforesaid operations.During A2L files are generated, according to mapped file (* .map) and bag
Source code file (* .c*.h) containing control strategy generates A2L files (* .a2l), INCA or other marks according to ASAP2 standard
The information that determining instrument can provide according to A2L files carries out on-line proving and measurement.A2L files described in the present embodiment are given birth to automatically
Into method, A2L files can be quickly generated, and is easy to change and checks, the work difficulty of control engineer can be substantially reduced, carried
High development efficiency, shorten the construction cycle.
Embodiment 3
A kind of A2L files automatic creation system is present embodiments provided, as shown in figure 3, including:
Gatherer, for the mapped file for importing sound code file and generating after being compiled to sound code file.
First acquisition device, need to generate in A2L files for being obtained from the mapped file according to configuration file
Configuration information.
Second acquisition device, generated for obtaining needs from the sound code file according to mark file in A2L files
Other information.
Output device is generated, for generating A2L files according to the configuration information and the other information and exporting corresponding
Journal file.
As a preferred mode, first acquisition device includes:
First dispensing unit, for configuring demarcation address field, measurement address field and the relevant information of keyword, give birth to accordingly
Into configuration file, and the relevant information of the keyword is according to ASAP2 standard configurations.
First query unit, for being scanned according to the configuration file to the mapped file, demarcation address field,
Measurement address field finds out scalar quantity and measurement amount respectively, and by the scalar quantity, the measurement amount and the keyword
Relevant information generates the configuration information in A2L files as needs.
As a preferred mode, second acquisition device includes:
Second dispensing unit, for configuring the mark specification of sound code file, and generate the mark for including the mark specification
File, it is described to identify the unique mark given in specification corresponding to same data message.
Unit is identified, for being scanned according to the mark file to the sound code file, after the processing that parses, by institute
State the data message in sound code file to be configured to identify corresponding to it, obtain the sound code file after mark.
Second query unit, for being found out from the sound code file after the mark except the scalar quantity and the measurement
Other information outside amount generates the other information in A2L files as needs.
As a preferred mode, the generation output device includes:
Generation unit, for being integrated, being sorted and being deleted unnecessary mark to the configuration information and the other information
After the quantitative and processing of measurement amount, the final information for generating A2L files is got, generation includes the final information
A2L files.
Output unit, for exporting the journal file of record A2L file generated processes.
A2L files automatic creation system described in the present embodiment, when sound code file is changed, without the change to original A2L
Amount relevant portion meets the new A2L files of exploitation demand by manually proofreading to change one by one to generate, and need to only use this hair
Bright described A2L files automatic generation method and system, you can the new A2L files for meeting product development demand are automatically generated,
And if emerged in operation problem, the failure during can quickly finding out A2L file generateds by analyzing journal file, improve
The efficiency of product development, it also avoid while product development cycle is shortened manual compiling and change what A2L files were brought
The defects of error rate is high.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the form of the embodiment in terms of the present invention can use complete software embodiment or combine software and hardware.Moreover,
The present invention can use one or more wherein include computer usable program code computer-usable storage medium (including
But be not limited to magnetic disk storage, CD-ROM, optical memory etc.) on the form of computer program product implemented.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then can make other change and modification to these embodiments.So appended claims be intended to be construed to include it is excellent
Select embodiment and fall into having altered and changing for the scope of the invention.