Quality RTOS & Embedded Software

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


Loading

size of "DATA memory"

Posted by Nobody/Anonymous on November 2, 2006
Hi

I'm working with a LPC2138 (ARM7TDMI)

Compiling the code with GCC, the final log lines are:

8 356 bytes of CODE memory
15 956 bytes of DATA memory (+ 229 absolute )
396 bytes of CONST memory

What does those values mean ? Is DATA memory the RAM that my uController will need ?

Miguel

RE: size of "DATA memory"

Posted by Nobody/Anonymous on November 2, 2006
Back again

Having a look to the log, i have seen that the make of task.c require more than 14 kbytes of DATA memory. For what ???

Thanks

RE: size of "DATA memory"

Posted by Miguel on November 2, 2006
Ooooops

It's not the task.c, it's the heap_1.c ! Sorry


Building file: ../FreeRTOS/Source/portable/MemMang/heap_1.c
Invoking: IAR ARM Compiler (C/C++)
iccarm.exe --cpu ARM7TDMI-S --cpu_mode thumb --endian little --stack_align 4 --interwork --fpu None --dlib_config "C:\Program Files\IAR Systems\Embedded Workbench 4.0\/arm/lib/dl4tpainl8n.h" --no_wrap_diagnostics --dependencies=i FreeRTOS/Source/portable/MemMang/heap_1.r79.deplist -e --require_prototypes -z9 --segment data=DATA --segment code=CODE -I"D:\projects\mv5\board" -I"D:\projects\mv5\config" -I"D:\projects\mv5\FreeRTOS" -I"D:\projects\mv5\FreeRTOS\Common\include" -I"D:\projects\mv5\FreeRTOS\Source\include" -I"D:\projects\mv5\FreeRTOS\Source\portable\IAR\LPC2000" -I"D:\projects\mv5\FreeRTOS\Source\portable\MemMang" -I"D:\projects\mv5\vw" -I"C:\Program Files\IAR Systems\Embedded Workbench 4.0\ARM\inc" -o "FreeRTOS/Source/portable/MemMang/heap_1.r79" "../FreeRTOS/Source/portable/MemMang/heap_1.c" && \
(echo "FreeRTOS/Source/portable/MemMang/heap_1.r79 heap_1.d: \\"; sed -e 's,\\,/,g' < FreeRTOS/Source/portable/MemMang/heap_1.r79.deplist | while read f; do echo "$(cygpath -u $(cygpath -dm "$f")) \\"; done) > heap_1.d; rm -f FreeRTOS/Source/portable/MemMang/heap_1.r79.deplist

IAR ARM ANSI C/C++ Compiler V4.31A/W32
Copyright 1999-2005 IAR Systems. All rights reserved.

74 bytes of CODE memory (+ 52 bytes shared)
14 208 bytes of DATA memory

Errors: none
Warnings: none
Finished building: ../FreeRTOS/Source/portable/MemMang/heap_1.c

RE: size of "DATA memory"

Posted by Nobody/Anonymous on November 2, 2006
The data should not be used by task.o but your heap function (maybe heap_1.c or heap_2.c). The size of the heap is allocated by the constant configTOTAL_HEAP_SIZE in FreeRTOSConfig.h, and is the memory pool set aside for use by the scheduler to create task control blocks, queues and the stack used by each task.

Read through the memory management section of the FreeRTOS.org site for information on this.

RE: size of "DATA memory"

Posted by Nobody/Anonymous on November 2, 2006
You can just use malloc() and free() in place of the heap_1 and heap_2 implementations. This means the configTOTAL_HEAP_SIZE does not need to allocate any RAM. But all this does is mean you have to allocate a heap from within your linker script instead so you gain nothing.

RE: size of "DATA memory"

Posted by Miguel on November 3, 2006
Great !

Thanks a lot


[ 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