Quality RTOS & Embedded Software

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


FreeRTOS TCP Stack

Posted by lciummo on August 7, 2015

I’ve integrated the FreeRTOS labs TCP stack and it seems to work sporadically. Pings sometimes work (usually fails when host doesn’t get ARP response from board). The board seems to send out gratuitous arps periodically, and sometimes even responds to an ARP request for it’s IP. Sometimes to board will respond to connect requests from clients (SYN get SYN/ACT request), and sometimes my client just keeps retransmitting the SYN requests w/o any reponse from the board.

I’ve got a lot of IP tracing turned on. Lots of output - maybe too much. I use a EMAC driver that sends a semaphore to a task that picks up new Ethernet packets and sends them on as network buffers. Most of this seems to work OK.

I don’t have any quesses on what’s wrong, other than ARP timing looks a bit strange. Anything I should look at to pin this down more?

Thanks Larry

FreeRTOS TCP Stack

Posted by heinbali01 on August 7, 2015

Hi Larry,

Which platform and which driver ("NetworkInterface.c") are you using?

I’ve got a lot of IP tracing turned on. Lots of output - maybe too much

If you use TCP or UDP to output the IP tracing, you might end-up tracing the tracing messages.

If that happens you might want to define ipconfigTCPMAYLOG_PORT in your 'FreeRTOSIPConfig.h'. If you use e.g. port 1005 for logging define this:

#define ipconfigTCP_MAY_LOG_PORT(xPort)			( ( xPort ) != 1005 )

But I get the impression that your EMAC driver is not working properly yet. FreeRTOS is about to bring out a new release of +TCP, with several EMAC drivers.

Feel free to contact FreeRTOS directly and we'll send you a NetworkInterface.c immediately.


FreeRTOS TCP Stack

Posted by lciummo on August 9, 2015

I'm on a Freescale Kinetis Tower board - K60. The neworkinterface.c is my own. I used an EMAC.c from another FreeRtos stack (EMAC.C) that I've modified to work with ny networkinterace.c. Receive interrupts notify a networkinterface task via a counting semaphore to send the frames into the stack.

Writes are done directly from the networkinterface.c write interface via EMAC.c.

My traces are done via the SWO at 6Mhz, so while they are very busy, I don't think they are interfering.

I could use a tested networkinterface.c for Kinetis K60. If I get mine working today, I could make it availale.

BTW, What does "contact FreeRTOS" directly mean - call Richard directly?

I also need to get the FreeRTOS TCP working with SafeRTOS next week - are they any known issues with that? I assume if I map the calls over it should work OK.

Thanks again, Larry

FreeRTOS TCP Stack

Posted by heinbali01 on August 9, 2015

Hi Larry,

BTW, What does "contact FreeRTOS" directly mean - call Richard directly?

Yes or write to h.tibosch at freertos period org. Unfortunately I have no experience with Freescale products yet (Richard certainly does). But it will be usefull to have a look at your NetworkInterace.c and FreeRTOSIPConfig.h

Thanks, Hein

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


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


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