Hi~
I would like to know where is heap area that can be allocated with ThreadX??
First, I checked heap size by function: qapi_Heap_Status()
I got status of free size which is over 100Kbytes.
After that, I allocated one byte space, and I found that it's address exceeds 0x10090000
I figured out my memory section below:
=========================================
[RAM_SBL_RO_MEMORY]
-----------------------0x100A0000
-----------------------0x10090000
[APP DATA]
-----------------------0x10080000
{
RAM_AON_PATCHROM_RO_MEMORY (W) : ORIGIN = 0x10001600, LENGTH = 0x4c0
RAM_AON_RO_MEMORY (W) : ORIGIN = 0x10001ac0, LENGTH = 0x140
RAM_AON_ROM_PATCHTABLE_RW_MEMORY (W) : ORIGIN = 0x10001c00, LENGTH = 0x180
RAM_AON_DATA_MEMORY (W) : ORIGIN = 0x10001dc0, LENGTH = 0x240
RAM_SOM_BSP_DATA_MEMORY (W) : ORIGIN = 0x10003c00, LENGTH = 0x500
RAM_SOM_BSP_ROM2RAM_INDIRECTION_TABLE_RW_MEMORY (W) : ORIGIN = 0x10004100, LENGTH = 0x40
RAM_SOM_DEVCFG_DATA_RW_MEMORY (W) : ORIGIN = 0x10004140, LENGTH = 0x6c0
RAM_BSP_VENEER_RO_MEMORY (RX) : ORIGIN = 0x10005600, LENGTH = 0xe00
RAM_SOM_BSP_RO_MEMORY (RX) : ORIGIN = 0x10006400, LENGTH = 0x1200
RAM_SOM_BSP_HEAP_MEMORY (W) : ORIGIN = 0x1000e680, LENGTH = 0x1200
RAM_SOM_BSP_STACK_MEMORY (W) : ORIGIN = 0x1000f880, LENGTH = 0x780
RAM_SOM_APPS_DATA_MEMORY (W) : ORIGIN = 0x1000d000, LENGTH = 0x1400
RAM_FOM_BSP_ROM2RAM_INDIRECTION_TABLE_RW_0_MEMORY (W) : ORIGIN = 0x10016800, LENGTH = 0x200
RAM_FOM_BSP_ROM2RAM_INDIRECTION_TABLE_RW_1_MEMORY (W) : ORIGIN = 0x10016a00, LENGTH = 0x200
RAM_FOM_DEVCFG_DATA_RW_MEMORY (W) : ORIGIN = 0x1001d400, LENGTH = 0xc00
RAM_FOM_BSP_DATA_MEMORY (W) : ORIGIN = 0x10016c00, LENGTH = 0x6800
RAM_FOM_BSP_STACK_MEMORY (W) : ORIGIN = 0x100af800, LENGTH = 0x800
RAM_FOM_BSP_RO_MEMORY (RX) : ORIGIN = 0x10025000, LENGTH = 0x21000
RAM_FOM_APPS_RO_MEMORY (RX) : ORIGIN = 0x10046000, LENGTH = 0x3a000
RAM_FOM_APPS_DATA_MEMORY (W) : ORIGIN = 0x10080000, LENGTH = 0x10000
RAM_SBL_RW_MEMORY (W) : ORIGIN = 0x100a2000, LENGTH = 0x6000
RAM_SBL_ZI_MEMORY (W) : ORIGIN = 0x100a8000, LENGTH = 0x2000
SBL_LOG_META_INFO_RW_MEMORY (W) : ORIGIN = 0x100aa000, LENGTH = 0x40
SBL_LOG_BUF_RW_MEMORY (W) : ORIGIN = 0x100aa040, LENGTH = 0x1000
XIP_RO_MEMORY (RX) : ORIGIN = 0x1000000, LENGTH = 0x180000
RAM_DIAG_STRING_RO_MEMORY (W) : ORIGIN = 0x40000000,LENGTH = 0x2000
}
Can you please refer to section 4.3.4(Resize application memory) in 80-YA121-142 document. Heap starts at the end of APP data region. If your application code does not use all of the allocated app data region then its used for heap.
Thanks for your assistance.
I also found It describes "SBL ends (reclaimed as HEAP)", in programmers_guide section 4.2 QCA402X boot flow,
It can expliain why some of memory can be allocated in SBL section.