Coder Social home page Coder Social logo

Comments (2)

Gekkio avatar Gekkio commented on July 20, 2024

Personally I use a Bus Blaster v4, and I think I saw some Lattice software crashes before fixing udev permissions and mount /dev/bus/usb (now done automatically by run.sh script of this repository). Using sudo doesn't work, because you're just running docker as root but the container still runs with your own user credentials.

Try something like:

/etc/udev/rules.d/99_lattice.rules:

ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0664", GROUP="plugdev"

Adjust idVendor/idProduct based on what HW-USBN-2B uses, and make sure you are in the plugdev group (if necessary, run sudo adduser yourusername plugdev + log out + log back in).

from docker-fpga.

jackm avatar jackm commented on July 20, 2024

Having udev add the device to a group that the host user is a member of (plugdev, in this example) did not work - Diamond IDE still segfaults and closes immediately when you open the programmer window and it attempts to write to the USB device.

I manually checked and the device was indeed part of the plugdev group with write permissions yet Diamond still didn't like it even though the docker container was running with the same permissions as the host user (-u argument). I had to give it world-writable permissions (i.e. MODE="0666") before diamond would stop complaining about USB device write permissions.

I also had to unbind the second serial interface from the FTDI SIO driver before Diamond could detect the programmer cable. I noticed that in dmesg that Diamond was trying to attach to the first and the second serial interface of the programmer cable, so I decided to unbind both from the FTDI SIO driver just for good measure.

Here is the udev rule that ended up working for me:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666", SYMLINK+="ftdi-%n", RUN+="/bin/sh -c 'basename %p:1.0 > /sys/bus/usb/drivers/ftdi_sio/unbind; basename %p:1.1 > /sys/bus/usb/drivers/ftdi_sio/unbind'"

Note that the SYMLINK directive is not necessary and can be omitted.

from docker-fpga.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.