lwip for Zynq

Is there a lwip package available from freertos that I can use on my microzed? I tried to follow instructions from http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusTCP/TCPNetworkingTutorialAddingSourceFiles.html but I’m stuck on step 2 talking about “creating network drivers for other chips”. The downloaded package says “ToBeReleasedSoon.txt” for this step. Any ideas? Thanks.

lwip for Zynq

Hi Sean, 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). If you like drop an email to http://www.freertos.org/RTOS-contact-and-support.html and we will send you the driver as it is now. Regards.

lwip for Zynq

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). Regards.

lwip for Zynq

And if you decide to use lwIP, you may also contact us 🙂 I’m curious about the experiences with the EMAC drivers that are used for lwIP. Thanks, Hein

lwip for Zynq

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.

lwip for Zynq

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. Regards.

lwip for Zynq

Hein, Thanks for the clarification. 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.

lwip for Zynq

Hein has sent you a hardware project for the Microzed xc7z010. Regards.

lwip for Zynq

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.

lwip for Zynq

FreeRTOS+FAT is only needed if you want to run the FTP or HTTP servers. Regards.

lwip for Zynq

Hi Sean, In order to include TCP/UDP into your Xilinx application you only need to include these source files:
TCP/IP stack:
    FreeRTOS-Plus-TCPFreeRTOS_ARP.c
    FreeRTOS-Plus-TCPFreeRTOS_DHCP.c
    FreeRTOS-Plus-TCPFreeRTOS_DNS.c
    FreeRTOS-Plus-TCPFreeRTOS_IP.c
    FreeRTOS-Plus-TCPFreeRTOS_Sockets.c
    FreeRTOS-Plus-TCPFreeRTOS_Stream_Buffer.c
    FreeRTOS-Plus-TCPFreeRTOS_TCP_IP.c
    FreeRTOS-Plus-TCPFreeRTOS_TCP_WIN.c
    FreeRTOS-Plus-TCPFreeRTOS_UDP_IP.c
    FreeRTOS-Plus-TCPportableBufferManagementBufferAllocation_1.c

Port for Xilinx:
    FreeRTOS-Plus-TCPportableNetworkInterfaceZynqNetworkInterface.c
    FreeRTOS-Plus-TCPportableNetworkInterfaceZynquncached_memory.c
    FreeRTOS-Plus-TCPportableNetworkInterfaceZynqx_emacpsif_dma.c
    FreeRTOS-Plus-TCPportableNetworkInterfaceZynqx_emacpsif_hw.c
    FreeRTOS-Plus-TCPportableNetworkInterfaceZynqx_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. Regards.