diff --git a/ports/nrf/boards/common.template.ld b/ports/nrf/boards/common.template.ld index a2bbf0ec80..9a7df69a47 100644 --- a/ports/nrf/boards/common.template.ld +++ b/ports/nrf/boards/common.template.ld @@ -103,7 +103,7 @@ SECTIONS _edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ } >RAM - /* Uninitialized data section */ + /* Zero-initialized data section */ .bss : { . = ALIGN(4); @@ -116,6 +116,19 @@ SECTIONS _ebss = .; /* define a global symbol at bss end; used by startup code and GC */ } >RAM + /* Uninitialized data section + Data placed into this section will remain unchanged across reboots. */ + .uninitialized (NOLOAD) : + { + . = ALIGN(4); + _suninitialized = .; /* define a global symbol at uninitialized start; currently unused */ + *(.uninitialized) + *(.uninitialized*) + + . = ALIGN(4); + _euninitialized = .; /* define a global symbol at uninitialized end; currently unused */ + } >RAM + /* this is to define the start of the heap, and make sure we have a minimum size */ .heap : {