Quality RTOS & Embedded Software

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


FreeRTOS+TCP with MicroBlaze_Kintex7_EthernetLite

Posted by logicanalyzer on March 24, 2016

The FreeRTOSV8.2.3 MicroBlazeKintex7EthernetLite demo has a emaclite driver for lwIP.

I want to use FreeRTOS+TCP instead. Is there a FreeRTOS+TCP compatible driver for for the Xilinx emaclite core?

If not, how difficult would it be to adapt the lwIP emaclite driver to FreeRTOS+TCP?

-- John

FreeRTOS+TCP with MicroBlaze_Kintex7_EthernetLite

Posted by heinbali01 on March 25, 2016

Hi John,

Have you had a look at the porting guide already?

Your function xNetworkInterfaceInitialise() will be called at regular intervals until it returns pdPASS. So as long as the interface is not ready (e.g. PHY Link Status low), you return pdFAIL.

Once it has returned pdPASS, two things will happen:

  • The xNetworkInterfaceOutput() function will be called by the IP-task to have packets sent.

  • Your driver will poll RX messages and add them to a queue to the IP-task. It should also test the PHY status.

You could start with e.g. one of these drivers:


Make a choice between one of these source files:


Once it works, you can look at optimisations, such as:

#define ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM  ( 1 )
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM  ( 1 )
#define ipconfigUSE_LINKED_RX_MESSAGES          ( 1 )
#define ipconfigZERO_COPY_RX_DRIVER             ( 1 )
#define ipconfigZERO_COPY_TX_DRIVER             ( 1 )

If you have specific questions about porting you can also write to us directly


FreeRTOS+TCP with MicroBlaze_Kintex7_EthernetLite

Posted by heinbali01 on March 25, 2016

After I pressed "Post" in my last message, it said that there was a parsing error. That is now repaired

FreeRTOS+TCP with MicroBlaze_Kintex7_EthernetLite

Posted by logicanalyzer on March 25, 2016

Thanks for the reply. Let me restate my question.

The FreeRTOSV8.2.3 release has a demo for the Xinlix MicroBlaze processor on a Xilinx KC705 FPGA development board. The MicroBlazeKintex7_EthernetLite demo uses the light weight IP stack ("lwIP") and the Xilinx "emaclite" driver.

I want to use FreeRTOS+TCP instead of lwIP. Is there any chance of using the lwIP "emaclite" driver with FreeRTOS+TCP? Or is the FreeRTOS+TCP driver model so different that the lwIP driver can't be used, and a new, FreeRTOS+TCP compatible driver must be developed?

Alternately, is there a Xilinx emaclite driver for FreeRTOS+TCP?

FreeRTOS+TCP with MicroBlaze_Kintex7_EthernetLite

Posted by rtel on March 26, 2016

In any TCP/IP stack the drivers can be viewed at two levels:

1) The low level network input and output functions 2) The functions that interface the low level network input and output functions with the TCP/IP stack.

The hardest part is getting (1) to work. In this case Xilinx provide this for you, and it is the Xilinx low level drivers that are used in the lwIP example.

(2) is just wrapping the low level drivers in a function that has the prototype and behaviour expected by the TCP/IP stack - which is a lot simpler than writing and debugging the drivers in the first place. The prototype of these interface functions is not compatible between lwIP and FreeRTOS+TCP, but as you don't need to create the low level input and output functions, it should not be difficult porting to FreeRTOS+TCP. Hein has already linked to the porting documentation, and there are several examples in the FreeRTOS+TCP download.

As always, start with the easiest thing first - don't try and do anything cleaver like have a 100% zero copy driver. Just get the code working in the simplest way possible and only after it is working assess whether it meets your performance acquirements, and only if it does not meet your performance requirements adapt the simple working driver into something more complex.

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

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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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