This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I remove the NOINIT region in the bootloader linker file

I'm using the bootloader_secure_ble example from SDK 13 on an nRF52832. I'm using the GCC toolchain. Here is an extract of the linker file from the example:

MEMORY
{
  /* ... */

  /** RAM Region for bootloader. This setting is suitable when used with s132. */
  RAM (rwx) :  ORIGIN = 0x20002C00, LENGTH = 0x5380

  /** Location of non initialized RAM. Non initialized RAM is used for exchanging bond information
   *  from application to bootloader when using buttonluss DFU OTA.
   */
  NOINIT (rwx) :  ORIGIN = 0x20007F80, LENGTH = 0x80

  /* ... */
}

SECTIONS
{
  /* ... */

  /* No init RAM section in bootloader. Used for bond information exchange. */
  .noinit(NOLOAD) :
  {

  } > NOINIT

  /* ... */
}

The problem is that the NOINIT region's start address seems to be defined for devices with 32KB of RAM, but the nRF52 has 64KB. If I want to reserve the same region in my main app, it will lie in the middle of my RAM.

It seems to me that the NOINIT region isn't used anywhere in the code. Besides, the comments speak about exchanging bond information, but since the bootloader has a different MAC address from the main app I don't think it would be possible to use the same bond info? Besides, I don't see this region being reserved in any main app examples.

So my question is: is this region still used? Can I safely remove it from the bootloader linker script?

Related