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


size of "DATA memory"

Posted by Nobody/Anonymous on November 2, 2006

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 ?


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 ???


RE: size of "DATA memory"

Posted by Miguel on November 2, 2006

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 ]    [ 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