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

Strange behavior with lwIP demo

Posted 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 demo

Posted 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 demo

Posted by Nobody/Anonymous on December 6, 2006
WEBSvr looks short on stack too.

RE: Strange behavior with lwIP demo

Posted 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 demo

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


[ 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