Xilinx Virtual Cable (XVC) implementation using gpiod
Project description
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file xvc_gpiod-0.1.1.tar.gz.
File metadata
- Download URL: xvc_gpiod-0.1.1.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73cc0e6943f4896527e43cba88e0816e511131fca0b24ffc9e2486a09cfed9df
|
|
| MD5 |
f9d4585c37e6f9cdd988ab0ef4547b01
|
|
| BLAKE2b-256 |
57774966e2b7a982635adf76e4cff907bf6098e374f17521dafe0e91fda5228c
|