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++
12606 Discussions

nios command line tools from windows

Altera_Forum
Honored Contributor II
1,080 Views

how can I start the nios2 command line tools e.g "elf2flash" 

from a windows batch file ? 

 

I can use for example  

 

%QUARTUS_ROOTDIR%\bin\cygwin\bin\bash.exe -c ". myscript" 

 

it starts the script "myscript", but the enviroment is not setup, 

there are missing some directories. 

 

if I use the following, the startup script is not called 

%QUARTUS_ROOTDIR%\bin\cygwin\bin\bash.exe --rcfile %SOPC_KIT_NIOS2%\nios2_sdk_shell_bashrc -c ". myscript"
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
277 Views

I am not a scripting expert so I can't tell you why your last try isn't working.. but it occurs to me that you could make your own rcfile, based on the one that is used to setup the environment correctly (nios2_sdk_shell_bashrc) -- then at the end of that file perform the tasks that you need scripted.

0 Kudos
Altera_Forum
Honored Contributor II
277 Views

You can script the Nios2 command line tools from the Nios II SDK Shell. You just create a .sh file and run it using "bash <name>.sh" with all your commands contained within it. 

 

To see the commands available look at your C:\<nios install directory>\bin folder
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

thanks, 

 

starting scripts from the NIOS2 SDK SHELL already works, 

 

to start a script from windows, e.g. with doppelclick from explorer, 

it works if I start my scripts in the following way: 

 

 

FILE: flash_sw_dviboot01.bat 

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

%QUARTUS_ROOTDIR%\bin\cygwin\bin\bash.exe -c ". flash_sw_dviboot01" 

pause 

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

 

 

SHELL SCRIPT: flash_sw_dviboot01 

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

source $QUARTUS_ROOTDIR/sopc_builder/bin/nios_bash 

sh flash_sw ../8DIO010_SOFTWARE/dvi_boot01/debug/dvi_boot01.elf 

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

 

however the nios startupscript "nios_bash" takes a lot of time, perhaps someone 

has a faster startup script ?
0 Kudos
Altera_Forum
Honored Contributor II
277 Views

Now you have lost me, do you want to script Nios II command line tools or just have Cygwin load one second faster??? 

 

Scripts are suppose to coordinate command based flow. Chances are if you want to script some sort of flow the amount of time for Cygwin to come up is nothing compared the execution of the script.
0 Kudos
Reply