Search code examples
linuxembeddedembedded-linuxintel-fpga

Unable to lock chain (Insufficient port permissions)


I am new to Linux , and I am trying to install AlteraQuartus 2 WEb Edition and NIOS2 EDS to play with Nios2 Processor.

However , after installing Quartus and when I am trying to execute jtagconfig.

I do not see something like below , even after running /altera/nios2eds/nios2_command_shell.sh

1.)[Nios2 EDS] $ 2.) Unable to lock chain (Insufficient port permissions)

Please Help,


Solution

  • "Insufficient permissions" or "permission denied" or whatever relating to not having permissions on *nix usually means you must run the command as user root (or as another user who has the permissions, but root has all of them).

    So run jtagconfig as root:

    $ sudo jtagconfig
    

    Alternatively, as root, put this in a new file /etc/udev/rules.d/51-altera-usb-blaster.rules:

    SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666"
    SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666"
    

    and then, run:

    $ sudo udevadm control --reload
    

    This should change the permission of your USB-Blaster Download Cable device so that any user may access it (if this is what you want), so you should be able to issue jtagconfig without sudo. Those five idProducts are all the known USB-Blaster Download Cable USB product IDs (for the Altera vendor ID, 0x09fb).

    I wrote a fairly complete Arch Linux wiki page about Altera softwares on Linux if you want more details.