May 12, 2022

EZ USB fxload program

A program by the name of "fxload" exists for linux systems to support downloading firmware to these chips. This is useful if you have Cy7c68013a development boards (as I do). Also some older Xilinx FPGA products used CY7C6013 chips as an onboard USB to JTAG interface. The Digilent Spartan 3E starter board I have is one of these. Xilinx seems to have moved on to using FTDI chips on their more recent products (my Spartan dates from 2009 or so).

I run Fedora 35 and there is an fxload package for Fedora. It is significantly out of date. In particular, it expects the user to specify the target device using "-D /proc/bus/usb/004/080". This path no longer exists on current linux systems.

What you do these days is give the path:

/dev/bus/usb/004/08
This is an honest to goodness character special file IO device! I contributed my comments on this to the above Bugzilla, which is what led me to the superior version in the libusb distribution.

The following is at least one version of the source code (besides what is in the libusb/examples).

A version of fxload exists that uses libusb and allows the path to be specified via "-d vid:pid", which is much more sensible. This version is distributed (oddly enough) as part of libusb in the examples directory. I pulled this out of libusb and worked up my own Makefile and built it, placing it into /usr/local/bin.

I keep the fedora copy of fxload (which lives in /sbin/fxload). The scripts for Xilinx ISE in /etc/udev/rules.d use it and expect the old syntax.

What is missing now is a man page for the new version. The usage message is:

Usage: fxload [-v] [-V] [-t type] [-d vid:pid] [-p bus,addr] [-s loader] -i firmware
  -i        -- Firmware to upload
  -s        -- Second stage loader
  -t        -- Target type: an21, fx, fx2, fx2lp, fx3
  -d     -- Target device, as an USB VID:PID
  -p    -- Target device, as a libusb bus number and device address path
  -v              -- Increase verbosity
  -q              -- Decrease verbosity (silent mode)
  -V              -- Print program version

Other libusb resources

I wrote a program based on libusb myself that talks to the Rockchip boot loader. This has nothing much to do with fxload, but it is a code example I understand that works and does libusb programmming:
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org