Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

HOWTO: Setting up the USB blaster on Ubuntu 9.04 (Jaunty Jackalope)

edit: as of quartus ii 11.0, altera finally supports /dev/bus/usb out-of-the-box and does not rely on usbfs. the original version of this post described how to "fake" usbfs support in ubuntu, but this is no longer easy to do and is not necessary with quartus ii 11.0+, so i have removed that part of the instructions. hence, this guide will only work with quartus ii 11.0 or newer.

I just spent a couple hours figuring this out, so I thought I'd post it here for everyone else. To use the USB blaster to program Altera parts on Linux, you need to do a bit of work to configure your machine to give Quartus access to it. Unfortunately though, Altera does not provide instructions for how to do this for Ubuntu. So I've put together instructions.

1) Create a new file at /etc/udev/rules.d/51-usbblaster.rules ("sudo gedit /etc/udev/rules.d/51-usbblaster.rules")

2) Put this in it:

ubuntu 9.04+

# Altera USB-Blaster rule to set mode to 666.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chmod 0666 %c"

ubuntu 12.10+

# Altera USB-Blaster rule to set mode to 666.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666"

3) Save and close.

4) Run "sudo udevadm control --reload-rules".

It's now configured! Connect your USB blaster (or remove and reconnect if it's already in) and then launch Quartus. It should now be selectable in Tools -> Programmer -> Hardware Setup.

80 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks a lot for this!

    I had problems with Quartus 11.1 on Ubuntu 11.10, with errors like:

    
      Error (209053): Unexpected error in JTAG server -- error code 89
      Error (209053): Unexpected error in JTAG server -- error code 44
    And this fixed it for good. :)

    Thanks again,

    Tom
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you !

    I'm using Ubuntu 12.04 32 bits on Virtualbox (Win7 host) and Quartus 11.1sp2.

    USB Blaster is working fine here too but only with KIT's rule. No other rule has worked for me.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have edited my original post to add a rule that works for Ubuntu 12.10.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    How similar is Ubuntu to Fedora??? would these steps work in fedora??

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    How similar is Ubuntu to Fedora??? would these steps work in fedora??

    --- Quote End ---

    Probably. Try the instructions for Ubuntu 12.10. If it works, please let me know your Fedora version so that I can include that info in the post.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Tristan. I got Quartus working for fedora17 I published the steps I followed but I am waiting for the content of the article to be approved by altera forum. I took some hints from the ubuntu guide and is essentially the same thing: edit the 51_usbblaster.rules file, then update some libraries in the quartus/linux64 folder (i guess this is required just for users running a 64-bit OS because the quartus software itself is 32-bit). I will post the link to the detailed installation steps I took as soon as the article is approved by the fourm admins.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I just approved your post. I have no idea why it was automatically moderated by the forum, it looks like you triggered a spam filter or something.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have quartus ii 32bit v 12.1 on ubuntu 12.04. I followed Tristians directions and created the following /etc/udev/rules.d/51-usbblaster.rules with the following lines and both my de2 and bemicro work:

    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666"

    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a4a0", MODE="0666",

    I do have a problem with sopc_builder starting, but I'm going to fire off separate thread for that question.

    hope this helps and thanks for the suggestions...

    Mike
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    this thread has been quite long but useful. I would like to know what is the reason "jtagconfig" error on "Unable to lock chain (Bad port name)"

    I couldn't use my programmer. ;(
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    I've written updated instructions for this as well (Ubuntu 14.04-64 installation With Quartus II 13.1.0 64-bit), I hope it is OK that I post the link:

    http://www.fpga-dev.com/altera-usb-blaster-with-ubuntu/

    It also has an extensive section on useful trouble-shooting commands.

    An important point about the original (now updated) instructions/top post (and some given by answers in this thread): You should check what your Product ID is, and use this Product ID for the udev rules. The top post assumes that Product ID is 6001 which might not be the case for many users. Do this:

    
    $ lsusb|grep Altera
    Bus 002 Device 007: ID 09fb:6010 Altera
    

    In the above example, the product ID is 6010.

    Another option is to add udev rules for all known Altera Product IDs (6001, 6002, 6003, 6010 and 6810).

    And to adress de_prince's last specific problem: this error message will be shown if port permissions doesn't work. You can try to run jtagd and jtagconfig as root just to verify that this is indeed a permission problem. See the link above, details on how to do this is provided there.