diff options
author | Tim Keller <geekboy1011@gmail.com> | 2021-08-23 20:13:26 +0000 |
---|---|---|
committer | Tim Keller <geekboy1011@gmail.com> | 2021-08-23 20:13:26 +0000 |
commit | 110c82c225c22685a3f0b7d1d75566a929516637 (patch) | |
tree | 4366c24fb0ae37619ac2c4ab69e5b2372b2936db /gcc_nrf52.ld | |
parent | c9dedfd402c67078ce53ad661889be841633f468 (diff) |
Move noinit to after BSS segment,
Now dynamically allocates noinit area size
stores it after the bss before the heap and stack.
Diffstat (limited to 'gcc_nrf52.ld')
-rw-r--r-- | gcc_nrf52.ld | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc_nrf52.ld b/gcc_nrf52.ld index 705c3d3b..f9bc5b68 100644 --- a/gcc_nrf52.ld +++ b/gcc_nrf52.ld @@ -3,25 +3,21 @@ SEARCH_DIR(.) GROUP(-lgcc -lc -lnosys) -NOINIT_SIZE = 0x100; -RAM_SIZE = 64K; - MEMORY { FLASH (rx) : ORIGIN = 0x00000, 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 { @@ -54,6 +50,7 @@ SECTIONS PROVIDE(__stop_log_filter_data = .); } > RAM + } INSERT AFTER .data; SECTIONS |