Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17256 ディスカッション

Invoking sof2flash

Altera_Forum
名誉コントリビューター II
1,160件の閲覧回数

I'd like to run sof2flash from command line in a Cygwin Shell. 

In my script, I have 

 

# !/bin/sh -x 

export SOPC_KIT_NIOS2='c:\win\altera\72\nios2eds' 

WRK_DIR="/c/home/wrk/fpga/nios" 

SOF_FILE='C:/Home/wrk/fpga/Source/top.sof' 

SOF_FLASH='C:/images/top.flash' 

 

# Creating .flash file for the FPGA configuration 

"$SOPC_KIT_NIOS2/bin/sof2flash" --epcs --input=$SOF_FILE --output=$SOF_FLASH 

# ------ End of script ------------------ 

 

When I run this script, I get 

 

[bin$:501] update-nios.sh 

+ export 'SOPC_KIT_NIOS2=c:\win\altera\72\nios2eds' 

+ SOPC_KIT_NIOS2='c:\win\altera\72\nios2eds' 

+ WRK_DIR=/c/home/wrk/fpga/nios 

+ SOF_FILE=C:/Home/wrk/fpga/Source/top.sof 

+ SOF_FLASH=C:/images/top.flash 

+ 'c:\win\altera\72\nios2eds/bin/sof2flash' --epcs --input=C:/Home/wrk/fpga/Source/top.sof --output=C:/gac2500/images/top.flash 

: No such file or directoryin/sof2flash: line 2: c:\win\altera\72\nios2eds/bin/sh_jar.sh 

 

 

Looks like it cannot find sh_jar.sh, but 

 

[bin$:502] pwd 

/c/win/altera/72/nios2eds/bin 

[bin$:504] ls sh* 

sh_jar.sh sh_launch.pm sh_pl.sh 

[bin$:505] 

 

I am trying to run in a normal Cygwin Shell (Not Altera's Cygwin) but that 

should not matter. I did run dos2unix on the .sh files.
0 件の賞賛
2 返答(返信)
Altera_Forum
名誉コントリビューター II
486件の閲覧回数

Cygwin has a special way of handling paths. Try to use /cygdrive/c/ instead of C:\ in your paths. Replace also all \'s by /'s

Altera_Forum
名誉コントリビューター II
486件の閲覧回数

Thanks. I'll try that and report back.

返信