Hi TI staffers,
I need some help to optimize the use of available memory.
Firstly, I have changed the cc3200R1.cmd linker file to create a single block of memory where program code is automatically followed by data, this is working perfectly.
Secondly using FreeRTOS (v8.2.1) module heap5.c and function vPortDefineHeapRegions() I am creating a multi segment heap memory configuration for pvPortMalloc() and vPortFree() functionality, also working perfectly.
Thirdly, I am already reclaiming the section 0x2000-0000 to 0x2000-3FFF as 1st part of the multi segment heap but want to automate the determination of the second section to use ALL unused memory from symbol "__TI_static_base__" and ending at symbol "__stack". Using manually calculated values it runs perfectly starting with around 124kb of heap in total.
HeapRegion_t xHeapRegions[] = {
{ ( _u8 * ) 0x20000000UL, 0x04000 }, // portion of memory used by bootloader
{ ( _u8 * ) &__TI_static_base__, (size_t) &__stack },
{ NULL, 0 }
} ;
xHeapRegions[1].xSizeInBytes -= (size_t) xHeapRegions[1].pucStartAddress ;
vPortDefineHeapRegions(xHeapRegions) ;
My problem starts when I use the symbol "__TI_static_base__" in the xHeapRegions array, I get the compiler warning below although the code runs perfectly.
" warning #10229-D: output section ".data" refers to load symbol "__TI_static_base__" and hence cannot be compressed; compression "rle" is ignored "
My questions is:
How can I FORCE a segment created using the #pragma directive to always be located AFTER the LAST data segment?
Alternatively, how can I use the existing symbols to accurately and safely determine the start of unused memory that can be used as the start of the second heap segment?
Andre