autosar.code.exporta2l

Generate ASAP2 (A2L) file for model

Description

example

autosar.code.exporta2l(modelName) generates ASAP2 (A2L) file for the modelName.

example

autosar.code.exporta2l(modelName,Name,Value) specifies additional options for ASAP2 (A2L) creation with one or more Name, Value pair arguments. For example, you can specify a location where to save the A2L file. You can provide the symbol file of the model to replace ECU addresses in the A2L file. You can specify the model class instance name to be used in A2L file.

Examples

collapse all

Generates A2L file for the selected model and saves it in the build folder of the model.

% Generate A2L file for AUTOSAR adaptive model
autosar.code.exporta2l('modelName')

Generates A2L file for the selected model and saves it in the specified folder.

% Export A2L file to specified path
autosar.code.exporta2l('modelName','Folder','/home/temp/workspace/')

Generates A2L file for the selected model with ECU addresses based on the ELF symbol file associated with the adaptive application executable.

% Generate A2L file for AUTOSAR adaptive model
autosar.code.exporta2l('modelName','MapFile','model.elf')

Specify the name of the model class instance. The objName is declared in the global namespace.

% Use custom specified name as object name in A2L file
autosar.code.exporta2l('modelName','ModelClassInstanceName','objName')

% Specify the name of model class instance declared inside the namespace. Here instance customObj
% is declared in customNameSpace
autosar.code.exporta2l('modelName','ModelClassInstanceName','customNamespace::customObj')

Input Arguments

collapse all

Example: 'MyModel','adas_app'

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'MapFile','model.elf' generates A2L file for the model with debug mapping information from the model.elf file.

Full path to a folder in which to place an exported A2L file.

Example: 'Folder','/home/temp/arxml/'

Name of the model symbol file that contains symbols of generated code. For example, the addresses of variables used in generated code.

Example: 'MapFile','model.elf'

Custom model instance name to be used in A2L file.

Example: 'ModelClassInstanceName','customObj' or 'ModelClassInstanceName','customNameSpace::customObj'

Introduced in R2020a