Generate A2L Files

During generation, the ARXML to A2L Converter (McDataConverter) from your MICROSAR delivery creates A2L files with the measurement and calibration data of the BSW modules and the SWCs. You control the conversion with settings in file <project-folder>/Settings/General.json.

A2L Settings in General.json

The A2L settings are located in the miscellaneous object. The output folder for the generated A2L files is located in the folders object.

  "folders": {
    "mcData": "../Output/Source/McData"
  },
  "miscellaneous": {
    "a2lGenerator": {
      "a2lMasterFile": "../Config/McData/Master.a2l"
    },
    "amdGenerateDebugData": false
  }

Relative paths are relative to the location of General.json.

Table 1. A2L settings in General.json
JSON key Type Description

folders.mcData

String

Output folder for the generated A2L files.

miscellaneous.a2lGenerator

Object

Configuration of the ARXML to A2L Converter. The ARXML to A2L Converter step is only available if this object is set.

miscellaneous.a2lGenerator.a2lMasterFile

String

Path to the A2L master file that the McDataConverter uses. If no master file is set, the generation shows a warning.

miscellaneous.a2lGenerator.a2lGeneratorAddParams

String

Additional command-line options that DaVinci Configurator passes to the McDataConverter. See Additional Parameters for the McDataConverter.

miscellaneous.amdGenerateDebugData

Boolean

Set to true to add variable descriptions of the BSW modules to the McSupportData. Measurement tools can then monitor these variables. This option requires a license.

Additional Parameters for the McDataConverter

DaVinci Configurator calls the McDataConverter with a fixed set of options and appends the value of a2lGeneratorAddParams to the command line. Separate options with spaces. Enclose values that contain spaces in quotation marks.

  "miscellaneous": {
    "a2lGenerator": {
      "a2lMasterFile": "../Config/McData/Master.a2l",
      "a2lGeneratorAddParams": "-cmdi -rgh"
    }
  }

DaVinci Configurator always sets the following options. Do not add them to a2lGeneratorAddParams.

  • -b: base name of the generated A2L files

  • -o: output directory, from folders.mcData

  • -s: folder of the SIP license file

  • -a: McSupportData file

  • -m: A2L master file, from a2lMasterFile

  • -sdi: shorten display identifiers

  • -w: workflow option for the interaction with the generator proxy

  • -f: write the output file even if its content has not changed. By default, the McDataConverter only updates the output file if the content changes. DaVinci Configurator does not pass -f if conditional file writing is enabled.

You can add the following options. The descriptions are from the command-line help of McDataConverter version 1.02.18.

Table 2. Options for a2lGeneratorAddParams
Option Description

-av <number>, --a2lversion=<number>

A2L version of the output. Values: 140, 151, 161, 170, 171. Default: 171. The McDataConverter creates the output file in this A2L version, regardless of the A2L version of the master file.

-pxc <string>, --pathtoxcpchecksum=<string>

Path to the XCP checksum.

-rsp <string>, --rambuffersinglepointer=<string>

Symbol for the RAM buffer. Any string is allowed. Default: Rte_CalibrationBuffer.

-gc, --groupcreation

Creates groups in the new style. Without this option, the McDataConverter uses the legacy style and creates one group for each BSW module. For the RTE, these groups can be deeply nested. The new style requires McGroup definitions in the McSupportData, in hierarchies of any depth. The McDataConverter then creates groups in the A2L files that reflect this hierarchy.

-cs, --createstructure

Creates structures.

-crs, --createromsymbols

Creates ROM symbols for the InitRAM emulation method.

-cmdi, --createdisplayid

Creates display identifiers if none are configured.

-pdi <val>, --processDisplayIdentifier=<val>

Uses the ShortNameFragment to create display identifiers. Values: full, portandvariable, variable, ignore. Default: ignore.

-ptv <string>, --prioritytagverbaltable=<string>

Selects the source tag for verbal table literals. Values: symbol, shortLabel, vt. If you do not set this option, the McDataConverter uses symbol. If no symbol is defined, it uses vt, and if no vt is defined, it uses shortLabel. This is the same order as in the AUTOSAR Software Component Template.

-rgh, --reducegrouphierarchy

Condenses overly deep group hierarchies.

-wamd, --workaoundmultidim

Forces the generation of multi-dimensional arrays. Available as of McDataConverter version 1.2.10.

-i, --information

Displays information-level output.

-v, --verbose

Displays verbose output.

To show all options of your McDataConverter version, run DVMcDataConverter.exe --help in folder <SIP>/Misc/McDataConv/Application of your MICROSAR delivery. On Linux, the converter is in folder <SIP>/Misc/McDataConv/ApplicationLinux.

Migrated Projects

When you migrate a project from version 5, the Project Migration Tool transfers the DPA entries A2LMasterFile and A2LGeneratorAddParams to the a2lGenerator object. The tool moves the path of the master file to the Config/McData folder.

Additional information