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

Socket Programming without RTOS

Altera_Forum
Honored Contributor II
2,447 Views

Hi all, 

 

I am new to RTOS but I have done socket programming in Windows. I need to implement a socket application in NIOS. However I am a newbie to MicroC or, for that matter, any RTOS. Is there some way through which I can implement my C socket programs as such, in NIOS, without learning RTOS.
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
1,315 Views

You have to use a LWIP implementation that doesn't use any OS. 

An so you cannot use api socket as in windows, but raw api.  

I'm tryng..good luck!!!!!!!!
0 Kudos
Altera_Forum
Honored Contributor II
1,315 Views

Where is such LWIP implementation available? What do you mean by ram api....what all will be missing from the actual api?

0 Kudos
Altera_Forum
Honored Contributor II
1,315 Views

You can find all in the forum TESTED IP 

here the link: http://www.niosforum.com/forum/index.php?a...&f=16&t=949&st= (http://www.niosforum.com/forum/index.php?act=st&f=16&t=949&st=

 

you have to see for standalone system 

 

Documentation of raw API that i found is only rawapi.txt 

I'm studing it but i'm becoming crazy! 

 

Say me if you'll find something else about raw api for LWIP
0 Kudos
Altera_Forum
Honored Contributor II
1,315 Views

The LWIP stack without an RTOS is not sockets API compliant; it has its own API and the receive is likely interrupt-callback-based. Having an RTOS can actually make things easier once you're familiar. I found that the Micrium textbook that discusses the MicroC/OS features to be very good. 

 

As an alternative you could try out eCOS; there are books available on it, and I believe it includes a sockets-compliant stack. eCOS is (I believe) free; uC/OS is not (well, free for use on the nios dev boards with purchase of a nios kit), but I understand that purchasing a license for an end application gives you support from Micrium as well. Micrium also has a network stack product.
0 Kudos
Altera_Forum
Honored Contributor II
1,315 Views

 

--- Quote Start ---  

originally posted by jesse@Sep 15 2005, 11:26 AM 

the lwip stack without an rtos is not sockets api compliant; it has its own api and the receive is likely interrupt-callback-based. having an rtos can actually make things easier once you're familiar. i found that the micrium textbook that discusses the microc/os features to be very good. 

 

as an alternative you could try out ecos; there are books available on it, and i believe it includes a sockets-compliant stack. ecos is (i believe) free; uc/os is not (well, free for use on the nios dev boards with purchase of a nios kit), but i understand that purchasing a license for an end application gives you support from micrium as well. micrium also has a network stack product. 

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

--- quote end ---  

 

--- Quote End ---  

 

 

Hi, 

 

the same problem here.... Programming sockets in windows is easy, but when it comes to the FPGA it gets more complicated. My collegue made an application in Delphi which uses INDY-components. It&#39;s very easy to connect to another PC. Is it possible to let these communicate!? When you don&#39;t use the &#39;standard&#39; sockets? 

 

Cheers, 

 

Danny
0 Kudos
Altera_Forum
Honored Contributor II
1,315 Views

 

--- Quote Start ---  

originally posted by jesse@Sep 15 2005, 11:26 AM 

as an alternative you could try out ecos; there are books available on it, and i believe it includes a sockets-compliant stack. 

--- Quote End ---  

 

The book that I know about is more or less out of print (the copies I was able to obtain from Amazon.com after a few months had some serious misprints), but the PDF of the book is available online (which I just went and printed out). Its TCP/IP stack is ported from FreeBSD and uses the BSD socket API. It took little work to port our Unix/Linux/MacOSX Socket C++ class to eCos. 

 

The main thing to realize is that there&#39;s no "/etc/hosts" file in eCos; it uses DNS exclusively for name lookup. Also, it supports DHCP, BOOTP, and static IP out of the box. 

 

 

--- Quote Start ---  

originally posted by jesse@Sep 15 2005, 11:26 AM 

ecos is (i believe) free; 

--- Quote End ---  

 

It is LGPL free-as-in-speech, as well as being a free download from these forums.
0 Kudos
Altera_Forum
Honored Contributor II
1,315 Views

 

--- Quote Start ---  

originally posted by mike desimone+nov 3 2005, 06:27 pm--><div class='quotetop'>quote (mike desimone @ nov 3 2005, 06:27 pm)</div> 

--- quote start ---  

<!--quotebegin-jesse@Sep 15 2005, 11:26 AM 

as an alternative you could try out ecos; there are books available on it, and i believe it includes a sockets-compliant stack. 

--- Quote End ---  

 

The book that I know about is more or less out of print (the copies I was able to obtain from Amazon.com after a few months had some serious misprints), but the PDF of the book is available online (which I just went and printed out). Its TCP/IP stack is ported from FreeBSD and uses the BSD socket API. It took little work to port our Unix/Linux/MacOSX Socket C++ class to eCos. 

 

The main thing to realize is that there&#39;s no "/etc/hosts" file in eCos; it uses DNS exclusively for name lookup. Also, it supports DHCP, BOOTP, and static IP out of the box. 

 

 

--- Quote Start ---  

originally posted by jesse@Sep 15 2005, 11:26 AM 

ecos is (i believe) free; 

--- Quote End ---  

 

It is LGPL free-as-in-speech, as well as being a free download from these forums. 

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

[/b] 

--- Quote End ---  

 

 

I would like to use it, but I have to do it without an OS. As in interm, this is the first time that I work with NIOS and they want me to base everything on the stand alone version of LWIP. 

 

Danny
0 Kudos
Reply