Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1203 Discussions

DE0-Nano Quartus Lite 19.1.0 Linux - Programming Failed - Error (209040): Can't access JTAG chain

simozz
Novice
7,083 Views

Hello,

I am trying to use my DE0-Nano board with Quartus version Lite 19.1.0  (Debian 10) and my_first_fpga example, but I cannot achieve to successfully program the FPGA.

Quartus correctly detects the on-board USB-Blaster:

Screenshot_2021-03-21_13-59-41.png

but after clicking the Start button, it results in Failed progress. The LOAD LED D4 remains turned on for the whole process.

The only errors I see from the console are:

 

Error (209040): Can't access JTAG chain
Error (209012): Operation failed

 

Also, quartus_pgm correctly detects the USB-Blaster:

 

:~$ quartus_pgm -l
Info: *******************************************************************
Info: Running Quartus Prime Programmer
    Info: Version 19.1.0 Build 670 09/22/2019 SJ Lite Edition
    Info: Copyright (C) 2019  Intel Corporation. All rights reserved.
    Info: Your use of Intel Corporation's design tools, logic functions 
    Info: and other software and tools, and any partner logic 
    Info: functions, and any output files from any of the foregoing 
    Info: (including device programming or simulation files), and any 
    Info: associated documentation or information are expressly subject 
    Info: to the terms and conditions of the Intel Program License 
    Info: Subscription Agreement, the Intel Quartus Prime License Agreement,
    Info: the Intel FPGA IP License Agreement, or other applicable license
    Info: agreement, including, without limitation, that your use is for
    Info: the sole purpose of programming logic devices manufactured by
    Info: Intel and sold by Intel or its authorized distributors.  Please
    Info: refer to the applicable agreement for further details, at
    Info: https://fpgasoftware.intel.com/eula.
    Info: Processing started: Sun Mar 21 14:04:28 2021
Info: Command: quartus_pgm -l
1) USB-Blaster [1-10]
Info: Quartus Prime Programmer was successful. 0 errors, 0 warnings
    Info: Peak virtual memory: 429 megabytes
    Info: Processing ended: Sun Mar 21 14:04:28 2021
    Info: Elapsed time: 00:00:00
    Info: Total CPU time (on all processors): 00:00:00
:~$

 

The udev rules are correctly setup:

 

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

 

but no way.

I had a similar problem a few years ago but was due to incorrect settings of environment variable PATH.

Now I don't know how to proceed.

The board has not been touched since a few years. It has rested in its case and anti-static bag all this time.

Is there any other test I can do to investigate the problem ? Any hint ?

Thanks.

Simon

 

0 Kudos
1 Solution
simozz
Novice
7,012 Views

The problem seems to be caused by a SW issue..

Following the suggestion posted here

https://electronics.stackexchange.com/questions/239882/altera-cyclone-ii-jtag-after-as-programming

I installed libudev:i386:

$ sudo apt-get install libudev1:i386
$ sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

Then, after pluggin the board:

 

 

$ sudo killall jtagd
$ jtagd --user-start
$ jtagconfig 
1) USB-Blaster [1-10]
  020F30DD   10CL025(Y|Z)/EP3C25/EP4CE22

 

The above script can be placed the bin directory of installation, for example /opt/intelFPGA_lite/20.1/quartus/bin/usbblaster.sh (yes, I switched to 20.1 version):

 

#!/bin/sh
/usr/bin/killall jtagd
/opt/intelFPGA_lite/20.1/quartus/bin/jtagd --user-start
​

 

and udev rules set as follows:

 

SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666", GROUP="plugdev", SYMLINK+="usbblaster", RUN+="/opt/intelFPGA_lite/20.1/quartus/bin/usbblaster.sh"

 

Works like a charm.

Simon

 

 

View solution in original post

0 Kudos
10 Replies
JohnT_Intel
Employee
7,045 Views

Hi,


From the message you provided, you are only able to detect the blaster but not the device. May I know if you have try to performed auto-detect or "jtagconfig" to see if it is able to detect any device on device chain? Have you confirm if the connection to the JTAG port is correct?


0 Kudos
simozz
Novice
7,040 Views

Hi @JohnT_Intel ,

Sometimes jtagconfig detects the device, many times it doesn't.

Here are three consecutive jtagconfig executions. After unplugging the board (2nd one), it has been (luckely) detected:

 

:~$ jtagconfig 
1) USB-Blaster [1-5]                          
  Unable to read device chain - JTAG chain broken

:~$ jtagconfig 
1) USB-Blaster [1-5]
  020F30DD   10CL025(Y|Z)/EP3C25/EP4CE22

:~$ jtagconfig 
1) USB-Blaster [1-5]
  Unable to read device chain - JTAG chain broken

:~$

 

Between the 2nd and the 3rd execution, the board has not been unplugged.

This is of course particularly annoying because the successful detection is unpredictable.

Simon

0 Kudos
JohnT_Intel
Employee
7,029 Views

Hi,


May I know have you tried to measure the nStatus, nConfig and CONF_DONE pin? I would need this information to understand what is actually happening on your device.


If the nStatus pin keep toggling then you might face this issue.


0 Kudos
simozz
Novice
7,021 Views

Hello @JohnT_Intel ,

Screenshot_2021-03-23_10-17-58.png

nSTATUS and nCONFIG are always high (3V3). I don't have access to CONF_DONE pin due to the fact that I don't have any via on it, and I don't know if this pin is accessible elsewhere because the schematics provided by the CD-ROM is incomplete (i.e. USB-Blaster with FTDI chip is not figured).

Could it be some SW driver issue ?

Simon

0 Kudos
simozz
Novice
7,013 Views

The problem seems to be caused by a SW issue..

Following the suggestion posted here

https://electronics.stackexchange.com/questions/239882/altera-cyclone-ii-jtag-after-as-programming

I installed libudev:i386:

$ sudo apt-get install libudev1:i386
$ sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

Then, after pluggin the board:

 

 

$ sudo killall jtagd
$ jtagd --user-start
$ jtagconfig 
1) USB-Blaster [1-10]
  020F30DD   10CL025(Y|Z)/EP3C25/EP4CE22

 

The above script can be placed the bin directory of installation, for example /opt/intelFPGA_lite/20.1/quartus/bin/usbblaster.sh (yes, I switched to 20.1 version):

 

#!/bin/sh
/usr/bin/killall jtagd
/opt/intelFPGA_lite/20.1/quartus/bin/jtagd --user-start
​

 

and udev rules set as follows:

 

SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666", GROUP="plugdev", SYMLINK+="usbblaster", RUN+="/opt/intelFPGA_lite/20.1/quartus/bin/usbblaster.sh"

 

Works like a charm.

Simon

 

 

0 Kudos
JohnT_Intel
Employee
6,999 Views

Hi,


May I know if the issue is resolved after you reinstall the driver?


0 Kudos
simozz
Novice
6,996 Views

Hello @JohnT_Intel ,

I did not reinstall any Linux driver.

I experienced this issue with both 19.1 and 20.1 Quartus version.

If can be useful, I strongly suggest to increase verbose console debugging for this kind of issue, since it's easier to track the problem.

Regards,

Simon

0 Kudos
JohnT_Intel
Employee
6,980 Views

Hi,


I am not sure if this is due to the OS setup issue. We do have a debug tools where it is possible to debug JTAG chain issue.


0 Kudos
simozz
Novice
6,978 Views

Hello @JohnT_Intel ,

If you mean the Quartus JTAG chain test tool, it did not work, of course, without error reporting.

After applying the changes in the solution, the JTAG is successfully detected every time.

Simon

0 Kudos
JohnT_Intel
Employee
6,977 Views

Hi,


The reason it is not working is due to the USB setup is not setup correctly where the blaster is not working previously. Once the setup is correct then if there is any issue where the Quartus error mention that it is not able to detect any device then we can use that features.


0 Kudos
Reply