Hi,
There is a description of priheap at the following URL.
The post at this URL says "priheap is just the primary heap", but what is the primary heap? I would like to know how to use it.
I thought the heap area was sectioned by sysmem, but what is the difference between priheap and sysmem?
As far as the linker command file is concerned, it seems that the size set by HEAPSIZE is placed in the priheap section.
* ======== MSP432E411Y_BGAEVM.cmd ========
* Define the memory block start/length for the MSP432E411Y_BGAEVM M4
*/
--stack_size=1024 /* C stack is also used for ISR stack */
HEAPSIZE = 0x20000; /* Size of heap buffer used by HeapMem */
MEMORY
{
FLASH (RX) : origin = 0x00000000, length = 0x00100000
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
}
/* Section allocation in memory */
SECTIONS
{
.text : > FLASH
.const : > FLASH
.rodata : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
/* Heap buffer used by HeapMem */
.priheap : {
__primary_heap_start__ = .;
. += HEAPSIZE;
__primary_heap_end__ = .;
} > SRAM align 8
.stack : > SRAM (HIGH)
}
========================================
Thanks,
Astro