-
Notifications
You must be signed in to change notification settings - Fork 21
USB Serial port udev rules
Using an FTDI based serial cable can cause all kind of grief with iMpact, which is one of the reasons to avoid it as much as possible. Unfortunately it also caused chipscope to crash. Chipscope is used occasionally while debugging since it's easier (sometimes) than modeling hardware devices attached to the FPGA.
The problem is that Xilnux tools attempt to open the FTDI serial port while searching for the JTAG interface and they will CRASH with a SEGFAULT if permission was denied.
A rule can be created for the serial port dongle that gives permission to all users which cures the problem.
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403",ATTRS{serial}=="????????", SYMLINK+="ttyUSB.Pano",MODE="666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403",ATTRS{serial}=="????????",MODE="666"
This sledge hammer solution isn't secure, but it is probably suitable for most users.
If you run into similar problems create /etc/udev/rules.d/TTL232R-3V3.rules to match your device (replacing "??????" with the actual serial number of your dongle).
Once you unplug and plug your USB serial cable iMpact and chipscope should work again.
The rule also creates a symbolic link for the USB serial port to /dev/ttyUSB.Pano. If you use this link instead of the actual device you will never have to worry about the device changing when you reboot or connect other USB serial devices again.