Forum Discussion
Altera_Forum
Honored Contributor
21 years agonios command line tools from windows
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"4 Replies
- Altera_Forum
Honored Contributor
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.
- Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
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 ? - Altera_Forum
Honored Contributor
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.