-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container segfault when attempting to program #2
Comments
Personally I use a Bus Blaster v4, and I think I saw some Lattice software crashes before fixing udev permissions and mount Try something like: /etc/udev/rules.d/99_lattice.rules:
Adjust |
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 ( 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:
Note that the |
After starting up the container, opening an existing Diamond project, and then going to Tools > Programmer, the main container process (i.e. the Diamond IDE) exits due to a segfault. For the physical programmer, I am using a Lattice HW-USBN-2B programmer cable. Note that I also manually named the docker container and prevented it from being deleted after exiting.
Checking the container logs I see this:
Indeed, the USB device file is only writable by root:
Is this expected? The user I am running the container under is a member of the "docker" group so it is able to run docker commands however it is not running as the root user of the host so the permission problems are to be expected if it is trying to write to
/dev/bus/usb/002/006
. I also tried usingsudo docker start diamond-3.11-sp1
to re-start the existing container as root but I still got the same permission problems followed by a segfault.What is the proper solution here? Perhaps a udev rule is needed for the programmer?
The text was updated successfully, but these errors were encountered: