XCP Master configuration examples
In this topic:
•Integration with VECTOR CANoe
•Integration with VECTOR CANape
In this section, some popular XCP master applications and required configuration setup are described. You can find integration examples in the XCP folder located in the main winIDEA directory.
XCP support in CANoe is optional. CANoe option .XCP or .AMD is required to activate XCP support. Please contact Vector for further information. |
To startup with CANoe, correctly defined ASAM 2MC configuration file (A2L) is crucial for correct configuration. A2L File Generator is a good starting point.
CANoe includes a specialized ASAP2 file viewer, which allows A2L file preview. Appropriate tool is required to create/modify the ASAP2 file (i.e. ASAP2 editor).
However, it could easily be adjusted by a simple text-editor (since A2L file is a text file).
Essential sections of A2L file are:
•IF_DATA XCP section
•MEASUREMENT section
The IF_DATA_XCP section describes the essential XCP plugin properties. Use complete IF_DATA_XCP section in your target ECU A2L file to enable correct XCP data exchange.
This section provides a very important part, called Event list. The Event list contains one or more events.
Events are placeholders for variable observation. Each event has a unique ID. Max 255 could be used with the XCP plugin. From the master point of view, all events are trigger-based events (not cyclic); it means, XCP message would be transmitted to the master only if variable change is detected by XCP plugin. Setting the event type to cyclic in A2L file doesn’t make sense: their behavior is predefined in XCP plugin and is based on the event ID.
However, inside the emulator, changes are detected by the internal loop, which is cyclic. The following table describes an event’s internal cycle interval:
Event ID |
Event name |
Sampling cycle time |
---|---|---|
0 |
max_rate |
fastest possible rate (min 100 µs cycle) |
1 |
1ms_loop |
1 ms |
2 |
10ms_loop |
10 ms |
3 |
100ms_loop |
100 ms |
4 |
1s_loop |
1 s |
The MEASUREMENT section defines observed variables measurement and their relation to XCP events. This part should be adjusted to actual ECU memory layout and desired observation cycle time.
Example:
/begin MEASUREMENT iXcpCounter_100ms "" |
If the target ECU memory layout changes, the A2L file should be updated somehow. Vector provides special tools for such purposes. For example, the ASAP2 Updater reads an ASAP2 source file and updates the address and data type information on the basis of the entries in a linker map file. The most prevalent linker MAP formats are supported, such as IEEE, COFF, ELF and the ASCII map formats of many compilers. |
Integration with CANape is somehow similar to integration with CANoe with more measurement setup flexibility. The following screenshots may show/help how to prepare a measurement environment.
Prepare: |
•Target application
•Turn on the BlueBox
•Start winIDEA
•Run the XCP plugin
In CANape, create a New configuration. |
Create a New Device from an existing database. |
Use a predefined WINIDEA_XCPSERVER.A2L database.
After CANape loads the database file, it immediately tries to establish the communication with the winIDEA XCP plugin. If successful, the XCP plugin updates master (client) info and number of received XCP commands. CANape updates its own status, too. CANape allows manual communication manipulation to XCP server (bring online/offline, activate/deactivate device)
If the connection fails, review the TCP/IP communication options in CANape and diagnostic info on the XCP plugin.
![]() |
![]() |
Single master connection to XCP slave is allowed only! If you experience trouble with establishing connection, simply put the ECU offline. |
Go to Device Configuration and register the linker map file with WINIDEA_XCPSERVER. |
In this way LINKER and CANape exchange target ECU memory and variable addresses. If the source code of the ECU is modified, a map file would be modified as well (when the project is recompiled and re-linked). CANape detects such map file modification and refreshes the A2L file automatically.
Edit the A2L file with the internal Database Editor. |
It allows variable definition and other ECU parameters. Variables could be simply linked to a map file.
Configure Measurement. |
You are now ready to select the desired event(s) and attach variable(s).
Prepare Measurement windows. |
Select observed variables. |
Start Measurement. |
DAQ progress is updated on the XCP plugin status window:
During measurement, full debug/trace control is possible in winIDEA (Stop, Step, Step over, Run, Run until return..). |