summaryrefslogtreecommitdiff
path: root/gcc_nrf52.ld
diff options
context:
space:
mode:
authorTim Keller <geekboy1011@gmail.com>2021-08-17 23:53:57 +0000
committerTim Keller <geekboy1011@gmail.com>2021-08-17 23:53:57 +0000
commit55f8908769aab970413b249cb26acdaf22c79ada (patch)
tree21d0e06dd2ca20ac99abbcfe06661fff5a6c2e64 /gcc_nrf52.ld
parentee44b6ff4998d6f4d0672c05c1f65c0a9692dc0d (diff)
Make Clock Persistant.
Diffstat (limited to 'gcc_nrf52.ld')
-rw-r--r--gcc_nrf52.ld11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc_nrf52.ld b/gcc_nrf52.ld
index 98e133aa..b40dc06b 100644
--- a/gcc_nrf52.ld
+++ b/gcc_nrf52.ld
@@ -3,14 +3,23 @@
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)
+NO_INIT_SIZE = 0x100;
+RAM_MAX = 64K;
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000, LENGTH = 0x78000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_MAX - NO_INIT_SIZE
+ NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NO_INIT_SIZE
}
SECTIONS
{
+ noinit (NOLOAD):
+ {
+ PROVIDE(__start_noinit_data = .);
+ KEEP(*(.noinit))
+ PROVIDE(__stop_noinit_data = .);
+ } >NOINIT
}
SECTIONS