Solved
Saving some data in RAM between Reboots.
Hello,
I am trying to add s RAM section at the end of the RAM to save
some data (states) between warm reboots, when the watchdog kicks due some
wiring problems (i2c).
I changed the ld file as:
- I reduced the stack -2k
- I reduced ram -2k
- I created a RAMAUX and afferent section.
/* LD file ... */
/* _estack = 0x20028000; -- taken out */
_estack = 0x20027800; /* new stack - 2K */
//...
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 158K /* was 160 now is - 2K */
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K
AUXRAM (rx) : ORIGIN = 0x1FFFF800, LENGTH = 0x800 /* use 2 K */
}
/// then later on at the end.
.my_ram : {
KEEP(*(.my_ram))
} > AUXRAM
/* Remove information from the standard libraries */
The program wont start.
I hangs in the startup file here:

The start hang here. Anything else I am missing.
The intend is to access it in C like
uint32_t ram_end __attribute__((section (".my_ram"))) ;
static void* __attribute__((optimize("O0"))) _ram_storage(void)
{
void* ptr = (void*)&ram_end;
return ptr;
}Thank you,
... addon
sometime this pops up from atolic

