Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.197

XCP

The XCP plug-in is a lightweight implementation of an XCP slave.  It enables measuring and calibrating of the target ECU without impacting overall ECU’s performance or memory footprint.

It is an interface between a measurement / calibration tool like CANoe or CANape and the rest of the tools stack down to the target ECU.  All microcontrollers, supported by iSYSTEM tools, can be handled by the XCP plug-in. It enables the measurement and calibration of an ECU without the need of any slave code on the ECU, without performance degradation to the ECU operation and without the need for a physical interface (like CAN, FlexRAY, …), other than the ECUs CPU debug or trace ports.

The XCP plug-in supports polled mode access, where access is directed from the XCP master and also high speed data acquisition, where data accesses are directed by the emulator (iC5000, iC5700, …) and streamed to the XCP master.

 

 

Features

Synchronous data acquisition (DAQ)

Direct memory access (polling)

Online memory calibration (read / write access)

Time stamped data transfer, generation of event timestamps by the ECU/Emulator

Trace-to-XCP bridge

A2L file generation

 

 

Limitations

Ethernet transport layer supported only

Only dynamic DAQ list supported

Bypassing is not supported

Block mode is not supported

Resume mode is not supported

Checksum is not supported

Dynamic event list (Plug-and play) is not supported

 

 

Performance Characteristics

Characteristics

Value

Timestamp resolution

1 µs

Min sampling interval – polling

1 ms

Min sampling interval – DAQ

100 µs

Bypassing latency time

< 500 µs

Max DAQ events

256

Max DAQ per Event

1

Max ODT entries

256

Max ODT entry size

8 bytes

 

 

Architecture

 

Click to enlarge

 

 

Usage

The XCP master (i.e. CANoe, CANape) and the XCP slave (winIDEA XCP plugin) must be configured properly to establish communication. The TCP port should match. If the master and slave are on different host, you will have to configure the addresses accordingly, by default the communication is setup for localhost connection.

 

 

General setup

 

number1

Open  the XCP plugin in winIDEA via View menu / XCP.

 

XCPopen

 

 

number2

Enable the Status Window of the XCP plugin via View menu / XCP/ Status window.

 

Plugin-xcp-statusWindow

 

 

XCP slave configuration

Plugin-xcp-conf
Plugin-xcp-edit

 

 

XCP master configuration (i.e. CANoe)

Plugin-xcp-masterConf

 

 

Modes of operation

The XCP plug-in enables ECU measurement (ECU’s memory observation) and ECU calibration (ECU’s memory write). In all cases, it is the master’s (CANoe, CANape) responsibility to set-up the measurement environment.

The ASAM 2MC configuration file (extension .A2L) is a good starting point to prepare the measurement environment. A default WINIDEA_XCPSERVER.A2L file is provided by iSYSTEM for easy start-up.

On the master side, data acquisition may be configured as DAQ or Polling. DAQ is recommended as data acquisition is much faster and the sampling interval more consistent.

 

 

DAQ

In DAQ mode, data acquisition is performed by the emulator.  For maximum performance, disable »Real time memory-access« in Debug / Options / Memory Access. If real-time memory access is enabled and in use, the debugger and the DAQ aquisition subsystem will compete for resources, resulting in a slower or less stable sampling interval.

 

Plugin-xcp-memAccess-ena
Plugin-xcp-update

 

 

Example

DAQ configuration in CANoe:

 

Plugin-xcp-daqConf

 

 

In this case, iXcpArray_01 variable will be sampled by the emulator at a maximum sampling rate. Whenever a variable changes, an event is triggered and  data streamed to the XCP master. When DAQ is running, this is clearly indicated on the XCP's plugin main page.

 

Plugin-xcp-xcpStatus

 

 

DAQ Performance issues

General performance is indicated in the line »DAQ average/desired sampling time (us)«. Desired sampling time comes from minimum required event sampling time (see table):

 

DAQ event name

DAQ event number

Desired sampling rate (ns)

max_rate

0

max possible rate

1ms

1

1.000

10ms

2

10.000

100ms

3

100.000

1s

4

1.000.000

 

If average sampling time exceeds the desired minimum required sampling time, the status line appears in red, clearly warning the end user of irregular sampling conditions.

 

Please take care when deciding on event number.  Events 0 and 1 cause a lot of traffic on the debug port, which could lead to irregular measurement conditions.

 

 

Polling

When the polling mode is used the memory access requests are generated by the master.  The XCP commands (read and/or write to ECU’s memory) are processed sequentially by the XCP slave. The statistics are clearly displayed in the “XCP statistics” section.  

 

Warning40x40

Real-time memory access under Debug / Options / Memory Access must be ENABLED in this case.

 

Plugin-xcp-memAccess-ena

 

 

Example

Polling configuration in CANoe:

Plugin-xcp-pollingConf

 

 

In this case, every 100 ms a read request is forwarded to the XCP plugin, which reads the ECU’s memory. Statistics about the operation of the plug-in in this mode are shown on the XCP plugin statistics section:

Plugin-xcp-statistics

 

If real-time memory access is not enabled, access to ECU’s memory is disabled. Statistics under XCP memory reads total/errors show the number of unsuccessful attempts.  ERR_ACCESS_DENIED is returned to the master.

 

 

Trace-to-XCP

Trace-to-XCP feature allows an XCP master to acquire the data from the target ECU which has been collected by winIDEA by a means of trace. This allows a tightly controlled data sampling with exact period.

 

 

The XCP plugin window

Plugin-xcp-window

 

 

Command buttons to start, stop, A2L File Generation and XCP plugin configuration.

The status line displays the general XCP plugin status (Stopped, Running / Listening).

The master (client) info displays  the master connection status (whether a master is connected or not)

The XCP statistics display overall XCP commands statistics. Memory reads, writes and errors are reported separately.

The DAQ statistics display the overall DAQ acquisition performance.

 

 

XCP plugin configuration options

Configuration options are displayed in a separate window.  

Option

Description

Port

(Listening) communication port of the XCP plugin.

Auto-Start

Sets whether the XCP plugin is started automatically.

TimestampUnit

Timestamp unit in DTO XCP packets

TraceToXCP

Configuration of Trace-to-XCP feature

Enable

Use trace as a data source instead of data acquisition performed by the emulator

SendAlways

Send data even if there was no change since the last transmission. Deselecting this can greatly reduce the XCP master load at high sampling frequencies.

TrdPath

Path to winIDEA Analyzer recording, which contains trace configuration of the sampled data.

A2LPath

Path to the generated A2L file, which contains the generated DAQ events.

 

 

A2L (ASAM) file generator

For easier integration with popular XCP master applications (i.e. Vector CANoe, Vector CANape), simple A2L file generator is embedded into the XCP plugin. Invoke it either by pressing the “gear” icon or, alternatively, from View / XCP / Generate A2L file.

Plugin-xcp-status-1

 

 

Main window of the A2L (ASAM) file generator appears:

Click to enlarge

 

 

On startup, the generator connects to winIDEA instance and reads available global variables from all downloaded files.

 

Warning40x40

Target application should be downloaded to successfully read global variables.

Simple variables, arrays and structures with simple member expansion are supported.

For diagnostics purposes, startup sequence is logged in the “Generator output” field.

Variable is prefixed with download file name, if more than one exists.    

 

 

In the left list box (Available variables), select variables, which shall be monitored by  XCP plugin:

Click to enlarge

 

 

Move selected ( > ) or all( >>> ) to the right list box (Selected variables)

Click to enlarge

 

 

Press “Generate” to start A2L FILE generation process. Generation is template-based, the template resides in $(UserProfileDir)\iSYSTEM\winIDEA\Templates\XCP\. Template is actually an ASAM file with a special $(winIDEAVariables) tag, which is replaced with observed variables data. Templates have extension .A2L.TPL.  New templates could be added / modified for specific purposes.

 

Warning40x40

Template is automatically selected, if a single template exists in the templates folder; otherwise, you must manually select one.  

Checked “Generate Writable Variable” check box generates “writable” variables, i.e. they could be manipulated through XCP protocol by XCP master.

 

 

Target A2L is generated in the workspace folder by replacing $(winIDEAVariables) tag with selected variables data and $(additionalEvents) with the optionally specified events for Trace-to-XCP. The default file name is WINIDEA_XCPSERVER.A2L.

 

 

DAQ measurement sequence

 

number1

Prepare measurement configuration on the master side.

If you have started with A2L file generator, only adoption of measurement mode is required.  Some XCP masters allow linking the ECU's MAP file with A2L observation variables; this automatically updates variable addresses.

 

For DAQ-based measurement, following events/measurement modes are available by default:

max_rate (max sampling rate on the Emulator)

1ms_loop (1ms sampling rate on the Emulator)

10ms_loop (10ms sampling rate on the Emulator)

100ms_loop (100ms sampling rate on the Emulator)

1s_loop (1s sampling rate on the Emulator)

Up to 256 events could be used (please add own to .A2L file or A2L.tpl template).

 

Warning40x40

Event will ONLY be triggered, if ANY of the observed variable(s) has changed.  

 

An example of the measurement configuration in CANape:

Click to enlarge

 

 

number2

Prepare target application.

 

number3

Run the XCP plugin.

 

Number4

Run the target application from winIDEA.

 

Number5

Start measurement from the master.

Optionally, use debugger Run control to manipulate target execution.

 

 

Trace-to-XCP measurement sequence

 

number1

Configure Analyzer to trace the variables of interest.

 

number2

Generate the A2L file.

Open View / XCP / Generate A2L file.

 

A2L-FileGenerator

In the A2L File Generator:

1. Choose variables in the Available variables.

2. Move variables to the Selected variables list.

3. Tick the Trace-to-XCP.

4. With the Time cycle and Time Unit define custom events for the XCP event list.

5. Click Generate! to create an A2L file containing the specified XCP events.

 

 

number3

Tick Enable in the Edit options dialog under the TraceToXCP.

 

Number4

Start XCP plugin.

 

Start-XCP-Plugin

 

 

Number5

Configure XCP Master.

 

 

XCP Master configuration examples

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

Warning40x40

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

 

 

Warning40x40

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© iSYSTEM AG Carl-Zeiss-Str.1 85247 Schwabhausen Germany