summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-05-16 10:14:00 +0700
committerhathach <[email protected]>2023-05-16 10:14:00 +0700
commit116a258858ef3c58639d00346e197bd07ad86952 (patch)
tree885ddc96d474aebb7a2d13f2398502ec44c2e3aa
parent792cf95f2d20be2908f87f4960edadcf10c207dd (diff)
fix nrf build
-rw-r--r--hw/bsp/nrf/boards/adafruit_clue/board.mk3
-rwxr-xr-xhw/bsp/nrf/boards/arduino_nano33_ble/arduino_nano33_ble.ld2
-rw-r--r--hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk3
-rwxr-xr-xhw/bsp/nrf/boards/circuitplayground_bluefruit/nrf52840_s140_v6.ld38
-rw-r--r--hw/bsp/nrf/boards/feather_nrf52840_express/board.mk3
-rw-r--r--hw/bsp/nrf/boards/feather_nrf52840_express/nrf52840_s140_v6.ld38
-rw-r--r--hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk3
-rw-r--r--hw/bsp/nrf/boards/feather_nrf52840_sense/nrf52840_s140_v6.ld38
-rw-r--r--hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk3
-rw-r--r--hw/bsp/nrf/boards/itsybitsy_nrf52840/nrf52840_s140_v6.ld38
-rw-r--r--hw/bsp/nrf/family.mk3
-rw-r--r--[-rwxr-xr-x]hw/bsp/nrf/linker/nrf52840_s140_v6.ld (renamed from hw/bsp/nrf/boards/adafruit_clue/nrf52840_s140_v6.ld)2
-rw-r--r--tools/build_family.py4
13 files changed, 19 insertions, 159 deletions
diff --git a/hw/bsp/nrf/boards/adafruit_clue/board.mk b/hw/bsp/nrf/boards/adafruit_clue/board.mk
index f31899eb7..b80807963 100644
--- a/hw/bsp/nrf/boards/adafruit_clue/board.mk
+++ b/hw/bsp/nrf/boards/adafruit_clue/board.mk
@@ -1,6 +1,9 @@
MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
+# All source paths should be relative to the top level.
+LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/arduino_nano33_ble/arduino_nano33_ble.ld b/hw/bsp/nrf/boards/arduino_nano33_ble/arduino_nano33_ble.ld
index f609f743f..b7cac1019 100755
--- a/hw/bsp/nrf/boards/arduino_nano33_ble/arduino_nano33_ble.ld
+++ b/hw/bsp/nrf/boards/arduino_nano33_ble/arduino_nano33_ble.ld
@@ -29,4 +29,4 @@ SECTIONS
} > RAM
} INSERT AFTER .data;
-INCLUDE "nrf52_common.ld"
+INCLUDE "nrf_common.ld"
diff --git a/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk b/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk
index f31899eb7..b80807963 100644
--- a/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk
+++ b/hw/bsp/nrf/boards/circuitplayground_bluefruit/board.mk
@@ -1,6 +1,9 @@
MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
+# All source paths should be relative to the top level.
+LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/circuitplayground_bluefruit/nrf52840_s140_v6.ld b/hw/bsp/nrf/boards/circuitplayground_bluefruit/nrf52840_s140_v6.ld
deleted file mode 100755
index 71c55bb81..000000000
--- a/hw/bsp/nrf/boards/circuitplayground_bluefruit/nrf52840_s140_v6.ld
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Linker script to configure memory regions. */
-
-SEARCH_DIR(.)
-GROUP(-lgcc -lc -lnosys)
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000
-
- /* SRAM required by S132 depend on
- * - Attribute Table Size
- * - Vendor UUID count
- * - Max ATT MTU
- * - Concurrent connection peripheral + central + secure links
- * - Event Len, HVN queue, Write CMD queue
- */
- RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400
-}
-
-SECTIONS
-{
- . = ALIGN(4);
- .svc_data :
- {
- PROVIDE(__start_svc_data = .);
- KEEP(*(.svc_data))
- PROVIDE(__stop_svc_data = .);
- } > RAM
-
- .fs_data :
- {
- PROVIDE(__start_fs_data = .);
- KEEP(*(.fs_data))
- PROVIDE(__stop_fs_data = .);
- } > RAM
-} INSERT AFTER .data;
-
-INCLUDE "nrf52_common.ld"
diff --git a/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk b/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
index f31899eb7..b80807963 100644
--- a/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
+++ b/hw/bsp/nrf/boards/feather_nrf52840_express/board.mk
@@ -1,6 +1,9 @@
MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
+# All source paths should be relative to the top level.
+LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/feather_nrf52840_express/nrf52840_s140_v6.ld b/hw/bsp/nrf/boards/feather_nrf52840_express/nrf52840_s140_v6.ld
deleted file mode 100644
index 71c55bb81..000000000
--- a/hw/bsp/nrf/boards/feather_nrf52840_express/nrf52840_s140_v6.ld
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Linker script to configure memory regions. */
-
-SEARCH_DIR(.)
-GROUP(-lgcc -lc -lnosys)
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000
-
- /* SRAM required by S132 depend on
- * - Attribute Table Size
- * - Vendor UUID count
- * - Max ATT MTU
- * - Concurrent connection peripheral + central + secure links
- * - Event Len, HVN queue, Write CMD queue
- */
- RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400
-}
-
-SECTIONS
-{
- . = ALIGN(4);
- .svc_data :
- {
- PROVIDE(__start_svc_data = .);
- KEEP(*(.svc_data))
- PROVIDE(__stop_svc_data = .);
- } > RAM
-
- .fs_data :
- {
- PROVIDE(__start_fs_data = .);
- KEEP(*(.fs_data))
- PROVIDE(__stop_fs_data = .);
- } > RAM
-} INSERT AFTER .data;
-
-INCLUDE "nrf52_common.ld"
diff --git a/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk b/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk
index f31899eb7..b80807963 100644
--- a/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk
+++ b/hw/bsp/nrf/boards/feather_nrf52840_sense/board.mk
@@ -1,6 +1,9 @@
MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
+# All source paths should be relative to the top level.
+LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/feather_nrf52840_sense/nrf52840_s140_v6.ld b/hw/bsp/nrf/boards/feather_nrf52840_sense/nrf52840_s140_v6.ld
deleted file mode 100644
index 71c55bb81..000000000
--- a/hw/bsp/nrf/boards/feather_nrf52840_sense/nrf52840_s140_v6.ld
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Linker script to configure memory regions. */
-
-SEARCH_DIR(.)
-GROUP(-lgcc -lc -lnosys)
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000
-
- /* SRAM required by S132 depend on
- * - Attribute Table Size
- * - Vendor UUID count
- * - Max ATT MTU
- * - Concurrent connection peripheral + central + secure links
- * - Event Len, HVN queue, Write CMD queue
- */
- RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400
-}
-
-SECTIONS
-{
- . = ALIGN(4);
- .svc_data :
- {
- PROVIDE(__start_svc_data = .);
- KEEP(*(.svc_data))
- PROVIDE(__stop_svc_data = .);
- } > RAM
-
- .fs_data :
- {
- PROVIDE(__start_fs_data = .);
- KEEP(*(.fs_data))
- PROVIDE(__stop_fs_data = .);
- } > RAM
-} INSERT AFTER .data;
-
-INCLUDE "nrf52_common.ld"
diff --git a/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk b/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk
index f31899eb7..b80807963 100644
--- a/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk
+++ b/hw/bsp/nrf/boards/itsybitsy_nrf52840/board.mk
@@ -1,6 +1,9 @@
MCU_VARIANT = nrf52840
CFLAGS += -DNRF52840_XXAA
+# All source paths should be relative to the top level.
+LD_FILE = hw/bsp/nrf/linker/nrf52840_s140_v6.ld
+
$(BUILD)/$(PROJECT).zip: $(BUILD)/$(PROJECT).hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0xFFFE --application $^ $@
diff --git a/hw/bsp/nrf/boards/itsybitsy_nrf52840/nrf52840_s140_v6.ld b/hw/bsp/nrf/boards/itsybitsy_nrf52840/nrf52840_s140_v6.ld
deleted file mode 100644
index 71c55bb81..000000000
--- a/hw/bsp/nrf/boards/itsybitsy_nrf52840/nrf52840_s140_v6.ld
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Linker script to configure memory regions. */
-
-SEARCH_DIR(.)
-GROUP(-lgcc -lc -lnosys)
-
-MEMORY
-{
- FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xED000 - 0x26000
-
- /* SRAM required by S132 depend on
- * - Attribute Table Size
- * - Vendor UUID count
- * - Max ATT MTU
- * - Concurrent connection peripheral + central + secure links
- * - Event Len, HVN queue, Write CMD queue
- */
- RAM (rwx) : ORIGIN = 0x20003400, LENGTH = 0x20040000 - 0x20003400
-}
-
-SECTIONS
-{
- . = ALIGN(4);
- .svc_data :
- {
- PROVIDE(__start_svc_data = .);
- KEEP(*(.svc_data))
- PROVIDE(__stop_svc_data = .);
- } > RAM
-
- .fs_data :
- {
- PROVIDE(__start_fs_data = .);
- KEEP(*(.fs_data))
- PROVIDE(__stop_fs_data = .);
- } > RAM
-} INSERT AFTER .data;
-
-INCLUDE "nrf52_common.ld"
diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk
index 310578d02..d5042a160 100644
--- a/hw/bsp/nrf/family.mk
+++ b/hw/bsp/nrf/family.mk
@@ -16,9 +16,6 @@ CFLAGS += \
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=undef -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual -Wno-error=redundant-decls
-# All source paths should be relative to the top level.
-LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld
-
LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk
SRC_C += \
diff --git a/hw/bsp/nrf/boards/adafruit_clue/nrf52840_s140_v6.ld b/hw/bsp/nrf/linker/nrf52840_s140_v6.ld
index 71c55bb81..e27fa1c91 100755..100644
--- a/hw/bsp/nrf/boards/adafruit_clue/nrf52840_s140_v6.ld
+++ b/hw/bsp/nrf/linker/nrf52840_s140_v6.ld
@@ -35,4 +35,4 @@ SECTIONS
} > RAM
} INSERT AFTER .data;
-INCLUDE "nrf52_common.ld"
+INCLUDE "nrf_common.ld"
diff --git a/tools/build_family.py b/tools/build_family.py
index 1fc25907b..9b612b4cb 100644
--- a/tools/build_family.py
+++ b/tools/build_family.py
@@ -42,9 +42,9 @@ if __name__ == '__main__':
# If examples are not specified in arguments, build all
all_examples = []
for d in os.scandir("examples"):
- if d.is_dir() and 'cmake-build' not in d.name and 'cmake' not in d.name:
+ if d.is_dir() and 'cmake' not in d.name:
for entry in os.scandir(d.path):
- if entry.is_dir():
+ if entry.is_dir() and 'cmake' not in entry.name:
all_examples.append(d.name + '/' + entry.name)
filter_with_input(all_examples)
all_examples.sort()