Main Content

Configure AUTOSAR Adaptive Data for Run-Time Calibration and Measurement

AUTOSAR Blockset enables you to configure run-time calibration of adaptive application data based on XCP slave communication and ASAP2 (A2L) file generation. The XCP and ASAP2 capabilities are defined outside the Adaptive Platform (AP) specification, which as of Release 19-11 does not address data calibration.

As part of generating and deploying adaptive code, you can configure interfaces for XCP slave communication in the generated C++ code and export A2L files containing model data for calibration and measurement.

Before deploying adaptive code:

  • In the Configuration Parameters dialog box, configure the model to generate XCP slave function calls in adaptive C++ code and to generate an XCP section in an ASAP2 (A2L) file.

  • In the Share gallery under the AUTOSAR tab of the model, use Generate Calibration Files to generate ASAP2 (A2L) files that contain model data for calibration and measurement.

Configure XCP Communication Interface in Generated Code

To enable the communication capability, use the AUTOSAR adaptive model configuration parameter Transport layer (Embedded Coder) to select an XCP transport layer. When Transport layer is set to a value other than None, Simulink® adds XCP slave function calls to the generated C++ code. By default, the tool uses the MathWorks® XCP Slave stack.

Selecting an XCP transport layer enables other XCP parameters. This image shows the XCP slave model configuration parameters.

Using the model configuration parameters, you can:

  • Specify the transport layer that you want to use for communication.

  • Specify the target machine IP address and port number. You can use the port for only one application.

  • Optionally, enable verbose messages for XCP slave.

  • Optionally, instead of the MathWorks XCP slave, you can use a custom XCP slave implementation based on the Ethernet transport layer. To use a custom XCP slave, provide implementations for the functions declared in the XCP slave header file by using the custom XCP slave API commands. The XCP slave header file is located in the MATLAB® installation folder matlabroot/toolbox/coder/autosar/adaptive_deployment/include.

  • Add custom XCP slave details in the configuration parameter Toolchain details or add the details manually to the CMakeLists.txt file.

To generate ASAP2 (A2L) files, use Generate Calibration Files from the Share gallery under the AUTOSAR tab of the model. For more information, see Generate ASAP2 and CDF Calibration Files (Simulink Coder).

See Also

(Simulink Coder) | (Embedded Coder)