glip
0.1.0-dev
The Generic Logic Interfacing Project
|
The Cypress FX2 backend connects over a USB 2.0 connection to targets with a Cypress EZ-USB FX2 USB chip.
Use the "cypressfx2" backend name with glip_new(). The following options are available:
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) |
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:
usb_vid
: the vendor IDusb_pid
: the product IDusb_manufacturer
: the manufacturer name string (not matched if omitted)usb_product
: the product name string (not matched if omitted)If no option is specified, the built-in list of devices is tried.
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.