Issue with quartus_pgm Command-Line .jic File Programming on DE0-Nano (Ubuntu 24.04 + Quartus Prime
Dear Sir/Madam,
I am currently working with your DE0-Nano Development Board (featuring the Cyclone IV E EP4CE22F17C6N FPGA) and attempting to program FPGA configuration files using Intel Quartus Prime Lite Edition 18.0 software on an Ubuntu 24.04 (latest version) operating system.
I am encountering an issue when attempting to program a .jic (JTAG Indirect Configuration File) to the on-board EPCS64 Flash via the command-line interface (quartus_pgm), whereas the same programming operation succeeds without issue when performed through the Quartus Prime GUI.
Problem Description:
Objective: To program the .jic file permanently onto the DE0-Nano development board's EPCS64 Flash memory using the quartus_pgm command-line tool.
JIC File Generation: The .jic file was correctly generated using Quartus Prime's Convert Programming Files utility. I have confirmed that it includes the Flash Loader IP for the EP4CE22 device (as shown in the attached GUI screenshot). This .jic file successfully programs the device when used with the Quartus GUI Programmer.
Command-Line Operations & Errors:
I have ensured that the USB-Blaster programmer (ID 09fb:6001) is physically connected to the Ubuntu host.
The jtagd service has been successfully launched in the background using sudo /home/xiaoxiu/intelFPGA_lite/18.0/quartus/bin/jtagd &.
jtagconfig correctly detects both the USB-Blaster and the FPGA (EP4CE22) on the JTAG chain.
udev rules (/etc/udev/rules.d/51-usbblaster.rules, with content: SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666", SYMLINK+="usbblaster") have been manually created, reloaded, and verified. The corresponding device node (e.g., /dev/bus/usb/003/121, or dynamically assigned) consistently shows crw-rw-rw- permissions, indicating full read/write access for all users.
However, when attempting the command-line programming using quartus_pgm -c USB-Blaster -m JTAG -o "P;/path/to/your_file.jic@1", the program immediately returns the error: Error (209062): Flash Loader IP not loaded on device 1.
(Crucial Observation
If I first successfully perform a .jic programming operation using the Quartus Prime GUI Programmer, then immediately after, the same quartus_pgm command-line operation succeeds within the same terminal session. This strongly suggests that the issue is not with the .jic file itself or hardware malfunction, but rather with the command-line environment failing to properly initialize the JTAG environment to load the Flash Loader IP on its initial attempt.
Environment Variable Issue:
When attempting to set Quartus environment variables using source /home/xiaoxiu/intelFPGA_lite/18.0/quartus/bin/quartus_sh --quartus-path /home/xiaoxiu/intelFPGA_lite/18.0/quartus, the script causes the terminal session to close. I've tried to work around this by exporting variables via a sub-shell (e.g., ( ... ) > quartus_env.sh followed by source quartus_env.sh) to import the environment variables without closing the terminal, but the core issue persists.
Points for Discussion / Request for Assistance:
Based on the observed behavior, I hypothesize that the problem might stem from:
A discrepancy in how the jtagd service or quartus_pgm tool initializes the JTAG hardware/USB device in a command-line context, compared to the more robust initialization process triggered by the GUI. It appears the GUI somehow "prepares" or "corrects" the JTAG environment, allowing subsequent command-line operations to succeed.
Despite seemingly correct udev permissions and jtagd operation, there might be some underlying resource locking, driver synchronization, or hidden environment dependencies that only the GUI's startup process correctly handles.
I kindly request Terasic's assistance in identifying the root cause of this issue and providing a solution or recommended troubleshooting steps to enable reliable .jic file programming via the command line on Ubuntu, without needing to pre-initialize the environment through the GUI.
Environment Information:
Development Board: Terasic DE0-Nano (EP4CE22F17C6N FPGA)
Programmer: USB-Blaster (ID 09fb:6001)
Operating System: Ubuntu 24.04 (Latest Version)
Quartus Prime Version: Lite Edition 18.0.0 Build 614
.jic File Path Example: /home/xiaoxiu/Desktop/Simulate_test/jic/output_file_20250624.jic
Attachments:
Quartus GUI Convert Programming Files utility screenshot during .jic generation (image_849853.png)
Quartus GUI Programmer successful .jic programming log screenshot (image_9b12f5.png)
(Please include all relevant command-line outputs you've collected)
Thank you for your time and assistance!
Sincerely,