I try to define const parameter in lib project (.a file in IAR) and initialize the parameter when compiled the application with the lib file Define in lib project :
.icf file :
define symbol ROM_Test_config_start__ = 0x00018000;
define symbol ROM_Test_config_end__ = 0x00018FFF;
define region TEMP_CONFIG_region = mem:[from ROM_Test_config_start__ to
ROM_factory_config_end__];
place at start of TEMP_CONFIG_region {readonly section .temp_Config_section };
Define in lib .c file :
__ro_placement const uint8_t temp_Config[6] @".temp_Config_section" ;
Define in .lib .h file (API h file ) :
extern const uint8_t temp_Config[6];
Define in application project :
Define in .c application file :
extern const uint8_t temp_Config[6]= { 0x01,0x02,0x03,0x04,0x05,};
Linker result :
Error[Li006]: duplicate definitions for "temp_Config"; in "C:\Perforce\workspace\Y2_SDK_RFD_app\RF\PowerCode2\CC13xx_Platform_source\ application\SDK_application_project_SDK_app_CC1312\Debug\Obj\main.o", and "config.o(EcoSystem_SDK_Lib_CC1312R1_v00.00.a)"
Any suggestions ?
Thanks Yaki