MATLAB: Does the generated ASAP2 file not show the parameter under the CHARACTERISTIC section

a2lasap2characteristicclassEmbedded Codersimulink coderstorage

When I generate code, and enable the ASAP2 interface, the generated A2L-file does not show the parameters under CHARACTERISTIC, even though I can see them in the generated C code. Why does this happen, and how can it be resolved?

Best Answer

A data item is not represented in the ASAP2 file if any of the following conditions exist:
  • You apply one of the storage classes Auto, FileScope, or SimulinkGlobal.
  • You apply a custom storage class that causes the code generator to generate a macro or non-addressable variable.
So as long as the custom storage class does not generate a macro, or a non-addressable variable, it will show up in the A2L file. With respect to built-in storage classes, this can be achieved by selecting 'ExportedGlobal':
>> myParameter.CoderInfo.StorageClass = 'ExportedGlobal';
Once the above command is executed for the parameters and signals, the CHARACTERISTIC and the MEASUREMENT sections show up correctly in the ASAP2 file.
Please refer to the documention for more information regarding ASAP2 Files: