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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Installing or upgrading cygwin for nios2 5.0

Altera_Forum
Honored Contributor II
1,902 Views

I'd like to upgrade the version of cygwin that came with nios2 5.0. Is this possible? Newer versions of the cygwin dll have fixed a few problems with stty and io redirection.  

 

I have read that I cannot have a standard cygwin install alongside the custom cygwin/nios2 install without running into problems. Is this still true with 5.0? 

 

I'd like to create a native utility to work with the existing altera tools. I am assuming I can only target nios with the installed nios2-elf-gcc. What version of native gcc&libraries works with the 5.0 install? Does the custom cygwin correspond to some standard released version? 

 

thanks
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
841 Views

Hi tns1, 

 

> I'd like to upgrade the version of cygwin that came with nios2 5.0. Is this possible? 

 

Not sure. I have some problems when I try to mix the environments. I can use the 

nios2 binutils, gcc, etc. without problems when building u-boot for example. However, 

u-boot is completely self-contained (no HAL, uses its own crt0, etc). 

 

So far I haven't mustered the time or energy to really dig into this -- since I have 

cygwin X alongside the Nios II environment just for the X ... I'm a gnome junky ;-) 

But again, nios2-elf-xxx work fine under the alternate cygwin (and I can at least 

get some other tools to execute with --help option). I'm pretty sure you could get 

things working given you can setup the proper environment variables an paths. 

 

> I have read that I cannot have a standard cygwin install alongside the custom 

> cygwin/nios2 install without running into problems. Is this still true with 5.0? 

 

I'm using CYGWIN_NT-5.1 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 alongside of 

Nios II 5.0 without any problems (yet) -- it's just the latest from cygwin.org. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
841 Views

I have my own install of cygwin in C:/cygwin that I keep separate from my Quartus/Nios cygwin(s).  

 

Unfortunately, the nios_bash scripts and their ilk in Quartus/Nios are rather scorched-earth, overwriting your PATH variable and such, so I haven't found a simple way for my cygwin environs to pull in everything from Altera without breaking things. 

 

That said, it isn't hard, on a case-by-case basis, to add those things you need (paths and such) to your own cygwin environment. There are a couple of SOPC-related environment variables added to the Windows environment, so all the cygwins will pick them up. 

 

Also, keeping your own cygwin separate prevents problems with incompatible versions, and there is no need to reinstall everything when you get a new Quartus or Nios2.
0 Kudos
Altera_Forum
Honored Contributor II
841 Views

I don't want to break anything that I can't fix easily. Right after I install cygwin, what paths should I be looking at/fixing to make the altera tools work normally?  

 

thanks
0 Kudos
Altera_Forum
Honored Contributor II
841 Views

 

--- Quote Start ---  

originally posted by tns1@Oct 11 2005, 02:49 PM 

i don't want to break anything that i can't fix easily. right after i install cygwin, what paths should i be looking at/fixing to make the altera tools work normally? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10310) 

--- quote end ---  

 

--- Quote End ---  

 

I don&#39;t know offhand, but I&#39;ll tell you how to find them. 

 

The complex way is to open an SOPC Shell window and type "echo $PATH", then open a "normal" cygwin window and do the same thing. Compare the two path setups, then change your .bashrc to add the paths you need. (If you don&#39;t know bash, you should get the O&#39;Reilly book learning bash.) 

 

The slightly simpler way is just to try to do things in your normal cygwin shell, and when it says it can&#39;t find a command, open an SOPC shell and type "type name_of_command" and it should tell you what the full path to the command is. Then just add that path to your .bashrc. This avoids picking up lots of paths you don&#39;t need.
0 Kudos
Altera_Forum
Honored Contributor II
841 Views

What I did was to make sure to save a copy of all the settings  

&#39;%set > setsaved1.txt&#39; in the nios shell before I installed the standard cygwin. After I installed &#39;standard&#39; cygwin, I repeated this process in both the nios terminal and the new &#39;standard&#39; cygwin shell. Next I opened and closed quartus and the IDE, and saved yet more copies of the settings. I have done a limited amount of work in each cygwin environment and so far I don&#39;t see any of the original settings being overwritten for either environment.  

 

The i686 code I compiled under the new cygwin environment also seems to run OK in the nios shell.
0 Kudos
Reply