aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/nrf/boards/microbit/custom_nrf51822_s110_microbit.ld28
-rw-r--r--ports/nrf/boards/microbit/mpconfigboard_s110.mk2
2 files changed, 29 insertions, 1 deletions
diff --git a/ports/nrf/boards/microbit/custom_nrf51822_s110_microbit.ld b/ports/nrf/boards/microbit/custom_nrf51822_s110_microbit.ld
new file mode 100644
index 000000000..71d57aeb0
--- /dev/null
+++ b/ports/nrf/boards/microbit/custom_nrf51822_s110_microbit.ld
@@ -0,0 +1,28 @@
+/*
+ GNU linker script for NRF51822 AA w/ S110 8.0.0 SoftDevice
+*/
+/* Specify the memory areas */
+SEARCH_DIR(.)
+GROUP(-lgcc -lc -lnosys)
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K /* entire flash */
+ FLASH_TEXT (rx) : ORIGIN = 0x00018000, LENGTH = 148K /* app */
+ FLASH_USER (rx) : ORIGIN = 0x0003D000, LENGTH = 12K /* app data, filesystem */
+ RAM (xrw) : ORIGIN = 0x20002000, LENGTH = 8K /* app RAM */
+}
+
+/* produce a link error if there is not this amount of RAM for these sections */
+_minimum_stack_size = 2K;
+_minimum_heap_size = 1K;
+
+/* top end of the stack */
+
+/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/
+_estack = ORIGIN(RAM) + LENGTH(RAM);
+
+/* RAM extents for the garbage collector */
+_ram_end = ORIGIN(RAM) + LENGTH(RAM);
+_heap_end = 0x20003c00; /* tunable */
+
+INCLUDE "boards/common.ld"
diff --git a/ports/nrf/boards/microbit/mpconfigboard_s110.mk b/ports/nrf/boards/microbit/mpconfigboard_s110.mk
index d638b0609..efda6a0a2 100644
--- a/ports/nrf/boards/microbit/mpconfigboard_s110.mk
+++ b/ports/nrf/boards/microbit/mpconfigboard_s110.mk
@@ -2,7 +2,7 @@ MCU_SERIES = m0
MCU_VARIANT = nrf51
MCU_SUB_VARIANT = nrf51822
SOFTDEV_VERSION = 8.0.0
-LD_FILE = boards/nrf51x22_256k_16k_s110_$(SOFTDEV_VERSION).ld
+LD_FILE = boards/microbit/custom_nrf51822_s110_microbit.ld
FLASHER = pyocd
CFLAGS += -DBLUETOOTH_LFCLK_RC