size of “DATA memory”
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
size of “DATA memory”
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
size of “DATA memory”
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 FilesIAR SystemsEmbedded 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:projectsmv5board" -I"D:projectsmv5config" -I"D:projectsmv5FreeRTOS" -I"D:projectsmv5FreeRTOSCommoninclude" -I"D:projectsmv5FreeRTOSSourceinclude" -I"D:projectsmv5FreeRTOSSourceportableIARLPC2000" -I"D:projectsmv5FreeRTOSSourceportableMemMang" -I"D:projectsmv5vw" -I"C:Program FilesIAR SystemsEmbedded Workbench 4.0ARMinc" -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
size of “DATA memory”
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.
size of “DATA memory”
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.
size of “DATA memory”
Great !
Thanks a lot