Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

lwip for Zynq

Posted by seanbzd on May 11, 2015

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

Posted by heinbali01 on May 12, 2015

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

Posted by rtel on May 12, 2015

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

Posted by heinbali01 on May 12, 2015

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

Posted by seanbzd on May 12, 2015

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

Posted by heinbali01 on May 12, 2015

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

Posted by seanbzd on May 14, 2015

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

Posted by rtel on May 14, 2015

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

Regards.


lwip for Zynq

Posted by seanbzd on May 14, 2015

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

Posted by rtel on May 14, 2015

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

Regards.


lwip for Zynq

Posted by heinbali01 on May 15, 2015

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

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner