I'm trying to preserve a few values in RAM between resets, and this is not working on the MSS side at least.
Adding attribute to a struct variable with __attribute__(( noinit )), has done the job previously on other controllers. And in fact after I examine the generated map file by the linker, i see in fact, that the variable is placed into the right section : .TI.noinit, and it is marked as UNINITIALIZED.
This I placed into the data memory, or MSS_TCMB (from 0x0800_0000 onwards , whether compiler/linker finds free space to place that .TI.noinit)
However, this doesn't seem to work fully. The only case I see this working - i.e., memory is not loaded/initialized/changed/cleared at the restart - when I reset the MSS with CR4 only reset.
If I do , for example, MSS WDOG reset, then this memory is seems specifically cleared all to 0s.. This I tested with code, and also specifically writing some values to memory directly when performing reset.
I don't understand this: is MSS_TCMB data memory specifically cleared all to 0 by the hardware reset logic or is the bootloader code clearing all my MSS data memory?