Quality RTOS & Embedded Software

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


Loading

Memory used in uIP IAR build for AT91SAM7X

Posted by baxsie on November 13, 2005
The summary of the map file for the uIP_Demo_IAR_ARM7 shows:

21 480 bytes of CODE memory
34 534 bytes of DATA memory
9 981 bytes of CONST memory

30K for code on a 256K flash part seems very reasonable. But the 34K of data for a 64K RAM part seems steep. Is there a reasonable way to reduce this requiement? How much is used by the kernal and how much is used by uIP?

Full map file here for reference:
http://www.baxsie.com/scratch/FreeRTOS_uIP_IAR_Map_AT91SAM7X-EK.txt
I also built uIP_Demo_Rowley_ARM7, which seems to say 45K flash and 15K RAM, but I'm not sure I'm reading it right.
http://www.baxsie.com/scratch/FreeRTOS_uIP_Rowley_AT91SAM7X-EK.txt

RE: Memory used in uIP IAR build for AT91SAM7X

Posted by Richard on November 13, 2005
The kernel requires RAM for the task stacks, as described in the Memory Management section of the API documentation. The amount of RAM reserved for the kernel to use is defined by configTOTAL_HEAP_SIZE in FreeRTOSConfig.h. This can be sized to whatever is appropriate for your application (how many tasks/queues/semaphores do you want to create?). The default heap size is defined to provide enough heap to run all the demo tasks. If you reduce the heap size then also remove some of the demo tasks. Most true applications will not require so many tasks. From the map file in your link you can see that the majority of RAM is going here.

The uIP memory usage is also configurable. In particular the buffer it uses to receive and create IP packets can be set as low as 200 bytes (I think?), but the demo sizes this to be around 2K (again this is from memory so can be double checked). This can be optimised for your system also. From the map file in your link the uIP buffer is using much less RAM than the heap, but still, but total uIP RAM usage is still 3K (very small for a stack!).

Finally, again from the map file, there is 7.5K allocated to SAM7_EMAC.h. This memory is used by the peripheral buffers - the RAM that the emac itself uses to pass data to and from the application. The size and number of the Tx buffers is also configurable, but the Rx buffers are fixed.

regards.


[ 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