Main Content

Generate Calibration Files

Generate ASAP2 and CDF files

Since R2021b

Description

Use the Generate Calibration Files tool to customize and generate the calibration files for a Simulink® model. You can generate an ASAP2 file, a CDF file, or both. By default, the tool generates the latest supported version of the A2L file according to ASAM MCD-2 MC standards. You can choose to generate a different version. You can customize the options for calibration files, such as the version for the A2L file and the schema type, for the CDF file. The tool remembers the last used settings, such as the version of the ASAP2 file, the option to exclude comments, the option to exclude referenced model elements, and the option to enable the ASAP2 file and CDF file generation. Simulink saves these settings in your MATLAB® preferences. The saved settings override the default settings.

Open the Generate Calibration Files

  1. Open the model.

  2. Open the Simulink Coder™ app. For AUTOSAR models, open the AUTOSAR Component Designer app. And for Simulink Real-Time™ models, open the Simulink Coder app.

  3. Generate code for the model.

  4. On the C Code tab, select Share > Generate Calibration Files.

Note

For AUTOSAR models, select Autosar > Share > Generate Calibration Files.

Examples

expand all

Configure a model to generate the latest version of the ASAP2 file with comments included.

  1. Open the ASAP2Demo model.

  2. Build the model.

  3. Open the Generate Calibration Files tool from the C Code > Share tab.

  4. Click the Generate button.

    The tool generates the ASAP2Demo A2L file and saves it in the model build folder.

Related Examples

Version History

Introduced in R2021b

See Also

(Embedded Coder)