XCP-Ray – measurement and calibration with XCP
==============================================

Free to use (freeware, see LICENSE.txt). Linux x86-64 with X11 (also XWayland), glibc 2.38 or
newer (e.g. Ubuntu 24.04+, Debian 13+, Linux Mint 22+, Fedora 39+).

bin/
  xcpray-gui      the measurement and calibration tool
  xcpray-cli      the same on the command line (info, get, set, measure, console)
  xcp-sim          simulated XCP ECU (CAN, UDP/IP or serial), also sends DBC test patterns
  x1-elf2a2l       A2L from an ELF file (DWARF) and a short variable list
  x1-a2l-studio    A2L from and with an ELF file: update addresses, conversion rules
  x1-dbc           show/decode DBC files
  x1-rec           inspect recordings
  x1-a2l           inspect A2L files
  x1-candump / x1-cansend   SocketCAN helpers

examples/
  can_demo.x1p     a project: simulated ECU (XCP on CAN) and a vehicle bus (DBC) on vcan0

Quick start without hardware
----------------------------

  sudo modprobe vcan
  sudo ip link add dev vcan0 type vcan
  sudo ip link set vcan0 mtu 72 up

  cd examples
  ../bin/xcp-sim vcan0 --dbc vehicle.dbc &        # ECU + bus traffic
  ../bin/xcpray-gui -P can_demo.x1p               # then Measurement > Start (F5)

Real CAN hardware
-----------------

Any SocketCAN adapter (e.g. PEAK PCAN-USB with the kernel driver peak_usb). XCP-Ray sets the bit
rate itself; that needs the right CAP_NET_ADMIN. Grant it once in a terminal (XCP-Ray never runs
sudo itself; when the right is missing it shows this command with the full path to copy):

  sudo setcap cap_net_admin+ep bin/xcpray-gui bin/xcpray-cli

Then Devices > Add ECU: the A2L file, transport "XCP on CAN", the interface (e.g. can0).

Arduino and ESP32
-----------------

The kits (separate downloads) extend existing Arduino (AVR) and ESP32 projects with XCP: over the
USB serial port with the print output in a console of the tool, or over the network (XCP on UDP/IP).
The A2L file is generated from the firmware's ELF file after every build.
