Question

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,

Was it helpful?

Solution 2

"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.

OTHER TIPS

To check if this is indeed a port permission problem, start the trouble-shooting by running jtagd (the deamon between the Altera tool and the driver) as root. At first, you must make sure that jtagd is not running, since if it is already running as a user, trying to start it as root will have no effect.

$ sudo killall -9 jtagd   # Kill jtagd, ...
$ sudo killall -9 jtagd   # ...and verify jtagd is indeed not running.
jtagd: no process found   # Good, verified.
$ sudo jtagconfig         # Will also start jtagd as root
1) CV SoCKit [2-1]
  02D020DD   5CSEBA6(.|ES)/5CSEMA6/..
  4BA00477   SOCVHPS

If the above is successful, this is indeed a port permission problem. To fix it permanently, try with udev rules, as suggested by @eepp.

(On a side note, jtagd will be started by jtagconfig if not already running, as the same user that started jtagd. Hence @eepps command will work as well, but jtagd should be killed first.)

For further trouble-shooting, running jtagd with some debug command-line options can give useful information:

$ jtagd --foreground --debug
JTAG daemon started
Using config file /etc/jtagd/jtagd.conf
Remote JTAG permitted when password set
Cant bind to TCP port 1309 - exiting

(The above error message is typical if jtagd is already running.)

(Above is taken från http://www.fpga-dev.com/altera-usb-blaster-with-ubuntu/. See that page for more details.)

It may be obvious but make sure you're not going through a USB hub. That was my problem for Altera DE2-115 with Quartus Prime Lite 20.1.1 on Ubuntu 20.04. The above answers fixed my permissions issue (Specifically adding ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666" to the new file /etc/udev/rules.d/51-altera-usb-blaster.rules).

But I was still getting.

1) USB-Blaster [1-2.1]
  unable to lock chain - Chain in use - check

Going straight to my PC solved it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top