Quality RTOS & Embedded Software

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




Loading

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:

FreeRTOS-Plus-TCP/portable/NetworkInterface/Zynq/NetworkInterface.c
FreeRTOS-Plus-TCP/portable/NetworkInterface/ATSAM4E/NetworkInterface.c

Make a choice between one of these source files:

    FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c
    FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c

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 ipconfigETHERNET_DRIVER_FILTERS_PACKETS ( 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

Regards.


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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists