Skip to content

Instantly share code, notes, and snippets.

@rniwase
Created April 16, 2021 18:23
Show Gist options
  • Save rniwase/99c15948d46deef7b05b8b4411f79858 to your computer and use it in GitHub Desktop.
Save rniwase/99c15948d46deef7b05b8b4411f79858 to your computer and use it in GitHub Desktop.
udev rules for Lattice Diamond programmer, available in Ubuntu 20.04
# Lattice
SUBSYSTEM=="usb",ACTION=="add",ATTRS{idVendor}=="1134",ATTRS{idProduct}=="8001",MODE="0660",GROUP="plugdev",SYMLINK+="lattice-%n"
# FTDI
SUBSYSTEM=="usb",ACTION=="add",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6010",MODE="0660",GROUP="plugdev",SYMLINK+="ftdi-%n"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6010",RUN+="/bin/sh -c 'basename %p > /sys/bus/usb/drivers/ftdi_sio/unbind'"
@AnthoJack
Copy link

Works in Ubuntu 22.04 too.

Thank you so much you are my savior. What is the "51" at the beginning of the name supposed to be ? I saved the file with a different number and it still works so I guess it doesn't matter that much but I'm still curious

@rniwase
Copy link
Author

rniwase commented Sep 28, 2022

The "51" has no meaning, I just remember that I numbered it that way in my udev rules to make it sequential with the other rules.

Of course, it is correct to change it to suit your environment.

@rakytap
Copy link

rakytap commented Feb 5, 2023

Thanks, it worked for me as well. (Ubuntu 18.04 and Ubuntu 20.04)

@lukilukeskywalker
Copy link

For getting the programmer software working in ubuntu / (other distros ?) an old version of libusb has to be installed: apt-get install libusb-0.1-4
(For the rest of us that don't want to spend a whole day searching why the diamond lattice doesn't even start the pgr_program in ubuntu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment