Installing Quartus programmer

774 views
Skip to first unread message

Graeme Jury

unread,
Jan 16, 2018, 5:36:53 PM1/16/18
to Hermes-Lite
Hi All,

I decided to upgrade to the latest programmer version for Cyclone IV - silly boy! and of course it was fraught with difficulties. I am using Linux Mint 18.3 another Ubuntu spin off and things did not go well. It was pretty difficult to work out exactly what I needed for just the programmer but eventually I worked out that I needed the ~450 MB file, downloaded and ran it. All installed normally but it kept giving me chain errors and seemed to be tied to permissions except that it would not run as root. I finally sorted it after several hours and as is my habit I wrote down in a Tomboy note what I did and took clips of my terminal while working on it. I share the note here in case it helps someone else who is brave enough to go to the latest version.

Plug in the blaster and check if found
$ dmesg | tail
[    3.844484] sr 6:0:0:0: Attached scsi generic sg1 type 5
[    6.306447] random: crng init done
[    6.714098] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[    6.714134] IPv6: ADDRCONF(NETDEV_CHANGE): eno1: link becomes ready
[  464.266338] usb 3-2: new full-speed USB device number 2 using xhci_hcd
[  464.415576] usb 3-2: New USB device found, idVendor=09fb, idProduct=6001
[  464.415578] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  464.415579] usb 3-2: Product: USB-Blaster
[  464.415580] usb 3-2: Manufacturer: Altera
[  464.415581] usb 3-2: SerialNumber: ARWLJW1K

Good! now see how it looks as a USB device

$ lsusb | grep Altera
Bus 003 Device 002: ID 09fb:6001 Altera Blaster

As jtagd needs to run as root we need to make a udev rule for it
The rule file is /etc/udev/rules.d/51-usbblaster.rules
and contents making sure the ATTR{idProduct} matches your lsusb value.

# For Altera USB-Blaster permissions.
SUBSYSTEM=="usb",\
ENV{DEVTYPE}=="usb_device",\
ATTR{idVendor}=="09fb",\
ATTR{idProduct}=="6001",\
MODE="0666",\
NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}",\
RUN+="/bin/chmod 0666 %c"

Found that for some reason jtagd needed to be run in foreground. Just would not work
with ./jtagd.

Started jtagd like this
$ ./jtagd --foreground --debug
JTAG daemon started
Using config file /etc/jtagd/jtagd.conf
Remote JTAG permitted when password set
No USB device change detection because libudev.so.0 not found
USB-Blaster "USB-Blaster" firmware version 6.00
USB-Blaster endpoints out=02(64), in=81(64); urb size=1024
USB-Blaster added "USB-Blaster [3-2]"
USB-Blaster port (/dev/bus/usb/003/002) opened
USB-Blaster "USB-Blaster" firmware version 6.00
USB-Blaster endpoints out=02(64), in=81(64); urb size=1024
USB-Blaster reports JTAG protocol version 0, using version 0
USB-Blaster closed

then started jtagconfig
$ ./jtagconfig
1) USB-Blaster [3-2]
  020F30DD   10CL025(Y|Z)/EP3C25/EP4CE22

Yaay! it worked so now to sort out the foreground issue

Fixing the problem with "No USB device change detection because libudev.so.0 not found"
sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

Now
$ ./jtagd --foreground --debug
JTAG daemon started
Using config file /etc/jtagd/jtagd.conf
Remote JTAG permitted when password set
USB-Blaster "USB-Blaster" firmware version 6.00
USB-Blaster endpoints out=02(64), in=81(64); urb size=1024
USB-Blaster added "USB-Blaster [3-2]"

Now I can run jtagd normally and it seems like the libudev.so.0 fix also
sorted out the --foreground problem.

73, Graeme ZL2APV
Reply all
Reply to author
Forward
0 new messages