The A2L files have the following differences:
- The A2l file, generated with the "coder.asap2.export" API, contains the "MEASUREMENT" signals which are not present in the one generated with the build.
- The A2l file, generated with the "coder.asap2.export" API, does not contain "RECORD_LAYOUT" for all datatypes, while the other file contains "RECORD_LAYOUT" for all datatypes.
The first difference is because we generate the IOs (input/outputs) as "MEASUREMENT" with "coder.asap2.export" API, which was not explicitly done with the A2L generated during the build. However, if you do not want to export the IOs as "MEASUREMENT" you can choose to turn the Export "Off" via the code mappings. You can do that using the following commands:
open_system('MODELNAME');
cm = coder.mapping.api.get('MODELNAME');
setOutport(cm,'Out1','Export',true);
setInport(cm,'In1','Export',true);
You could refer to the "setInport" and "setOutport" function sections in the following documentation: The second difference is a change we introduced with the "coder.asap2.export" API. MATLAB only exports the required "RECORD_LAYOUT" to the A2L file using the "coder.asap2.export" API. However, we do have an option to include all record layouts using the "IncludeAllRecordLayouts" parameter. For more details, you can refer to the following documentation:
We recommend using the A2L file generated with "coder.asap2.export" API, as we are going to be deprecating the generation of the A2L file via the build in the future releases.