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+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 ]    [ 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