From ba807efb1a0473815d5668e8108bf0ae4a87f727 Mon Sep 17 00:00:00 2001 From: Greg PFISTER Date: Thu, 16 Nov 2023 00:42:36 +0100 Subject: [PATCH] Add overlays for nRF52840 DK and nRF52840 Dongle --- .../nrf52840dk_nrf52840.overlay | 27 ++----- app/nrf52840dongle_nrf52840.overlay | 20 ++++++ boards/arm/ns_nrf52840_usb_dongle/Kconfig | 18 ----- .../arm/ns_nrf52840_usb_dongle/Kconfig.board | 16 ----- .../ns_nrf52840_usb_dongle/Kconfig.defconfig | 22 ------ boards/arm/ns_nrf52840_usb_dongle/board.cmake | 22 ------ .../ns_nrf52840_usb_dongle.dts | 70 ------------------- .../ns_nrf52840_usb_dongle.yaml | 23 ------ .../ns_nrf52840_usb_dongle_defconfig | 25 ------- west.yml | 3 +- 10 files changed, 26 insertions(+), 220 deletions(-) rename boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle-leds.dtsi => app/nrf52840dk_nrf52840.overlay (52%) create mode 100644 app/nrf52840dongle_nrf52840.overlay delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/Kconfig delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/Kconfig.board delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/Kconfig.defconfig delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/board.cmake delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.dts delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.yaml delete mode 100644 boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle_defconfig diff --git a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle-leds.dtsi b/app/nrf52840dk_nrf52840.overlay similarity index 52% rename from boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle-leds.dtsi rename to app/nrf52840dk_nrf52840.overlay index 8bdb32d..2db61bb 100644 --- a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle-leds.dtsi +++ b/app/nrf52840dk_nrf52840.overlay @@ -12,28 +12,9 @@ // / { - + // Define led aliases aliases { - ledblinky = &led0; - ledbtstatusr = &led1r; - ledbtstatusg = &led1g; - ledbtstatusb = &led1b; + ledblinky = &led0; // Blinky led + ledbtstatus = &led1; // BT Led (off: disconnected / Blue: connected) }; - - leds { - compatible = "gpio-leds"; - led0: led_0 { // The blinky led - gpios = < &gpio0 0x6 0x1 >; - }; - led1r: led_1r { - gpios = < &gpio0 0x8 0x1 >;// The BT status led - }; - led1g: led_1g { - gpios = < &gpio1 0x9 0x1 >;// The BT status led - }; - led1b: led_1b { - gpios = < &gpio1 0xc 0x1 >;// The BT status led - }; - - }; -}; +}; \ No newline at end of file diff --git a/app/nrf52840dongle_nrf52840.overlay b/app/nrf52840dongle_nrf52840.overlay new file mode 100644 index 0000000..1376075 --- /dev/null +++ b/app/nrf52840dongle_nrf52840.overlay @@ -0,0 +1,20 @@ +// +// gp-nrf-ble-blinky +// Copyright (c) 2023, Greg PFISTER. MIT Licennse +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +/ { + // Define led aliases + aliases { + ledblinky = &led0_green; // Blinky led + ledbtstatus = &led1_blue; // BT Led (off: disconnected / Blue: connected) + }; +}; \ No newline at end of file diff --git a/boards/arm/ns_nrf52840_usb_dongle/Kconfig b/boards/arm/ns_nrf52840_usb_dongle/Kconfig deleted file mode 100644 index 120d1ed..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/Kconfig +++ /dev/null @@ -1,18 +0,0 @@ -# -# gp-nrf-ble-blinky -# Copyright (c) 2023, Greg PFISTER. MIT Licennse -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -# config BOARD_ENABLE_DCDC -# bool "Enable DCDC mode" -# select SOC_DCDC_NRF52X -# default y -# depends on BOARD_CUSTOM_PLANK diff --git a/boards/arm/ns_nrf52840_usb_dongle/Kconfig.board b/boards/arm/ns_nrf52840_usb_dongle/Kconfig.board deleted file mode 100644 index 2a8e3c2..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/Kconfig.board +++ /dev/null @@ -1,16 +0,0 @@ -# -# gp-nrf-ble-blinky -# Copyright (c) 2023, Greg PFISTER. MIT Licennse -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -config BOARD_NS_NRF52840_USB_DONGLE - bool "NS nRF52840 USB Dongle" - depends on SOC_NRF52840_QIAA diff --git a/boards/arm/ns_nrf52840_usb_dongle/Kconfig.defconfig b/boards/arm/ns_nrf52840_usb_dongle/Kconfig.defconfig deleted file mode 100644 index f1708cd..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/Kconfig.defconfig +++ /dev/null @@ -1,22 +0,0 @@ -# -# gp-nrf-ble-blinky -# Copyright (c) 2023, Greg PFISTER. MIT Licennse -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -if BOARD_NS_NRF52840_USB_DONGLE - -config BOARD - default "ns_nrf52840_usb_dongle" - -config BT_CTLR - default BT - -endif diff --git a/boards/arm/ns_nrf52840_usb_dongle/board.cmake b/boards/arm/ns_nrf52840_usb_dongle/board.cmake deleted file mode 100644 index e5555e7..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/board.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# -# gp-nrf-ble-blinky -# Copyright (c) 2023, Greg PFISTER. MIT Licennse -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -board_runner_args(jlink "--device=nrf52" "--speed=4000") -board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") - -set(OPENOCD_NRF5_SUBFAMILY "nrf52") - -include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) -include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) -include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) -include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake) diff --git a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.dts b/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.dts deleted file mode 100644 index 3badae9..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.dts +++ /dev/null @@ -1,70 +0,0 @@ -// -// gp-nrf-ble-blinky -// Copyright (c) 2023, Greg PFISTER. MIT Licennse -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// - -/dts-v1/; -#include -#include "ns_nrf52840_usb_dongle-leds.dtsi" - -/ { - model = "NS nRF52840 USB Dongle"; - compatible = "nordic-semiconductor,ns-nrf52840-usb-dongle"; - - chosen { - zephyr,console = &uart0; - zephyr,shell-uart = &uart0; - zephyr,uart-mcumgr = &uart0; - zephyr,bt-mon-uart = &uart0; - zephyr,bt-c2h-uart = &uart0; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,code-partition = &slot0_partition; - zephyr,ieee802154 = &ieee802154; - }; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&flash0 { - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x0 0xc000>; - }; - slot0_partition: partition@c000 { - label = "image-0"; - reg = <0xc000 0x72000>; - }; - slot1_partition: partition@7e000 { - label = "image-1"; - reg = <0x7e000 0x72000>; - }; - scratch_partition: partition@f0000 { - label = "image-scratch"; - reg = <0xf0000 0xa000>; - }; - storage_partition: partition@fa000 { - label = "storage"; - reg = <0xfa000 0x6000>; - }; - }; -}; diff --git a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.yaml b/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.yaml deleted file mode 100644 index 9079f44..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# -# gp-nrf-ble-blinky -# Copyright (c) 2023, Greg PFISTER. MIT Licennse -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -identifier: ns_nrf52840_usb_dongle -name: NS nRF52840 USB Dongle -type: mcu -arch: arm -ram: 256 -flash: 1024 -toolchain: - - zephyr - - gnuarmemb - - xtools diff --git a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle_defconfig b/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle_defconfig deleted file mode 100644 index 276bde6..0000000 --- a/boards/arm/ns_nrf52840_usb_dongle/ns_nrf52840_usb_dongle_defconfig +++ /dev/null @@ -1,25 +0,0 @@ -# -# gp-nrf-ble-blinky -# Copyright (c) 2023, Greg PFISTER. MIT Licennse -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_NS_NRF52840_USB_DONGLE=y - -# Enable MPU -CONFIG_ARM_MPU=y - -# Enable hardware stack protection -CONFIG_HW_STACK_PROTECTION=y - -# Enable GPIO -CONFIG_GPIO=y diff --git a/west.yml b/west.yml index 305fc37..14331af 100644 --- a/west.yml +++ b/west.yml @@ -16,7 +16,8 @@ manifest: self: path: app - west-commands: scripts/west-commands.yml + # west-commands: + # west-commands: scripts/west-commands.yml remotes: - name: ncs