Tool/software: Code Composer Studio
Below mentioned is code written in linker file for allocating memory to persistent variables,
Memory is allocated starting at 0x4000 address,
The persistent variables are configuration of water meter
My problem is when i program the code memory with new program all these variables reset to default value
Is there any way to retain these variable values while programing new code into the FRAM
can below mentioned program be modified so that I can allocate 0x4000 to 0x43ff as information memory and 0x4400 onwards as code memory
So 0x4000 to 0x43ff memory segment neither erased nor overwritten while while programming new code into the FRAM
GROUP(RW_IPE)
{
GROUP(READ_WRITE_MEMORY)
{
// Place USS configuration at top of memory
uss_config :
{
//USS_userConfig.obj(.TI.persistent:checksum16bit)
//USS_userConfig.obj(.TI.persistent:checksum8bit)
// USS_userConfig.obj(.TI.persistent:app_code_crc_ccitt)
USS_userConfig.obj(.TI.persistent:gUssSWConfig)
USS_userConfig.obj(.TI.persistent:ussSystemConfig)
USS_userConfig.obj(.TI.persistent:ussMeterConfig)
USS_userConfig.obj(.TI.persistent:ussMeasurementConfig)
USS_userConfig.obj(.TI.persistent:ussPLLConfig)
USS_userConfig.obj(.TI.persistent:ussCaptureConfig)
USS_userConfig.obj(.TI.persistent:ussTriggerConfig)
USS_userConfig.obj(.TI.persistent:ussInterruptConfig)
USS_userConfig.obj(.TI.persistent:ussAlgConfig)
USS_userConfig.obj(.TI.persistent:ussPulseConfig)
USS_userConfig.obj(.TI.persistent:singDualToneConfig)
USS_userConfig.obj(.TI.persistent:gUserConfg)
USS_userConfig.obj(.TI.persistent:gdataloggpara)
USS_userConfig.obj(.TI.persistent:comm_para)
}
.TI.persistent : {} /* For #pragma persistent */
.cio : {} /* C I/O Buffer */
.sysmem : {} /* Dynamic memory allocation area */
} PALIGN(0x0400), RUN_START(fram_rw_start)
GROUP(IPENCAPSULATED_MEMORY)
{
.ipestruct : {} /* IPE Data structure */
.ipe : {} /* IPE */
.ipe_const : {} /* IPE Protected constants */
.ipe:_isr : {} /* IPE ISRs */
} PALIGN(0x0400), RUN_START(fram_ipe_start) RUN_END(fram_ipe_end) RUN_END(fram_rx_start)
} > 0x4000