A driver for FreeRTOS+TCP (not lwIP) is almost ready. It is developed and tested on a Microzed. TCP runs very fast with a nett speed up to 10 MB/sec (on a 100 mbit LAN).
Sean - I’m not sure if you realise, but the title of your post mentions lwIP, but the link in your post is to FreeRTOS+TCP - which are completely different products.
If you want lwIP then there is a demo in the FreeRTOS .zip file download (http://www.freertos.org/RTOS-Xilinx-Zynq.html), if you want FreeRTOS+TCP then we can send you the code (as per Hein’s post).
My mistake, for some reason I thought TCP was part of the lwip. I’m interested in freeRTOS+TCP for now. As suggested, i sent an email to the support group asking for it. Thanks.
When reading your post, many people will think: TCP is part of lwIP!
Some history:
lwIP (light-weight IP) and uIP (micro-IP) are both TCP/IP stacks, originally developed by Adam Dunkels. They are libraries for embedded applications which allow you to communicate through Ethernet / Internet. The libraries have been ported to many platforms and they are supported by, but not depending on FreeRTOS.
Since about half a year, FreeRTOS has its own TCP/IP-stack which is called FreeRTOS+TCP. It supports TCP, UDP, ICMP and it includes higher protocols like DHCP, nameservers (DNS, LLMNR, NBNS) and HTTP and FTP.
I have imported the FreeRTOS+TCP project I received over email from Richard. The HW platform says it is for ZC702. I have Microzed xc7z010 board I’m using. I’ve built the project I received, customized IP Address, default gateway etc…and when I try to run it, the application is having problems like, allocating heap memory, creating Queues in the main() etc…should the project as-is not expected to work on the board that I have? probably a stupid question but i am more of a application programmer.
Thanks. I was able to get the standalone project I received from Hein work build and work. Now I’m trying to port just the TCP portion of it into my application. But it has references to the FreeRTOS+FAT. It is not clear to me whether this is needed for TCP to work? I would like to port the minimum set possible into my application because I’m only interested in TCP.
In order to include TCP/UDP into your Xilinx application you only need to include these source files:
TCP/IP stack:
FreeRTOS-Plus-TCP\FreeRTOS_ARP.c
FreeRTOS-Plus-TCP\FreeRTOS_DHCP.c
FreeRTOS-Plus-TCP\FreeRTOS_DNS.c
FreeRTOS-Plus-TCP\FreeRTOS_IP.c
FreeRTOS-Plus-TCP\FreeRTOS_Sockets.c
FreeRTOS-Plus-TCP\FreeRTOS_Stream_Buffer.c
FreeRTOS-Plus-TCP\FreeRTOS_TCP_IP.c
FreeRTOS-Plus-TCP\FreeRTOS_TCP_WIN.c
FreeRTOS-Plus-TCP\FreeRTOS_UDP_IP.c
FreeRTOS-Plus-TCP\portable\BufferManagement\BufferAllocation_1.c
Port for Xilinx:
FreeRTOS-Plus-TCP\portable\NetworkInterface\Zynq\NetworkInterface.c
FreeRTOS-Plus-TCP\portable\NetworkInterface\Zynq\uncached_memory.c
FreeRTOS-Plus-TCP\portable\NetworkInterface\Zynq\x_emacpsif_dma.c
FreeRTOS-Plus-TCP\portable\NetworkInterface\Zynq\x_emacpsif_hw.c
FreeRTOS-Plus-TCP\portable\NetworkInterface\Zynq\x_emacpsif_physpeed.c
As you are one of the first users of this port, please keep us informed about how things are going.
Your platform has a lot of fast DDR RAM. If you want really high-speed TCP connections, allow bigger buffers.
/* Define the size of RX stream buffer for TCP sockets. */
#define ipconfigTCP_RX_BUF_LEN ( 65536 )
/* Define the size of TX stream buffer for TCP sockets. */
#define ipconfigTCP_TX_BUF_LEN ( 65536 )
/* The number of available network buffer descriptors.
Depends on how many concurrent TCP connections there will be. */
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 36
/* Normally the maximum allowed value for MTU: */
#define ipconfigNETWORK_MTU 1500
If performance is important, just play with the parameters (see also the socket option FREERTOS_SO_WIN_PROPERTIES). You can also look at the communication with a capture program like Wireshark.