Quartus linux usb blaster

IntelВ® FPGA Download Cable (formerly USB-Blaster) Driver for Linux

The IntelВ® QuartusВ® Prime software and older versions of Intel Quartus development software use built-in usb_device drivers on Linux to access the Intel FPGA Download CableВ and theВ Intel FPGA Download Cable II. By default, root is the only user allowed to use these devices. You must change the permissions on the ports before you can use the Intel FPGA Download Cable or Intel FPGA Download Cable II to program devices with Intel Quartus development software.

You must have system administration (root) privileges to configure the Intel FPGA Download Cable drivers.

Select the appropriate RedHat Linux* Enterprise version for instructions on changing port permissions:

Driver Setup on RedHat Linux Enterprise 5 and Above

  1. Add the following lines to the /etc/udev/rules.d/51-usbblaster.rules file.
  2. Complete your installation by setting up the programming hardware in the software.
    • Setting up programming hardware in legacy Intel Quartus development software
    • Setting up programming hardware in the Intel Quartus Prime softwareВ

Driver Setup on RedHat Linux Enterprise 4 and Below

  1. Add the following lines to the /etc/hotplug/usb.usermap file.
  2. Create a file named /etc/hotplug/usb/usbblaster and add the following lines to it.
  3. Make the file executable.
  4. Complete your installation by setting up the programming hardware in the software.
    • Setting up programming hardware in legacy Intel Quartus development software
    • Setting up programming hardware in Intel Quartus Prime software

For more information, please refer to the following user guides:

Источник

Quartus linux usb blaster

Installing and Running Altera’s Quartus II on Linux

Please note that this tutorial is intended for Debian-derived Linux distros such as Ubuntu, Mint, MX, etc.

Users running Arch-based distros should refer to the Arch Wiki (in fact, arch users can automatically download, install, and get the Quartus toolkit to work on their computers by simply using one of the AUR’s packages).

1) Download & Install

Select by Device -> Choose Device Family -> Choose your Device

Click on the most recent Web Edition.

Select the rigth OS and click on Individual Files.

Download only what you need.

Give the downloaded script execution permission: chmod +x QuartusSetup.run

Run the installation script: /path/to/script/QuartusSetup.run

2) Add path dependencies

Create the following script file to be run at startup, one way to accomplish this is to append source /path/to/script/quartus.sh to your shell configuration file.

3) Install 32-bit compatibility packages

A few 32-bit packages will probably need to be installed on 64-bit systems in order for some tools to work.

Try opening and using any tool directly fom the Quartus GUI. If it doesn’t work, run it from the terminal and there should be some complaint about a missing packge or library. Look up on what package you may find this library and install it.

The eclipse-nios2 tool requires installing libgtk2.0-0:i386

It may also require starting it through the terminal with:

$SOPC_KIT_NIOS2/bin/eclipse-nios2 -configuration $HOME/.nios2-ide-6.1 $WORKSPACE_ARGS «$@»

Extra packages I needed to get on a MX Linux install included gcc-multilib , lib32ncurses5 , libx11-6 , libfreetype6 , libpng12 , libc6 , libxtst6 , zlib1g , libssl1.0.0 and libssl-dev ; generally the :i386 versions. You may also need Java 8 or greater.

4) USB-Blaster configuration

At first, connect the cable and make sure the USB device is recognized:

Take note of the Product ID listed — 6010 in the above example.

The Quartus software will use the Linux built-in usb_device drivers. By default, only root has access to these so we must make sure the user is allowed to access them as well.

jtagd, part of the Quartus tools, is a deamon that provides the interface between the Altera tool accessing the JTAG chain and the USB driver. If not already running, jtagd will be startetd automatically when the Quartus software or jtagconfig is run. You’ll usually run these as a user, which means jtagd will also run as a user. That is why edited permission for the usb_device is necessary.

Create a file /etc/udev/rules.d/51-usbblaster.rules, make sure it has read permissions for root, and fill it with this content:

Читайте также:  Fix issues with windows update

Edit the value for ATTR to match the Product ID determined before.

If you have more than one Product ID you want this to work for, simply repeat the above lines in the same file and use the other Product IDs for ATTR.

For the changes to take effect, reboot the machine.

Make sure jtagd has access to the list of devices:

Also make sure this file has read access for the user.

The cable should now be recognized as a valid hardware by the Quartus tools. From Quartus, select Tools, Programmer, Hardware Setup. and then select the board from the drop-down list. Now, the Programmer, JTAG Chain Debugger and System console should all recognize and use the USB-Blaster device.

About

Quartus II installation tutorial for Debian-based Linux distros

Источник

Quartus Prime FPGA USB-Blaster Problems On Ubuntu 18.04

I’ve decided to learn how to program FPGA:s. So I got myself two Terasic boards, one Terasic DE10-Nano for testing out the excellent MiSTer FPGA hardware arcade/computer/console emulator and a simpler DE0-Nano for beginning to learn Verilog.

But the software used, called Intel Quartus Prime 19.1, is truly horrible. The Windows version doesn’t work with high-resolution screens when using scaling; the text is cut off on the display. So I installed it on my Linux Ubuntu 18.04 machine instead. Now the display works, but there’s a lot of other problems, like getting the dreaded error message: “USB-Blaster unable to scan device chain”. I’ve written them down here for later reference, and maybe you have the same install problems, so this might help.

USB-Blaster “unable to scan device chain” Error Message

After installing the software, I tried to use the programmer to connect my development board, but I got the error Unable to scan device chain. After searching the net, I found information on setting up the computer so that you don’t need to run the JTAG as root.

So I added the file /etc/udev/rules.d/51-usbblaster.rules and put the following text into the file to allow a regular user to access the Terasic FPGA board.

Well, that didn’t work, but it is probably a good idea to have this file installed.

This Fixed It!

The next thing did the trick, however. It seems this is an old bug that Intel hasn’t managed to fix for several release versions. Great stuff.

You need to add a soft link so the software can find a library.

Open a terminal window and write this command:

Restart the machine, connect your Terasic FPGA board with a USB cable, and open a terminal window. You can now write the following command in the terminal window

And if you don’t get any errors and the system recognizes the USB-Blaster hardware, you should now be able to download bitstreams from Quartus to your FPGA board.

If you get any error messages about missing libraries when starting Quartus, make sure to install them. For example, I had to install the following libraries.

To make this even more annoying, I sometimes have to enlarge the Quartus Programming window; otherwise, the program would hang.

Quartus Prime is the software that keeps on giving.

Источник

Quartus linux usb blaster

Copy raw contents

Copy raw contents

Installing and Running Altera’s Quartus II on Linux

Please note that this tutorial is intended for Debian-derived Linux distros such as Ubuntu, Mint, MX, etc.

Users running Arch-based distros should refer to the Arch Wiki (in fact, arch users can automatically download, install, and get the Quartus toolkit to work on their computers by simply using one of the AUR’s packages).

1) Download & Install

Select by Device -> Choose Device Family -> Choose your Device

Click on the most recent Web Edition.

Select the rigth OS and click on Individual Files.

Download only what you need.

Give the downloaded script execution permission: chmod +x QuartusSetup.run

Run the installation script: /path/to/script/QuartusSetup.run

2) Add path dependencies

Create the following script file to be run at startup, one way to accomplish this is to append source /path/to/script/quartus.sh to your shell configuration file.

3) Install 32-bit compatibility packages

A few 32-bit packages will probably need to be installed on 64-bit systems in order for some tools to work.

Try opening and using any tool directly fom the Quartus GUI. If it doesn’t work, run it from the terminal and there should be some complaint about a missing packge or library. Look up on what package you may find this library and install it.

Читайте также:  Терминал mac os чистить систему

The eclipse-nios2 tool requires installing libgtk2.0-0:i386

It may also require starting it through the terminal with:

$SOPC_KIT_NIOS2/bin/eclipse-nios2 -configuration $HOME/.nios2-ide-6.1 $WORKSPACE_ARGS «$@»

Extra packages I needed to get on a MX Linux install included gcc-multilib , lib32ncurses5 , libx11-6 , libfreetype6 , libpng12 , libc6 , libxtst6 , zlib1g , libssl1.0.0 and libssl-dev ; generally the :i386 versions. You may also need Java 8 or greater.

4) USB-Blaster configuration

At first, connect the cable and make sure the USB device is recognized:

Take note of the Product ID listed — 6010 in the above example.

The Quartus software will use the Linux built-in usb_device drivers. By default, only root has access to these so we must make sure the user is allowed to access them as well.

jtagd, part of the Quartus tools, is a deamon that provides the interface between the Altera tool accessing the JTAG chain and the USB driver. If not already running, jtagd will be startetd automatically when the Quartus software or jtagconfig is run. You’ll usually run these as a user, which means jtagd will also run as a user. That is why edited permission for the usb_device is necessary.

Create a file /etc/udev/rules.d/51-usbblaster.rules, make sure it has read permissions for root, and fill it with this content:

Edit the value for ATTR to match the Product ID determined before.

If you have more than one Product ID you want this to work for, simply repeat the above lines in the same file and use the other Product IDs for ATTR.

For the changes to take effect, reboot the machine.

Make sure jtagd has access to the list of devices:

Also make sure this file has read access for the user.

The cable should now be recognized as a valid hardware by the Quartus tools. From Quartus, select Tools, Programmer, Hardware Setup. and then select the board from the drop-down list. Now, the Programmer, JTAG Chain Debugger and System console should all recognize and use the USB-Blaster device.

Источник

Fighting Altera USB-Blaster on Ubuntu

Today I was really surprised by realizing that Quartus Prime Programmer doesn’t see USB blaster connected to my laptop and cant program the FPGA from linux OS. It took me good couple of hours to figure out how to marry USB blaster with Programmer app on my Ubuntu 17.04 install. Unfortunately, Altera USB Blaster User Guide doesn’t shed any light on this problem so I had to find my own way out.

Altera Quartus on Ubuntu 17.04

If you already have Quartus up and running on your linux you can skip to the next part where actual USB Blaster problems and configuration is described.

Let’s start from the beginning during active debug and testing we decided it is bad practice to disconnect test board and run back and force between computer every time firmware is changed so I decided to have running version of Quartus on my development laptop. From my previous experience I know it runs nice and easy in Windows environment, so I tried to run with wine. And surprise, surprise it doesn’t work from wine. Not a biggie, heading up to Altera Download Center and downloading Linux distro. Quartus setup is straight forward. Libpng or something like that is missing.

fixed the problem and we’re ready to roll.

Running the icon on the desktop did nothing. Ok, it seems like Quartus had been installed into my home folder, console command

actually starts Quartus:

Kinda inconvenient to type in full path to the quartus every time you need it, but I can understand, they are making FPGAs, not the linux software. Now I can create an alias to run it via full path by typing quartus, but I’m suspecting it’ll need access to the bin folder later on so adding Quartus’s bin folder on the PATH. To do that edit your

/.profile with nano or whatever text editor you like:

Add this at the end of file:

Save file, log out, log back in and type quartus in the console. Now it starts right away, good deal!

Now creating new project, adding files, compiling source code, etc. A lot of USB blaster unrelated actions been taken to bring project into ready-to-program state. I will post another article with all these steps explaining how to create a project and and compile AtomMiner project in Quartus later when we publish Verilog sources on the GitHub.

Читайте также:  Активировать windows professional sp3

(Re)Discovering USB Blaster

Now that the project is done it is time to program it into the FPGA board and start testing. You can access Quartus Programmer from the main menu, or by typing quartus_pgmw —64bit in command line. Programmer interface opens up, but there’s no compatible hardware detected. Unplugging test board, plugging it back in and no result. Does it look familiar?

Now I gotta find my USB Blaster and figure out how to make programmer app to talk to it. For that, unplug test board, plug it back in and type on the command line:

Great news! USB Blaster is here and recognized by the system, let’s go ahead and verify it is still there:

Perfect! The Blaster is here, it is connected and seems to be operational. I’ve noticed idVendor and idProduct looks way too familiar. Quick google search shows that they are just using FTDI chip on board as an USB Blaster, which supposedly makes things easier. On most linux installs users don’t have raw access to any physical port. In our case we’re looking at FTDI’s USB-Serial type of port. Typical work around for that problem is to run whatever you need as root . This is real bad practice though due to security issues, but let’s give it a shot. sudo quartus_pgmw —64bit brings up programmer interface but USB blaster is still not on the list of available hardware. Do not run any application as root unless you’re 100% sure this app has to have root access.

Closer look at programmer tool shows that it is just a GUI over jtagd daemon, that does all the programming and communication. Quartus’s bin folder contains 2 files we need to look at jtagconfig and jtagd . jtagconfig talking to the jtag daemon and only shows jtagd doesn’t see connected board:

Further investigation showed that jtagd is being started as me, while system is blocking access to the blaster for security reason. Temporary solution was to kill JTAG daemon and start it as root:

Finally, I’ve got some progress programming my test board:

Bingo! Now Quartus Programmer starts and you can program FPGA as if you would use it in windows environment. Job is done except for the fact that jtagd is still running as root and I’ll have to kill and restart it as superuser every time I restart my laptop. I can live with jtagd being started manually if it wasn’t running as root, so while FPGA is programmed and being tested in background, it is perfect time to setup permissions so jtagd can talk to USB Blaster while started as me once and forever.

To setup permissions in the right way we need to know what library or driver is being used by jtagd daemon to communicate with FPGA. For that, you can look at files accessed by jtagd process:

Highlighted line shows that jtagd is using old good system libudev. Now we need to create rules for libudev so any user can access USB Blaster. According to Altera website idProduct for USB Blaster can be one of the following 6001, 6002, 6003, 6010, 6810 so I’ll add them all to libudev rules in case I’ll have to work with different type of USB blaster down the pipeline.

For the changes to take effect reboot your PC or run following command if you have it:

If jtagconfig doesn’t show your FPGA/board name you might have to copy board description file to jtag config and restart jtagd:

Done is done! Now you can start Quartus Programmer at any time and upload your updated firmware to connected board like you always do with just a few mouse clicks.

Basically, the same steps will work on any linux installation since all the steps and commands are common for most *nix distributives.

As a bonus, here’s the bash script that will do all the necessary steps for you: usbblaster.sh on GitHub:

Please leave your OS name and version along with Quartus version you’re using in comments if this script didn’t work for you, so I can update it.

If you find any of provided information helpful or just want to support our project, please donate:

BTC 1BBZMp3qouKY2MHx3vbosmPinTLMeU9C9u
DOGE DMLrv8ZT2NfPUZUtPmGMJq9DvuQsH82QLN
LTC LQ1QLdRjj1uf2MDiiMA3xLuEoLHBSeyvFU

Источник

Оцените статью