Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

altera 11 usbblaster ubuntu 11.04

Altera_Forum
Honored Contributor II
2,109 Views

Hello all, 

 

I am running into the dreaded ubuntu usbblaster issue. I am on ubuntu 11.04 32 bits with Altera 11 (which is supposed to be better). I got this to work using altera 10 with earlier ubuntu, but no cigar with the current permutation. Any hints on how one might fault isolate this issue are appreciated. 

 

$ jtagconfig 

1) USB-Blaster [2-4] 

020F30DD  

 

And nios2-download always gives this error.  

 

"There are no Nios II CPUs with debug modules available which match the values 

specified. Please check that your PLD is correctly configured, downloading a 

new SOF file if necessary." 

 

I do repeated download a new SOF file with the reference design from altera (and that completes w/o errors), and also use the power up reset reference design w/o any success. 

 

I have this in my /etc/udev/rules.d/40-altera-usbblaster.rules (I tried some the other variations being passed around on the web and they dont appear to work complaining that there isn't sufficient privilege to access the port) 

 

BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666", SYMLINK+="usbblaster", GROUP="plugdev" 

 

$ ls -l /dev/usbblaster 

lrwxrwxrwx 1 root root 15 2011-09-26 15:24 /dev/usbblaster -> bus/usb/002/009 

 

$ ls -l /dev/bus/usb/002/009 

crw-rw-r-- 1 root plugdev 189, 136 2011-09-26 15:35 /dev/bus/usb/002/009 

 

$ lsusb -d 09fb:6001 -v 

 

Bus 002 Device 009: ID 09fb:6001 Altera  

Device Descriptor: 

bLength 18 

bDescriptorType 1 

bcdUSB 1.10 

bDeviceClass 0 (Defined at Interface level) 

bDeviceSubClass 0  

bDeviceProtocol 0  

bMaxPacketSize0 8 

idVendor 0x09fb Altera 

idProduct 0x6001  

bcdDevice 4.00 

iManufacturer 1 Altera 

iProduct 2 USB-Blaster 

iSerial 3 91d28408 

bNumConfigurations 1 

Configuration Descriptor: 

bLength 9 

bDescriptorType 2 

wTotalLength 32 

bNumInterfaces 1 

bConfigurationValue 1 

iConfiguration 0  

bmAttributes 0x80 

(Bus Powered) 

MaxPower 150mA 

Interface Descriptor: 

bLength 9 

bDescriptorType 4 

bInterfaceNumber 0 

bAlternateSetting 0 

bNumEndpoints 2 

bInterfaceClass 255 Vendor Specific Class 

bInterfaceSubClass 255 Vendor Specific Subclass 

bInterfaceProtocol 255 Vendor Specific Protocol 

iInterface 2 USB-Blaster 

Endpoint Descriptor: 

bLength 7 

bDescriptorType 5 

bEndpointAddress 0x81 EP 1 IN 

bmAttributes 2 

Transfer Type Bulk 

Synch Type None 

Usage Type Data 

wMaxPacketSize 0x0040 1x 64 bytes 

bInterval 0 

Endpoint Descriptor: 

bLength 7 

bDescriptorType 5 

bEndpointAddress 0x02 EP 2 OUT 

bmAttributes 2 

Transfer Type Bulk 

Synch Type None 

Usage Type Data 

wMaxPacketSize 0x0040 1x 64 bytes 

bInterval 0 

Device Status: 0x0000
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
352 Views

So in summary, I can program the device with the reference design, but somehow I am unable to download software. 

 

$ nios2-configure-sof niosii_ethernet_standard_3c25.sof 

Searching for SOF file: 

in . 

niosii_ethernet_standard_3c25.sof 

 

Info: ******************************************************************* 

Info: Running Quartus II Programmer 

Info: Command: quartus_pgm --no_banner --mode=jtag -o p;./niosii_ethernet_standard_3c25.sof 

Info: Using programming cable "USB-Blaster [2-4]" 

Info: Using programming file ./niosii_ethernet_standard_3c25.sof with checksum 0x00CC2B53 for device EP3C25F324@1 

Info: Started Programmer operation at Mon Sep 26 16:28:37 2011 

Info: Configuring device index 1 

Info: Device 1 contains JTAG ID code 0x020F30DD 

Info: Configuration succeeded -- 1 device(s) configured 

Info: Successfully performed operation(s) 

Info: Ended Programmer operation at Mon Sep 26 16:28:38 2011 

Info: Quartus II Programmer was successful. 0 errors, 0 warnings 

Info: Peak virtual memory: 94 megabytes 

Info: Processing ended: Mon Sep 26 16:28:38 2011 

Info: Elapsed time: 00:00:02 

Info: Total CPU time (on all processors): 00:00:00 

 

$ make 

Info: Building ../../bsp/hal_default/ 

make --no-print-directory -C ../../bsp/hal_default/ 

[BSP build complete] 

[hello_world build complete] 

 

$ nios2-download hello_world.elf 

There are no Nios II CPUs with debug modules available which match the values 

specified. Please check that your PLD is correctly configured, downloading a 

new SOF file if necessary.
0 Kudos
Altera_Forum
Honored Contributor II
352 Views

I did try some of the other solutions suggested on this forum 

 

$ cat /etc/udev/rules.d/40-altera-usbblaster.rules 

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" 

 

$ sudo udevadm control --reload-rules 

 

$ jtagconfig 

1) USB-Blaster [2-4] 

020F30DD  

 

$ /home/hill/altera/11.0/nios2eds/nios2_command_shell.sh  

------------------------------------------------ 

Altera Nios2 Command Shell [GCC 4] 

 

Version 11.0, Build 157 

------------------------------------------------ 

 

$ jtagconfig 

1) USB-Blaster [2-4] 

020F30DD  

 

$ nios2-download hello_world.elf 

There are no Nios II CPUs with debug modules available which match the values 

specified. Please check that your PLD is correctly configured, downloading a 

new SOF file if necessary.
0 Kudos
Altera_Forum
Honored Contributor II
352 Views

OK, found the solution (on the wiki)! 

 

$ sudo mkdir /etc/jtagd 

$ sudo cp /home/hill/altera/11.0/quartus/linux/pgm_parts.txt /etc/jtagd/jtagd.pgm_parts 

$ ls /etc/jtagd 

jtagd.pgm_parts 

 

$ jtagconfig 

1) USB-Blaster [2-4] 

020F30DD  

 

$ killall jtagd 

$ jtagd 

 

$ jtagconfig 

1) USB-Blaster [2-4] 

020F30DD EP3C25/EP4CE22 

 

$ nios2-download hello_world.elf  

Using cable "USB-Blaster [2-4]", device 1, instance 0x00 

Pausing target processor: OK 

Initializing CPU cache (if present) 

OK 

Downloaded 49KB in 2.7s (18.1KB/s) 

Verified OK  

Leaving target processor paused 

 

success!
0 Kudos
Altera_Forum
Honored Contributor II
352 Views

Thanks for posting your results..

0 Kudos
Altera_Forum
Honored Contributor II
352 Views

Just wanted to say thanks to JeffreyOHill as well. His solution worked for me. Much appreciated.

0 Kudos
Altera_Forum
Honored Contributor II
352 Views

For what it's worth, this also worked for me on machine where I just did a fresh install of Ubuntu 12.04 (not an update). 

 

JefferyOHill, thanks for such a comprehensive report. May you live to be a thousand years old.
0 Kudos
Reply