Hi,
I'm using the nRF Connect SDK 2.5.1 with the nRF5340 and MCUBoot as bootloader. I want to store some information about the reboot reason (and some other stuff) in the noinit region to save it across a restart. I placed the variables in the noinit region like this:
static __noinit volatile unsigned int reset_reason;
But on the next boot my whole noinit region is set to 0xFF. I think this comes from MCUBoot as in the map files I can see the noinit region of my application overlaps with the mock_flash region of the flash simulator from MCUBoot (which is needed to transfer the image to the network core afaik). The answer here does not provide a soultion for that, even though the question seems similar.
build/mcuboot/zephyr/zephyr.map:
.bss.mock_flash
0x00000000200060da 0x40000 zephyr/drivers/flash/libdrivers__flash.a(flash_simulator.c.obj)
build/zephyr/zephyr.map:
noinit 0x000000002001af70 0x13888
*(SORT_BY_ALIGNMENT(.noinit))
*(SORT_BY_ALIGNMENT(.noinit.*))
...
What is the proper way to keep my noinit section? Please give an example if possible.
Best regards,
Lars