Skip to main content

xvc-gpiod

A small Linux GPIO-based implementation of the Xilinx Virtual Cable (XVC) protocol, meant as a simple reference for developing and testing XVC-compatible clients, not for production use.

The JTAG interface is implemented using GPIO bit-banging via the Linux GPIO Character Device Userspace API and therefore runs only on Linux systems.

Protocol Version

This software implements version 1.0 of the XVC protocol. For more details on the protocol, see the official documentation.

Requirements

  • Python >= 3.10
  • Linux system with a GPIO character device interface (e.g., /dev/gpiochip0)
  • Client software with XVC support (for example, OpenOCD)

Installation

This section explains how to install xvc-gpiod, either from PyPI or from source code.

From PyPI

pip install xvc-gpiod

From Source Code

git clone https://gitlab.zapb.de/zapb/xvc-gpiod.git
cd xvc-gpiod
pip install .

Usage

This section describes how to set up and use xvc-gpiod: first wire the JTAG signals to GPIO pins, then start the xvc-gpiod daemon, and finally connect an XVC-compatible client.

Hardware Setup

Any Linux device that exposes a GPIO character device interface should work. The software has been tested on Raspberry Pi and BeagleBone Black boards.

The GPIO line column shows the GPIO line number as exposed by /dev/gpiochipN, not the physical header pin number. Refer to your board's pinout to map header pins to GPIO lines.

Raspberry Pi

On Raspberry Pi, you can use the following JTAG pin mapping:

JTAG signal Pin GPIO line
TDI 10 10
TMS 25 25
TCK 11 11
TDO 9 9

Then start the software with the following command:

xvc-gpiod --chip /dev/gpiochip0 --tms 25 --tdi 10 --tck 11 --tdo 9

BeagleBone Black

On BeagleBone Black, you can use the following JTAG pin mapping:

JTAG signal Pin GPIO line
TDI P8.12 12
TMS P8.16 14
TCK P8.15 15
TDO P8.11 13

Then start the software with the following command:

xvc-gpiod --chip /dev/gpiochip0 --tms 14 --tdi 12 --tck 15 --tdo 13

Client Connection

After the target is connected to your device via GPIO and the xvc-gpiod daemon is running, you can connect your client.

In the example below, OpenOCD is used as the client with an APM32F407-series microcontroller from Geehy:

openocd -c "adapter driver xvc" -c "xvc host localhost" -c "xvc port 2542" -f target/geehy/apm32f4x.cfg

By default, xvc-gpiod listens on localhost and 2542.

Credits

The following projects served as inspiration:

License

This project is licensed under the GNU General Public License v3.0 or later. See the LICENSE file for details.

Support

If you appreciate the project, feel free to donate on Liberapay:

Liberapay donation link

Metadata

Release files for xvc-gpiod 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xvc-gpiod 0.1.1
File Size Uploaded
xvc_gpiod-0.1.1.tar.gz 17.9 kB Details

Release files / xvc_gpiod-0.1.1.tar.gz

Download URL xvc_gpiod-0.1.1.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
73cc0e6943f4896527e43cba88e0816e511131fca0b24ffc9e2486a09cfed9df
BLAKE2b-256 checksum
How to use checksums
57774966e2b7a982635adf76e4cff907bf6098e374f17521dafe0e91fda5228c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page