A2lPrep

From OpenMBD
Jump to: navigation, search

Introduction

A2lPrep is a commandline tool for preparing ASAP2 .a2l files from a C++ language target project. The .a2l file created by A2lPrep can then be loaded into HANtune for calibration. ASAP2 is a data definition standard to use for data measurement, calibration, and diagnostic systems. HANtune uses ASAP2 files for displaying parameters and signals.


A2lPrep Overview.png

A2lPrep can be used to convert manually written C-source files containing special comments together with the corresponding .map file (produced by compilation) into an ASAP2 (.a2l) file. The special comments specify meta information such as data type, conversion rules, min-max conditions, structures, arrays, etc. A2lPrep combines this meta information together with the addresses from the .map file to produce an ASAP2 file. HANtune uses ASAP2 files to tune/calibrate your target system.

No extra code-generation tools are needed to perform this operation. When you have your project prepared for communication with HANtune, you only need to compile your source code. Then the output .map file from the compiler, together with your C sources will be input for A2lPrep. A2lPrep can be integrated in your target build process.


Basic Operation

A2lPrep is a command line tool. You need to provide the input files and output file on the command line.

A2lPrep BasicOperation.png

Enter on commandline any combination of:

- Desired source files (*.c or *.h). Multiple files are allowed.
- Corresponding address file (*.sym or *.map)
- Output ASAP2 file (*.a2l). Existing file with the same name will be overwritten.

The extension is leading. Only the above extensions (upper- or lower-case) can be used.

As a prerequisite the source code needs to compile without an error.

Optional Operation

As an option, user can provide a regular expression pattern for parsing a specific address file(*.sym or *.map).

Usage: -p <patternFile> where patternFile holds filename of a file containing a regular expression. The file should hold only 1 line, providing the RegEx to be used when parsing the .map file for a specific compiler. When this commandline argument is used, A2lPrep will only be using the given RegEx? and not use its internal parsing rules.

Special Comment Syntax

If you intend to use A2lPrep for a HANtune project, please check out this guide for syntax in your Special comments: File:A2lPrep_Syntax_Guide.pdf

Download A2lPrep

An initial version of A2lPrep is now available for download.