Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.246

Navigation: Plugins > General plugins > XCP Slave plugin

Scroll Prev Top Next More

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. Integration examples could be found in winIDEA examples/XCP folder.

 

Integration with VECTOR CANoe

Warning_orange

XCP support in CANoe is optional. CANoe option .XCP or .AMD is required to activate XCP support. Please contact Vector for further information.

 

Prepare ASAM2 2MC (A2L) file

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, so-called Event list.  The Event list contain one or more events.

 

 

Usage of XCP 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.  

 

Plugin-xcp-deviceConf

 

 

However, inside the emulator, changes are detected by the internal loop, which is cyclic. Following table describes 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

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 ""
UWORD NO_COMPU_METHOD 0 0 0 65535
ECU_ADDRESS 0x20000068
FORMAT "%.15"
/begin IF_DATA CANAPE_EXT
  100
  LINK_MAP "iXcpCounter_100ms" 0x20000068 0x0 0 0x0 1 0x8F 0x0
  DISPLAY 0 0 65535
/end IF_DATA
/end MEASUREMENT

 

 

Warning_orange

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 VECTOR CANape

Integration with CANape is somehow similar to integration with CANoe with more measurement setup flexibility. Following screenshots may show/help how to prepare a  measurement environment.

 

Plugin-xcp-listening

Prepare target application, turn on BlueBox emulator, start winIDEA and run the XCP plug-in.

Plugin-xcp-integration-2

In CANape, start a new configuration

Plugin-xcp-integration-3

Create a new device from an existing database.

Plugin-xcp-integration-3-1

Use a predefined WINIDEA_XCPSERVER.A2L database.

Plugin-xcp-integration-4

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)

Plugin-xcp-integration-4-1

If 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 connection establishment, simply put ECU offline.

Plugin-xcp-integration-4-2
Plugin-xcp-integration-5

Register linker map file with WINIDEA_XCPSERVER in device configuration.  That's the 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.

Plugin-xcp-integration-6

Now 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.

Plugin-xcp-integration-7

Configure measurement. Now you are ready to select the desired event(s) and attach variable(s).

Plugin-xcp-integration-8-1

Prepare measurement windows.

Plugin-xcp-integration-8-2

Select observed variables.

Plugin-xcp-integration-9-1

Start measurement.

Plugin-xcp-integration-9-2

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..)  

 

Copyright © 2024 TASKING Germany GmbH