Tool/software:
hi.
I want to secure additional code + variable memory space by allocating variable areas (ex: .bss or systemHeap)
that do not need initialization at boot time within SBL to L3 memory.
The above method works normally in our application program.
Since the SBL code (.text) section is loaded into DATA_RAM, there is not enough memory to put in additional implementation.
Below is the linker.cmd file with the modifications applied to SBL.
/*----------------------------------------------------------------------------*/ /* xwr_r4f.cmd */ /* */ /* (c) Texas Instruments 2018, All rights reserved. */ /* */ /* USER CODE BEGIN (0) */ /* USER CODE END */ /*----------------------------------------------------------------------------*/ /* Linker Settings */ --retain="*(.intvecs)" #define MMWAVE_SYS_L3RAM_SIZE (MMWAVE_L3RAM_NUM_BANK*MMWAVE_SHMEM_BANK_SIZE) /*----------------------------------------------------------------------------*/ /* Memory Map */ MEMORY{ VECTORS (X) : o = 0x00000000, l = 0x00000100 PROG_RAM (RWX) : o = 0x00000100, l = 0x0003FF00 DATA_RAM (RWX) : o = 0x08000000, l = 0x00030000 L3_DATA_RAM (RW) : o = 0x510F0000, l = 0x00010000 } /*----------------------------------------------------------------------------*/ /* Section Configuration */ SECTIONS{ .intvecs : {} > VECTORS .text : {} > PROG_RAM ALIGN(8) run = DATA_RAM, LOAD_START(_libLoadStart), LOAD_END(_libLoadEnd), RUN_START(_libRunAddr) .const : {} > PROG_RAM ALIGN(8) run = DATA_RAM, LOAD_START(_constLoadStart), LOAD_END(_constLoadEnd), RUN_START(_constRunAddr) .cinit : {} > PROG_RAM ALIGN(8) .init_array : {} > PROG_RAM ALIGN(8) .pinit : {} > PROG_RAM ALIGN(8) .data : {} > DATA_RAM .stack : {} > DATA_RAM ALIGN(32) .bss : {} > L3_DATA_RAM ALIGN(8) .sysmem : {} > DATA_RAM ALIGN(8) } /*----------------------------------------------------------------------------*/
When this is applied,
it was confirmed that the total image size (totalLength) is normally acquired through metaheader parsing in SBL_imageLoader(),
but a deadlock occurs afterwards.
I assumed it was due to a problem with the cache settings,
so I put the code below inside main(), but I could not confirm the effect.
/* blahblah */ #include <ti/sysbios/hal/Cache.h> /* blahblah */ int main (void) { Cache_wbInv((uint32_t*)0x510F0000U, 0x10000U, Cache_Type_ALL, TRUE); SBL_init(); return 0; }
Is there any way to fix this?
thanks