Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
907 Views

nios2-download on command line not working

I am attempting to use the demo project for the DE3 DDR2 example. 

 

Whenever the batch file (contents listed way below) gets to the line nios2-download, it gives errors about the command. 

I tried running it in cygwin (my install) as well as its batch file which calls the nios version of cygwin but it gives the same errors: 

 

Any clues on what's going on?  

 

 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 2: $'\r': command not found 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 4: $'\r': command not found 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 15: $'\r': command not found 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 17: $'\r': command not found 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 23: $'\r': command not found 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 25: syntax error near unexpected token 

`$'{\r'' 

'cygdrive/c/altera/13.0sp1/nios2eds/bin/nios2-download: line 25: `{ 

 

 

 

 

$ more de3_ddr2.bat 

%QUARTUS_ROOTDIR%\\bin\\quartus_pgm.exe -z -m JTAG -c USB-Blaster[USB-0] -o "p;DE3_DDR2.sof" 

@ "%QUARTUS_ROOTDIR%\bin\cygwin\bin\bash.exe" --rcfile ".\de3_ddr2_bashrc" 

pause
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
95 Views

I´m experiencing exactly the same problem. 

Were you able to find the solution to that? 

 

I´m using Win7-64 and have cygwin installed. 

 

Cheers, 

Bruno
Altera_Forum
Honored Contributor I
95 Views

Its been so long ago that I had this but I think it was a problem of the unix to dos problem. So, I remember taking all the script files (plain text) and running the dos2unix on the file. Do, nios2-download is a script call to other files some executables. So, do this on that file 

 

dos2unix nios2-download 

 

And it changes the line endings to the right format for cygwin. I think if you ran the command in windows command window, it would be needed but cygwin is Unix-like.  

 

 

--- Quote Start ---  

I´m experiencing exactly the same problem. 

Were you able to find the solution to that? 

 

I´m using Win7-64 and have cygwin installed. 

 

Cheers, 

Bruno 

--- Quote End ---  

Reply