Main Content


Create ASAP2 file with IF_DATA XCP block that describes the Simulink Coder XCP slave configuration



coder.xcp.a2l.addCoderXCPInfo creates the ASAP2 file modelName_CoderXCPSlave.a2l in the code generation folder. The ASAP2 file contains the IF_DATA XCP block that describes the Simulink® Coder™ XCP slave configuration.

The function:

  • Runs rtw.asap2MergeMdlRefs to merge the ASAP2 files generated from referenced models into a single ASAP2 file.

  • Runs rtw.asap2SetAddress to replace placeholder address strings with addresses extracted from the debug symbol file specified by ExtModeMexArgs.

  • In the ASAP2 file, creates:

    • An A2ML block for the ASAM MCD-1 XCP communication channel.

    • An IF_DATA XCP block that describes configuration of Simulink Coder XCP slave.

coder.xcp.a2l.addCoderXCPInfo(buildFolder) creates the ASAP2 file for the code generated in buildFolder.

coder.xcp.a2l.addCoderXCPInfo(myModel) creates the ASAP2 file containing the Simulink Coder XCP slave information for myModel.

coder.xcp.a2l.addCoderXCPInfo(buildFolder, Name,Value) creates the ASAP2 file using one or more name-value pair arguments.


Tune Parameters and Monitor Signals Through XCP and Third-Party Tools

For a workflow description, see Calibrate Generated Code and Monitor Signals Through XCP and Third-Party Tools.

Input Arguments

collapse all

Folder that contains generated model code.

Name of model that is configured for XCP external mode simulation.

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: coder.xcp.a2l.addCoderXCPInfo(buildFolder, 'OutputFile', 'myOutputFile')

If true, run rtw.asap2MergeMdlRefs.

If false, do not run rtw.asap2MergeMdlRefs.

If true, run rtw.asap2SetAddress.

If false, do not run rtw.asap2SetAddress.

Source ASAP file to use instead of buildFolder/modelName.a2l.

Output ASAP2 file name.

Introduced in R2019b