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] [December 2006 Threads] Strange behavior with lwIP demoPosted by hockeymonk on December 6, 2006 Hi, I am trying to use the lwIP demo for the SAM7x and have been getting some strange behavior. I am using FreeRTOS 4.1.3 with GCC 4.1.1 (with the -fomit-frame-pointer flag).
I have created two tasks UserTaskA and UserTaskB and added them to the lwIP_Rowley_demo example as shown according to the Webserver URL:
Task State Priority Stack # WEBSvr R 1 25 1 IDLE R 0 84 4 lwIP B 3 338 0 UserTaskA B 2 62 2 UserTaskB B 2 68 3 Eth_INT B 4 297 5
However when I add a simple declaration,
static xQueueHandle xWebQueue
to main (see below), the WebSvr runs for about 10 page hits and then hangs due to a data abort error within tcp_in.c. Am I missing something?
int main() { static xQueueHandle xWebQueue //statement added here
prvSetupHardware() vPIOinitialize() lwIPinit() sys_thread_new( ... ) vStartUsertasks( ... ) vTaskStartScheduler() return 0 }
My goal is to pass the xWebQueue into the spawned webserver and user tasks so that they can communicate.
Regards,
RE: Strange behavior with lwIP demoPosted by Nobody/Anonymous on December 6, 2006 Odd. The static declaration will not use stack space so this is not the problem. Could it be that the linker script does not correctly define the memory layout of your processor?
RE: Strange behavior with lwIP demoPosted by Nobody/Anonymous on December 6, 2006 WEBSvr looks short on stack too.
RE: Strange behavior with lwIP demoPosted by hockeymonk on December 9, 2006 Ugh...I simply reduced the max Heap size (in FreeRTOSconfig.h) from 22000 to 15000 and now the WebSvr works correctly. I guess my user tasks and lwIP were using a lot of RAM which was overlapping with the FreeRTOS heap thereby causing the problems. Is there a way to detect this problem during the build or at runtime?
I am using the default linker file atmel-rom.ld that came with the Rowley GCC demo.
Regards,
Hitaish
RE: Strange behavior with lwIP demoPosted by saiberion on December 11, 2006 I ran in a similar Problem.
I have tasks running using UART0 as debug shell und UART1 for communication with another board. I could invoke a command to send a message to the other board for a certain number of times. Now with reducing heap it worked for about 3 times more than before.
It would be great to detect something like that easier.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|