noinit section of RAM not working after SDK16 update

Hi, I am experiencing a strange case here where after an update from SDK15.2 to SDK 16, the noinit section of RAM is not working anymore.

When I encounter an error of some sort, I will write a special code/number to an uint32_t variable declared as section(".noinit") before calling NVIC_SystemReset() to reboot the CPU. Then I will check the variable if the special code is written and perform action accordingly. This is all working before the update to SDK16.

After the update, I always read back 0 from the variable.

My linker script after the update remains the same (as 15.2)->

RAM (rwx) : ORIGIN = 0x20008C28, LENGTH = 0x3ffff-0x8C28-0x40

NOINIT (rwx) : ORIGIN = 0x2003ffff-0x40, LENGTH = 0x40

Do I need to change the RAM Origin since the new SoftDevice (7.0.1) might use more memory?

I've updated the flash from 0x26000 to 0x27000 to accomodate the new softdevice 7.0.1 FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xda000

I don't think I need to change bootloader linker script for the SDK update?

Here are the bootloader linker settings for reference

FLASH (rx) : ORIGIN = 0xf8000, LENGTH = 0x6000
RAM (rwx) : ORIGIN = 0x200057b8, LENGTH = 0x3a848
mbr_params_page (r) : ORIGIN = 0x000FE000, LENGTH = 0x1000
bootloader_settings_page (r) : ORIGIN = 0x000FF000, LENGTH = 0x1000
uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4

I've also increased NRF_BLE_FREERTOS_SDH_TASK_STACK from 256 to 1024 for the SDK16 update.

I am using GCC toolchain, is there anything in components/toolchain/gcc/* in the new SDK16 that could have cause the noinit failure?
I am just trying to suss out what are the SDK changes that could have caused the noinit section not to work any more. Are there other tests that I can do to help to identify the cause?

Parents Reply Children
Related