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

free tcp/ip stack for nios

Altera_Forum
Honored Contributor II
3,067 Views

Hello yet again, 

Is there a free tcp/ip stack that can work with the nios? I have an external device that is sending and receiving hdlc packets which then sends it up to their tcp/ip stack. I want to be able to do the same with the nios, at least negotiate a simple connection via something like a telnet session. Is there anything out there for the nios that i can try out?  

I almost forgot to mention that I will be trying to attempt this without an rtos, but if an rtos is definitely required, then i will try that too. 

 

 

thanx, 

-Quan
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
643 Views

nios (I not II) you can use plugs. Info in the documentation. 

Nios II you can use LWIP (I think this requires an rtos, but not sure off the top of my head.)
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Hello, 

 

If you are using Nios II (evaluation version is available from the Altera website) which I recommend for a new design you can use the free stand alone lwip TCP/IP stack (runs without RTOS). Microtronix has ported this one. You can download the software package from the forum here (stand alone lwip (http://www.niosforum.com/forum/index.php?act=st&f=16&t=56)). 

 

Bye, 

niosIIuser
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Cool thanx guys. 

I will look into trying both stacks to see if I can get it to work correctly. 

 

Also, can someone help point me in the right direction on how to properly hook into the stack? I mean like try to establish a ppp link from a nios board to a pc to test? or is this way off topic of nios discussion? <---- if so i&#39;m sorry, i&#39;m just trying to get some ideas. 

 

 

-Quan
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Quan, 

 

For the plugs library, there are documented examples that will show up in your sdk/src/plugs folder ready to build. Plugs uses a non-standard API, but it is well documented in the Plugs Referene Manual (PDF doc, on Altera web site). 

 

For LWIP (uCOS version), we provide two TCP servers and one UDP client as examples (go to make a new Nios II software design in the IDE and you should see these). The source code for these is *very* well documented (in my opinion anyways). A colleague of mine is also working on a tutorial document/design for LWIP (uCOS version) that will be publicly available soon. The API is Berkeley sockets... many good textbooks on this. 

 

For LWIP (standalone version), I have not tried it yet, but I believe it includes a web server example design.
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Quan, 

 

Just to add a bit to this topic, the stand-alone version of LWIP does, indeed, have an example web server design. In fact, there&#39;s even a script which automates the generation of a RAM-based file system for you... 

 

Be aware, however, that installing this will modify (small changes) the HAL directory in components/avalon_altera_lwip (or something like that) of your Nios II kit. 

 

 

Cheers, 

 

- Brendan
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

thanx for the heads up guys. I did install the lwip stand alone version and got the webserver demo working. Everything is working like it should.  

This stuff is definitely fun to play around with.  

 

-Quan
0 Kudos
Reply