Why is the XCP on CAN information missing from my generated A2L files?

12 views (last 30 days)

 I would like to get support with using the Embedded Coder to generate A2L files for XCP on CAN calibration.
My understanding is that the Embedded Coder is what generates the A2L file. This seems to work, but all the relevant information for XCP is missing. When I try to use the A2L file in XCP blocks I get an error stating that XCP data is missing. I can't seem to find any guides to generate A2L files for XCP calibration. The examples provided already show the A2L files pre-generated. I have tried different model/code generation configurations and nothing has worked... I'd appreciate some help.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 May 2025
There are two ways to specify the XCP on CAN information for your generated A2L files. The method you use depends on whether or not your target board is explicitly supported.
Unsupported Board
You may define the relevant XCP on CAN information via the 'CustomDefine' field of your models configuration settings. Once this information is specified, a model can be built and you may generate an A2L file and find the 'XCP_on_CAN' info within the file. For more information on how to generate the A2L files for your model, please refer to the following documentation on Generating Calibration Files.
The following is an example of default values for all of the CAN fields we support:
XCP_ON_CAN=1 XCP_CAN_ID_BROADCAST=0x100 XCP_CAN_ID_MASTER=0x7FD XCP_CAN_ID_SLAVE=0x7FE XCP_CAN_BAUDRATE=0x00989680 XCP_CAN_SAMPLE_POINT=0x55 XCP_CAN_SAMPLE_RATE=SINGLE XCP_CAN_BTL_CYCLES=0x14 XCP_CAN_SJW=0x03 XCP_CAN_SYNC_EDGE=SINGLE
And this can be specified in the 'CustomDefine' section here:
Supported Board
However, if your target board is supported, the same information can be specified in the configset GUI. This can be seen in the following example:

More Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!