glip  0.1.0-dev
The Generic Logic Interfacing Project
Cypress FX2 libglip backend

The Cypress FX2 backend connects over a USB 2.0 connection to targets with a Cypress EZ-USB FX2 USB chip.

Configuration Options

Use the "cypressfx2" backend name with glip_new(). The following options are available:

cypressfx2 backend options
usb_dev_bus the USB bus the device is found on
usb_dev_addr the address of the device on usb_dev_bus
usb_vid the USB vendor ID of the device (for auto-discovery)
usb_pid the USB product ID of the device (for auto-discovery)
usb_manufacturer the USB manufacturer string of the device (for auto-discovery)
usb_product the USB product name of the device (for auto-discovery)

USB Device Auto-Discovery

The used USB device can either be auto-discovered or manually specified. Both mechanisms can be configured through options.

To manually specify a specific USB device to be used, set the options usb_dev_bus and usb_dev_addr. usb_dev_bus specifies the bus the device is connected to, usb_dev_addr specifies the address of the device on the given bus.

To automatically discover the used USB device, a filter with supported devices is necessary. This filter is applied to some fields of the device descriptor, namely the vendor id (idVendor), the product id (idProduct), the product name string (iProduct) and the manufacturer name string (iManufacturer). It is possible to either specify a custom filter, or to rely on a built-in list of well-known devices.

To set a custom filter the following options are used:

If no option is specified, the built-in list of devices is tried.

When using the automatic device discovery based on filters it is possible that more than one device matches the filter. In this case any device might be used, i.e. the used device is unspecified. The only way to prevent this is to manually specify a device based on bus and address.

Device Permissions

The user running the application using GLIP needs to have sufficient permissions to read and write from the USB device. This can be done through a simple

sudo chmod a+rw /dev/bus/usb/<BUS>/<ADDR>

after obtaining the bus and address information of the target device, e.g. through the lsusb command. A more permanent way of setting those permissions is to write a custom udev rule, usually based on the USB VID/PID combination. The Internet has plenty of examples of such udev rules available.