Quality RTOS & Embedded Software

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


Loading

FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 7, 2005
Did anybody implement (try to implement) this?
I can run uIP+ATmega128 without FreeRTOS, it works OK, but I tried to run uIP (without modification) with FreeRTOS and failed. At the first glance it looks like some global variables get corrupted:
uIP uses {volatile unsigned short uip_len} global var and uip_len can be modified unpredictably (i.e. I initialize it to zero and immediately printf to the usart debug port, and the value is not zero).
Things became better when I used {static volatile unsigned short uip_len} - no unpredictable changes (although still no result), but in the IAR example included with FreeRTOS no static modificator used for this variable (although it uses modified uIP - with interrupts and semaphores).
I would like to use the original (polling version of uIP with timer0), what would be the start point to get it working?

Thanks for any suggestions,
Alexander.

RE: FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 7, 2005
Do you have the uIP statck running in the same task as the application that uses uIP?

For example, the ARM uIP demo implements a WEB server. The uIP and HTTP components are both in the same task. The uIP stack uses the uIP variables (uip_len, etc.) to send and receive. The HTTP components use the uip variables to read from and write to the uIP buffers. If they are in the same task then you are guaranteed that they wont both try and access the variables at the same time. If they are not in the same task then some mutual exclusion of the variables will have to be implemented.

RE: FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 7, 2005
Really fast reply...
Yes, they are in the same task (I use AVRGCC by the way)

Alexander.

RE: FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 7, 2005
Could it be a stack problem? The function call nesting depth means the uIP task will require a good bit more stack.

There is not RAM available. How big is the uIP buffer being user?

RE: FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 7, 2005
That should not be stack - I tried with different sizes (150-1000 byte).
UIP_BUFSIZE was 100-1500.

the RAM available on MCU is 4K

RE: FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 7, 2005
Got it!
Playing around uip's UIP_BUFSIZE (512byte) and FreeRTOSConfig.h parameters (configTOTAL_HEAP_SIZE=1500, configMINIMAL_STACK_SIZE=128byte, stack size in xTaskCreate() = 150). Looks like it was a problem with stack/heap size indeed, silly me!

Thanks,
Alexander.

RE: FreeRTOS+ATmega128+uIP

Posted by Nobody/Anonymous on October 10, 2005
What is the difference between uIP stack and lwIP stack?

RE: FreeRTOS+ATmega128+uIP

Posted by Richard on October 10, 2005
See table 1 in:
http://www.sics.se/~adam/mobisys2003.pdf
for (slightly out of date) information.


[ 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