Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16642 Discussions

Why do I need to use the Nios II Command Shell to run bin2flash

Altera_Forum
Honored Contributor II
1,699 Views

Hi all, 

I am trying to automate a download process over jtag and need to run bin2flash and nios2-flash-programmer. 

 

I would like to be able to call these directly but cant seem to figure out how to run these without using the Nios II command shell. Can anyone tell me how I can either call these directly or via python? or at least give me a reason why they MUST be run in this way i.e. whats the difference between the Nios command shell and a classic bash or cmd? 

 

thanks, 

Grafne
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
741 Views

hi..... 

 

the nios command shell set the paths to quartus/bin nios2/bin and pearl 

 

... you need set pearl i guess.....  

 

 

cheers 

 

Franz Wagner
0 Kudos
Altera_Forum
Honored Contributor II
741 Views

Thanks _franz, 

SO If I take a 'normal' cmd shell and add these paths to my PATH env var then there is no reason to use the Nios II command shell? 

 

Do you know of any documentation on what paths are defined in the shell that I may have to add to my PATH? 

 

G
0 Kudos
Altera_Forum
Honored Contributor II
741 Views

hi!! 

 

...i dont know about windows cmd .....but at linux machine is the same bash........ i only run a shell script to set paths ..... 

 

look like this 

 

#!/bin/bash# Run this for a Nios II SDK bash shell export LM_LICENSE_FILE=1800@localhost SOPC_KIT_NIOS2=/opt/altera9.1/nios2eds export SOPC_KIT_NIOS2 SOPC_BUILDER_PATH_91=/opt/altera9.1/nios2eds export SOPC_BUILDER_PATH_91 unset GCC_EXEC_PREFIX QUARTUS_ROOTDIR=/opt/altera9.1/quartus export QUARTUS_ROOTDIR export PERL5LIB=/usr/lib/perl/5.10.0 bash --rcfile $QUARTUS_ROOTDIR/sopc_builder/bin/nios_bash  

 

hope i can helped...... sorry but im not familiar with this language....... 

 

 

cheers  

 

Franz Wagner
0 Kudos
Altera_Forum
Honored Contributor II
741 Views

Schönen Dank Franz!! :) 

 

A very well answered question!! I have managed to get everything I need to work so far! I was a little nervous as I had been told by a FPGA 'expert' that you MUST use the Altera shell but seems not to be the case. 

 

I now have a python script that completely automates the building of flash files (bin2flash) and downloads to a cyclone IV. One small issue but I will start another thread for it. 

 

Again, thanks for your help! 

Grafne
0 Kudos
Altera_Forum
Honored Contributor II
741 Views

dank grafne...... 

 

sound good ......:) 

 

good luck 

 

 

Franz Wagner
0 Kudos
Altera_Forum
Honored Contributor II
741 Views

I am trying to use Nios2 command shell, getting an error like No cfi table found. How do i override cfit table?

0 Kudos
Reply