Hi,
I have a requirement to add a specific variable in my firmware and it should be located after the flash usage of my firmware in the flash. I am trying to add that up in the linker file and see if the memory is allocated for the same in the flash by looking into map file. However, the variable is not appearing after the end of the flash usage but before TI specific links.
In linker .cmd file
SECTIONS
{
.intvecs : > FLASH_START
.text : >> FLASH
.const : >> FLASH
.constdata : >> FLASH
.rodata : >> FLASH
.cinit : > FLASH
.pinit : >> FLASH
.init_array : > FLASH
.emb_text : >> FLASH
//for ccfg memory allocation refer to BIM linker file
.ccfg : > FLASH_LAST_PAGE (HIGH)
// Below section must be last
.flash_usage_end : > FLASH
........................
In source code:
#pragma DATA_SECTION(test_array, ".flash_usage_end")
#define TEST_ARRAY_SIZE (size_t)(64) // bytes
const uint8_t test_array[TEST_ARRAY_SIZE] = {1, 2, 3};
After the code links and HEX file is created, the MAP file shows following:
0001c466 cryptoMode 0001c467 ecdhMode 0001c468 test_array // test_array appears before _ccfg to __TI_CINIT_Limit 0001c4a8 __ccfg 0001c500 __TI_static_base__ 0001c974 __TI_Handler_Table_Base 0001c980 __TI_Handler_Table_Limit 0001c9e0 __TI_CINIT_Base 0001ca48 __TI_CINIT_Limit // test_array should appear here 00058000 __UNUSED_FLASH_end__ 10007000 __checksum_begin 10007001 ROM_BASE_ADDR 10007005 llProcessSlaveControlPacket
Can you suggest what change needed in the linker file to get the test_array located after the end of the flash being used in the firmware i.e after __TI_CINIT_Base?