Main Content

coder.xcp.a2l.addCoderXCPInfo

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

Since R2019b

Description

example

coder.xcp.a2l.addCoderXCPInfo creates the ASAP2 file modelName_CoderXCPServer.a2l in the code generation folder. The ASAP2 file contains the IF_DATA XCP block that describes the Simulink® Coder™ XCP server 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 server.

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 server information for myModel.

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

Examples

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

For a workflow description, see Calibrate Generated Code and Monitor Signals.

Input Arguments

collapse all

Folder that contains generated model code.

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

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

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.

Version History

Introduced in R2019b