From c2165f74d81a2ed1b1649e710b73f1c613a54185 Mon Sep 17 00:00:00 2001 From: Yurii Soldak Date: Mon, 25 Oct 2021 20:58:56 +0200 Subject: [PATCH] nano-33-ble: SoftDevice s140v7 support --- targets/nano-33-ble-s140v7.json | 6 ++++++ targets/nano-33-ble-sense.json | 3 --- targets/nrf52840-s140v7.json | 5 ++++- targets/nrf52840-s140v7.ld | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 targets/nano-33-ble-s140v7.json delete mode 100644 targets/nano-33-ble-sense.json diff --git a/targets/nano-33-ble-s140v7.json b/targets/nano-33-ble-s140v7.json new file mode 100644 index 00000000..e78c370e --- /dev/null +++ b/targets/nano-33-ble-s140v7.json @@ -0,0 +1,6 @@ +{ + "inherits": ["nano-33-ble", "nrf52840-s140v7"], + "flash-command": "nrfjprog -f nrf52 --sectorerase --program {hex} --reset", + "flash-1200-bps-reset": "false", + "openocd-interface": "jlink" +} diff --git a/targets/nano-33-ble-sense.json b/targets/nano-33-ble-sense.json deleted file mode 100644 index 943829d2..00000000 --- a/targets/nano-33-ble-sense.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "inherits": ["nano-33-ble"] -} diff --git a/targets/nrf52840-s140v7.json b/targets/nrf52840-s140v7.json index ab6e609f..cc9c62cd 100644 --- a/targets/nrf52840-s140v7.json +++ b/targets/nrf52840-s140v7.json @@ -1,4 +1,7 @@ { "build-tags": ["softdevice", "s140v7"], - "linkerscript": "targets/nrf52840-s140v7.ld" + "linkerscript": "targets/nrf52840-s140v7.ld", + "ldflags": [ + "--defsym=__softdevice_stack=0x700" + ] } diff --git a/targets/nrf52840-s140v7.ld b/targets/nrf52840-s140v7.ld index 0ff135bf..b1291540 100644 --- a/targets/nrf52840-s140v7.ld +++ b/targets/nrf52840-s140v7.ld @@ -5,9 +5,10 @@ MEMORY RAM (xrw) : ORIGIN = 0x20000000 + 0x000039c0, LENGTH = 256K - 0x000039c0 } -_stack_size = 4K; +_stack_size = 4K + __softdevice_stack; /* This value is needed by the Nordic SoftDevice. */ __app_ram_base = ORIGIN(RAM); +__softdevice_stack = DEFINED(__softdevice_stack) ? __softdevice_stack : 0; INCLUDE "targets/arm.ld"