FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2005 Threads] FreeRTOS+ATmega128+uIPPosted 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+uIPPosted 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+uIPPosted 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+uIPPosted 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+uIPPosted 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+uIPPosted 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+uIPPosted by Nobody/Anonymous on October 10, 2005 What is the difference between uIP stack and lwIP stack?
RE: FreeRTOS+ATmega128+uIPPosted by Richard on October 10, 2005 See table 1 in: http://www.sics.se/~adam/mobisys2003.pdf for (slightly out of date) information.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|