From 2fec73e6067dca8eb9b0ed83404fc16fc06cbbae Mon Sep 17 00:00:00 2001 From: Paul Melnikov Date: Tue, 18 Jun 2024 21:16:32 +0000 Subject: [PATCH 1/3] Dont't enable FPU for FPU-less MCUs --- builder/frameworks/arduino/nrf5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/frameworks/arduino/nrf5.py b/builder/frameworks/arduino/nrf5.py index d472e53..98c3e5f 100644 --- a/builder/frameworks/arduino/nrf5.py +++ b/builder/frameworks/arduino/nrf5.py @@ -126,7 +126,8 @@ ] ) -if board.get("build.cpu") == "cortex-m4": +# only nRF5283x and nRF52840 have FPUs +if any(mcu in board.get("build.mcu") for mcu in {'5283', '52840'}): env.Append( ASFLAGS=[ "-mfloat-abi=hard", From 7e72d88fe7c62d1555604294a862d8874732317f Mon Sep 17 00:00:00 2001 From: Paul Melnikov Date: Thu, 20 Jun 2024 07:52:52 +0000 Subject: [PATCH 2/3] Add board.json --- boards/generic_nrf52810.json | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 boards/generic_nrf52810.json diff --git a/boards/generic_nrf52810.json b/boards/generic_nrf52810.json new file mode 100644 index 0000000..b61882a --- /dev/null +++ b/boards/generic_nrf52810.json @@ -0,0 +1,38 @@ +{ + "build": { + "arduino":{ + "ldscript": "nrf52810_xxaa.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DARDUINO_GENERIC", + "f_cpu": "64000000L", + "mcu": "nrf52810_xxaa", + "variant": "Generic" + }, + "connectivity": [ + "bluetooth" + ], + "debug": { + "jlink_device": "nRF52810_xxAA", + "svd_path": "nrf52.svd" + }, + "frameworks": [ + "arduino" + ], + "name": "Generic nRF52810", + "upload": { + "maximum_ram_size": 24576, + "maximum_size": 155648, + "protocol": "jlink", + "protocols": [ + "jlink", + "nrfjprog", + "stlink", + "cmsis-dap", + "blackmagic" + ] + }, + "url": "https://www.nordicsemi.com/Products/Bluetooth-Low-Energy", + "vendor": "Generic" + } \ No newline at end of file From 94bc121d3be941d6e71b9c5c7b794499cce7ec32 Mon Sep 17 00:00:00 2001 From: Paul Melnikov Date: Thu, 20 Jun 2024 19:58:16 +0000 Subject: [PATCH 3/3] fix max size --- boards/generic_nrf52810.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/generic_nrf52810.json b/boards/generic_nrf52810.json index b61882a..c77f6a1 100644 --- a/boards/generic_nrf52810.json +++ b/boards/generic_nrf52810.json @@ -23,7 +23,7 @@ "name": "Generic nRF52810", "upload": { "maximum_ram_size": 24576, - "maximum_size": 155648, + "maximum_size": 180224, "protocol": "jlink", "protocols": [ "jlink",