Hello,
In order to implement firmware upgrade feature for CC2652PSIP, some functions must be executed from RAM. The .map-file shows that function is located in RAM, but size of binary file is more than 0x20,000,000, the expected size of binary file is 0x58,000. It looks like functions located in RAM are included in binary file.
Functions are declared by:
__attribute__((section(".TI.ramfunc"))) u32 crcImageCheck(void);
Sections in the .cmd - file look like:
SECTIONS
{
.intvecs : > FLASH_START
.text : >> FLASH | FLASH_LAST_PAGE
.const : >> FLASH | FLASH_LAST_PAGE
.constdata : >> FLASH | FLASH_LAST_PAGE
.rodata : >> FLASH | FLASH_LAST_PAGE
.cinit : > FLASH | FLASH_LAST_PAGE
.pinit : >> FLASH | FLASH_LAST_PAGE
.init_array : > FLASH | FLASH_LAST_PAGE
.emb_text : >> FLASH | FLASH_LAST_PAGE
.ccfg : > FLASH_LAST_PAGE (HIGH)
GROUP > SRAM
{
.data
#ifndef CACHE_AS_RAM
.bss
#endif /* CACHE_AS_RAM */
.vtable
.vtable_ram
vtable_ram
.sysmem
.TI.ramfunc
.nonretenvar
/*This keeps ll.o objects out of GPRAM, if no ll.o would be placed here
the warning #10068 is supressed.*/
#ifdef CACHE_AS_RAM
ll_bss
{
--library=*ll_*.a<ll.o> (.bss)
--library=*ll_*.a<ll_ae.o> (.bss)
}
#endif /* CACHE_AS_RAM */
} LOAD_END(heapStart)
.stack : > SRAM (HIGH) LOAD_START(heapEnd)
#ifdef CACHE_AS_RAM
.bss :
{
*(.bss)
} > GPRAM
#endif /* CACHE_AS_RAM */
}
The post_build step looks like:
"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/tiarmofd" "${CG_TOOL_ROOT}/bin/tiarmhex" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"
What should be done to have 0x58,000 byte binary file for project that runs functions from RAM? The FLASH image should include these functions and copy them into RAM on modem's start-up.
Thanks,
Alex