Modifying linker to keep all ram after soft reset
Hi, everyone.
I am using stm32l496 and I my application requires me to keep all data in ram after reset. Now i followed these instructions in this link.
https://interrupt.memfault.com/blog/noinit-memory
it works, like I expected but the thing is I want to not lose any data that is in the ram after softreset.
Now I one solution could be to write __attribute_((section(".noinit"))) to every variable, but I think it is so trivial and better solutions are out there. So please guide me.
I also tried to modify data and bss section but that completely breaks the code so I stopped messing with it.
right now this is the section i made which works
.noinit (NOLOAD): { /* place all symbols in input sections that start with .noinit */ KEEP(*(*.noinit*)) } >RAM
instead of making separate memmory location I kept this section in ram .