Other Parts Discussed in Thread: TMS570LS3137, , TMS570LC4357, HALCOGEN
Hello everyone,
in my project I would like to store some variable values in RAM in order to read back it again after a reset caused by an external watchdog reset.
To do it, I have created a dedicated section in section configuration and in the memory map I have reserved a portion of RAM as RAMNONINIT. This approach it is successfully used in an different project with another uP TMS570LS3137.
With the TMS570LC4357-EP this method doesn't work.
How can I do to prevent losing data stored the RAMNOINIT memory?
Best regard.
Domenico
Following the instruction placed in my C source file:
#pragma DATA_SECTION(Watchdog_ResetCounter_g, ".section_noinit")
static Watchdog_ResetCounter_t Watchdog_ResetCounter_g;
Following my linker settings:
/*----------------------------------------------------------------------------*/
/* Linker Settings */
--retain="*(.intvecs)"
-heap 0x800
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY{
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x001FFFC8
FLASH1 (RX) : origin=0x00200000 length=0x00200000
STACKS (RW) : origin=0x08000000 length=0x00001300
RAM (RW) : origin=0x08001300 length=0x0007E000
versioninfo (R) : origin=0x001FFFE8 length=0x00000018
RAMNONINIT (RW) : origin = 0x807F300, length = 0xD00
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS{
.intvecs : {} > VECTORS
.text : {} > FLASH0 | FLASH1
.const : {} > FLASH0 | FLASH1
.cinit : {} > FLASH0 | FLASH1
.pinit : {} > FLASH0 | FLASH1
.section_versioninfo : {} > versioninfo
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
.section_noinit: > RAMNONINIT, type=NOINIT
}
/*----------------------------------------------------------------------------*/