From 110c82c225c22685a3f0b7d1d75566a929516637 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 23 Aug 2021 20:13:26 +0000 Subject: Move noinit to after BSS segment, Now dynamically allocates noinit area size stores it after the bss before the heap and stack. --- gcc_nrf52-mcuboot.ld | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'gcc_nrf52-mcuboot.ld') diff --git a/gcc_nrf52-mcuboot.ld b/gcc_nrf52-mcuboot.ld index b1413f16..81b318c5 100644 --- a/gcc_nrf52-mcuboot.ld +++ b/gcc_nrf52-mcuboot.ld @@ -3,25 +3,21 @@ SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys) -NOINIT_SIZE = 0x100; -RAM_SIZE = 64K; - MEMORY { FLASH (rx) : ORIGIN = 0x08020, LENGTH = 0x78000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_SIZE - NOINIT_SIZE - NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NOINIT_SIZE + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K } SECTIONS { - noinit (NOLOAD): + .noinit(NOLOAD): { PROVIDE(__start_noinit_data = .); - KEEP(*(.noinit)) + *(.noinit) PROVIDE(__stop_noinit_data = .); - } >NOINIT -} + } > RAM +} INSERT AFTER .bss SECTIONS { -- cgit v1.2.3