Quality RTOS & Embedded Software

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


Loading

configTOTAL_HEAP_SIZE and lwIP

Posted by Nobody/Anonymous on January 17, 2006
I'm currently testing the "lwIP_Demo_Rowley_ARM7" for AT91SAM7X. I try to
reduce RAM usage without affect the WEB page application (BasicWEB.c). I
removed all .c files in Demo App folder except for main.c, heap.c and
BasicWEB.c.

It looks like I cannot reduce "configTOTAL_HEAP_SIZE" under 10000 without
affecting the WEB page functionality. Is this normal ? Is there a mimimum
to allow to configTOTAL_HEAP_SIZE ?

Thanks

RE: configTOTAL_HEAP_SIZE and lwIP

Posted by Richard on January 17, 2006
I would expect to get it under that, but have not tried.

As downloaded:
The lwIP task has a stack size of 600*4 bytes,
The WebSvr task stack has a size of 250*4 bytes, and
The ETH_INT task stack has a size of 350*4 bytes.

If you have removed all the other demo tasks you are left with the idle task stack (small) and a few queues, TCB, etc. 10000 would seem more than enough. Maybe there is a large queues used by the lwIP code somewhere, can't remember.

The FreeRTOS kernel itself tries where possible not to use too much stack. The lwIP code uses standard libraries (not efficient in GCC, but better if you are using Rowleys build), and is outside of the FreeRTOS kernel and therefore does not have the same design goal. This is the reason for the 600*4 stack used by the lwIP task.

I would suggest setting a break point in the function pvPortMalloc() in the file heap_2.c. When the execution breaks here you can inspect the xWantedSize value (the number of bytes being obtained), and see when large chunks of memory are being allocated and why. This will assist in diagnosis.

Are you using command line GCC or Rowley?

Regards.

RE: configTOTAL_HEAP_SIZE and lwIP

Posted by Nobody/Anonymous on January 18, 2006
I'm using Rowley.


[ 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