diff --git a/.github/workflows/build-nrf52.yml b/.github/workflows/build-nrf52.yml index a313d59d..692ebff4 100644 --- a/.github/workflows/build-nrf52.yml +++ b/.github/workflows/build-nrf52.yml @@ -2,26 +2,65 @@ name: build-nrf52 on: push: paths: - - 'firmware/**' - - 'firmware-bluetooth/**' + - "firmware/**" + - "firmware-bluetooth/**" + - ".github/workflows/build-nrf52.yml" workflow_call: defaults: run: shell: bash --noprofile --norc -x -e -o pipefail {0} jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - board: ["adafruit_feather_nrf52840", "seeed_xiao_nrf52840"] + board: + [ + "adafruit_feather_nrf52840/nrf52840", + "xiao_ble/nrf52840", + "nrf52840dongle/nrf52840", + "nrf52840_mdk_usb_dongle", + ] steps: + - name: Free Disk Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + - uses: actions/checkout@v4 - - name: Build + + - name: Set board name + id: board + run: | + BOARD_FILE="${{ matrix.board }}" + BOARD_FILE="${BOARD_FILE//\//_}" + echo "name=${BOARD_FILE}" >> $GITHUB_OUTPUT + + - name: Initialize and Build run: | - docker run -v $PWD:/workdir/project -w /workdir/project/firmware-bluetooth nordicplayground/nrfconnect-sdk:v2.2-branch \ - west build -b ${{ matrix.board }} - cp firmware-bluetooth/build/zephyr/remapper.uf2 firmware-bluetooth/remapper_${{ matrix.board }}.uf2 + docker run --rm \ + -v ${{ github.workspace }}:/workdir \ + -w /workdir \ + ghcr.io/zephyrproject-rtos/ci:v0.28.7 \ + bash -c " + west init -l . + west config build.sysbuild False + west update -o=--depth=1 -n + cd firmware-bluetooth + west build -b ${{ matrix.board }} + BOARD_FILE='${{ steps.board.outputs.name }}' + if [[ '${{ matrix.board }}' == 'nrf52840dongle/nrf52840' ]]; then + cp build/zephyr/remapper.hex remapper_\${BOARD_FILE}.hex + else + cp build/zephyr/remapper.uf2 remapper_\${BOARD_FILE}.uf2 + fi + " + - uses: actions/upload-artifact@v4 with: - name: artifact-${{ matrix.board }} - path: firmware-bluetooth/remapper_${{ matrix.board }}.uf2 + name: artifact-${{ steps.board.outputs.name }} + path: firmware-bluetooth/remapper_*.* diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig deleted file mode 100644 index 43985958..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# Adafruit Feather nRF52840 Express board configuration - -# Copyright (c) 2020 Tobias Svehagen -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_ENABLE_DCDC - bool "DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_ADAFRUIT_FEATHER_NRF52840 diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig.board b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig.board deleted file mode 100644 index 4e37d053..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Adafruit Feather nRF52840 Express board configuration - -# Copyright (c) 2020 Tobias Svehagen -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_ADAFRUIT_FEATHER_NRF52840 - bool "Adafruit Feather nRF52840 Express" - depends on SOC_NRF52840_QIAA diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig.defconfig b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig.defconfig deleted file mode 100644 index f2d04d6c..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/Kconfig.defconfig +++ /dev/null @@ -1,14 +0,0 @@ -# Adafruit Feather nRF52840 Express board configuration - -# Copyright (c) 2020 Tobias Svehagen -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_ADAFRUIT_FEATHER_NRF52840 - -config BOARD - default "adafruit_feather_nrf52840" - -config BT_CTLR - default BT - -endif # BOARD_ADAFRUIT_FEATHER_NRF52840 diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840-pinctrl.dtsi b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840-pinctrl.dtsi deleted file mode 100644 index 195dbd34..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840-pinctrl.dtsi +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor - * SPDX-License-Identifier: Apache-2.0 - */ - -&pinctrl { - uart0_default: uart0_default { - group1 { - psels = , - ; - }; - }; - - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; - - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; - - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; - - spi1_default: spi1_default { - group1 { - psels = , - , - ; - }; - }; - - spi1_sleep: spi1_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; - - qspi_default: qspi_default { - group1 { - psels = , - , - , - , - , - ; - }; - }; - - qspi_sleep: qspi_sleep { - group1 { - psels = , - , - , - , - , - ; - low-power-enable; - }; - }; - -}; diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840.dts b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840.dts deleted file mode 100644 index a951a169..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840.dts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2020 Tobias Svehagen - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/dts-v1/; -#include -#include "feather_connector.dtsi" -#include "adafruit_feather_nrf52840-pinctrl.dtsi" - -/ { - model = "Adafruit Feather nRF52840 Express"; - compatible = "adafruit,feather-nrf52840"; - - 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 = &code_partition; - }; - - leds { - compatible = "gpio-leds"; - led0: led_0 { - gpios = <&gpio1 15 0>; - label = "Red LED"; - }; - led1: led_1 { - gpios = <&gpio1 10 0>; - label = "Blue LED"; - }; - }; - - buttons { - compatible = "gpio-keys"; - button0: button_0 { - gpios = <&gpio1 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; - label = "Push button switch"; - }; - }; - - /* These aliases are provided for compatibility with samples */ - aliases { - led0 = &led0; - led1 = &led1; - sw0 = &button0; - }; -}; - -&adc { - status = "okay"; -}; - -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&uart0 { - compatible = "nordic,nrf-uart"; - current-speed = <921600>; - status = "okay"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - status = "okay"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&spi1 { - compatible = "nordic,nrf-spi"; - status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&qspi { - status = "okay"; - pinctrl-0 = <&qspi_default>; - pinctrl-1 = <&qspi_sleep>; - pinctrl-names = "default", "sleep"; - gd25q16: gd25q16@0 { - compatible = "nordic,qspi-nor"; - reg = <0>; - writeoc = "pp4o"; - readoc = "read4io"; - sck-frequency = <16000000>; - label = "GD25Q16"; - jedec-id = [c8 40 15]; - size = <16777216>; - has-dpd; - t-enter-dpd = <20000>; - t-exit-dpd = <20000>; - quad-enable-requirements = "S2B1v1"; - }; -}; - -&flash0 { - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - sd_partition: partition@0 { - label = "softdevice"; - reg = <0x00000000 0x00026000>; - }; - - code_partition: partition@26000 { - label = "code_partition"; - reg = <0x00026000 0x000c6000>; - }; - - storage_partition: partition@ec000 { - label = "storage"; - reg = <0x000ec000 0x00008000>; - }; - - boot_partition: partition@f4000 { - label = "adafruit_boot"; - reg = <0x000f4000 0x0000c000>; - }; - }; -}; - -zephyr_udc0: &usbd { - compatible = "nordic,nrf-usbd"; - status = "okay"; -}; diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840.yaml b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840.yaml deleted file mode 100644 index 50fe9d3a..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840.yaml +++ /dev/null @@ -1,19 +0,0 @@ -identifier: adafruit_feather_nrf52840 -name: Adafruit Feather nRF52840 Express -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - usb_cdc - - ble - - ieee802154 - - watchdog - - counter - - feather_serial - - feather_i2c - - feather_spi diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840_defconfig b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840_defconfig deleted file mode 100644 index 8d892db3..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/adafruit_feather_nrf52840_defconfig +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_ADAFRUIT_FEATHER_NRF52840=y - -# Enable MPU -CONFIG_ARM_MPU=y - -# enable GPIO -CONFIG_GPIO=y - -# enable uart driver -CONFIG_SERIAL=y - -# enable console -CONFIG_CONSOLE=y -CONFIG_UART_CONSOLE=y - -# additional board options -CONFIG_GPIO_AS_PINRESET=y - -CONFIG_PINCTRL=y diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/board.cmake b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/board.cmake deleted file mode 100644 index 90faf26b..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/board.cmake +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000") -board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") -board_runner_args(blackmagicprobe "--gdb-serial=/dev/ttyBmpGdb") -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/blackmagicprobe.board.cmake) diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/feather_connector.dtsi b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/feather_connector.dtsi deleted file mode 100644 index cbf0c139..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/feather_connector.dtsi +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2020 Richard Osterloh - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/ { - feather_header: connector { - compatible = "adafruit-feather-header"; - #gpio-cells = <2>; - gpio-map-mask = <0xffffffff 0xffffffc0>; - gpio-map-pass-thru = <0 0x3f>; - gpio-map = <0 0 &gpio0 4 0>, /* A0 */ - <1 0 &gpio0 5 0>, /* A1 */ - <2 0 &gpio0 30 0>, /* A2 */ - <3 0 &gpio0 28 0>, /* A3 */ - <4 0 &gpio0 2 0>, /* A4 */ - <5 0 &gpio0 3 0>, /* A5 */ - <6 0 &gpio0 14 0>, /* SCK */ - <7 0 &gpio0 13 0>, /* MOSI */ - <8 0 &gpio0 15 0>, /* MISO */ - <9 0 &gpio0 24 0>, /* RXD */ - <10 0 &gpio0 25 0>, /* TXD */ - <11 0 &gpio0 10 0>, /* D2 (NFC2) */ - <12 0 &gpio0 12 0>, /* SDA */ - <13 0 &gpio0 11 0>, /* SCL */ - <14 0 &gpio1 8 0>, /* D5 */ - <15 0 &gpio0 7 0>, /* D6 */ - <16 0 &gpio0 26 0>, /* D9 */ - <17 0 &gpio0 27 0>, /* D10 */ - <18 0 &gpio0 6 0>, /* D11 */ - <19 0 &gpio0 8 0>, /* D12 */ - <20 0 &gpio1 9 0>; /* D13 */ - }; -}; - -feather_serial: &uart0 {}; -feather_i2c: &i2c0 {}; -feather_spi: &spi1 {}; diff --git a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/pre_dt_board.cmake b/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/pre_dt_board.cmake deleted file mode 100644 index 3369c21d..00000000 --- a/firmware-bluetooth/boards/arm/adafruit_feather_nrf52840/pre_dt_board.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -# Suppress "unique_unit_address_if_enabled" to handle the following overlaps: -# - power@40000000 & clock@40000000 & bprot@40000000 -# - acl@4001e000 & flash-controller@4001e000 -list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig deleted file mode 100644 index 89f38733..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# Seeed Studio XIAO nRF52840 board configuration - -# Copyright (c) 2020 Tobias Svehagen -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_ENABLE_DCDC - bool "DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_SEEED_XIAO_NRF52840 diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig.board b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig.board deleted file mode 100644 index d65da56b..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# Seeed Studio XIAO nRF52840 board configuration - -# Copyright (c) 2020 Tobias Svehagen -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_SEEED_XIAO_NRF52840 - bool "Seeed Studio XIAO nRF52840" - depends on SOC_NRF52840_QIAA diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig.defconfig b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig.defconfig deleted file mode 100644 index cd207196..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/Kconfig.defconfig +++ /dev/null @@ -1,14 +0,0 @@ -# Seeed Studio XIAO nRF52840 board configuration - -# Copyright (c) 2020 Tobias Svehagen -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_SEEED_XIAO_NRF52840 - -config BOARD - default "seeed_xiao_nrf52840" - -config BT_CTLR - default BT - -endif # BOARD_SEEED_XIAO_NRF52840 diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/board.cmake b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/board.cmake deleted file mode 100644 index 90faf26b..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/board.cmake +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000") -board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") -board_runner_args(blackmagicprobe "--gdb-serial=/dev/ttyBmpGdb") -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/blackmagicprobe.board.cmake) diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/pre_dt_board.cmake b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/pre_dt_board.cmake deleted file mode 100644 index 3369c21d..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/pre_dt_board.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -# Suppress "unique_unit_address_if_enabled" to handle the following overlaps: -# - power@40000000 & clock@40000000 & bprot@40000000 -# - acl@4001e000 & flash-controller@4001e000 -list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840-pinctrl.dtsi b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840-pinctrl.dtsi deleted file mode 100644 index 619e2195..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840-pinctrl.dtsi +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor - * SPDX-License-Identifier: Apache-2.0 - */ - -&pinctrl { - uart0_default: uart0_default { - group1 { - psels = , - ; - }; - }; - - uart0_sleep: uart0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; - - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; - - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; - - spi1_default: spi1_default { - group1 { - psels = , - , - ; - }; - }; - - spi1_sleep: spi1_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; - - qspi_default: qspi_default { - group1 { - psels = , - , - , - , - , - ; - }; - }; - - qspi_sleep: qspi_sleep { - group1 { - psels = , - , - , - , - , - ; - low-power-enable; - }; - }; - -}; diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840.dts b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840.dts deleted file mode 100644 index 9088f359..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840.dts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2020 Tobias Svehagen - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/dts-v1/; -#include -#include "seeed_xiao_nrf52840-pinctrl.dtsi" - -/ { - model = "Seeed Studio XIAO nRF52840"; - compatible = "seeed,xiao-nrf52840"; - - 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 = &code_partition; - }; - - leds { - compatible = "gpio-leds"; - led0: led_0 { - gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; - label = "Red LED"; - }; - led1: led_1 { - gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; - label = "Blue LED"; - }; - }; - - buttons { - compatible = "gpio-keys"; - button0: button_0 { - gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; - label = "Push button switch"; - }; - }; - - /* These aliases are provided for compatibility with samples */ - aliases { - led0 = &led0; - led1 = &led1; - sw0 = &button0; - }; -}; - -&adc { - status = "okay"; -}; - -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&uart0 { - compatible = "nordic,nrf-uart"; - current-speed = <921600>; - status = "okay"; - pinctrl-0 = <&uart0_default>; - pinctrl-1 = <&uart0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - status = "okay"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&spi1 { - compatible = "nordic,nrf-spi"; - status = "okay"; - pinctrl-0 = <&spi1_default>; - pinctrl-1 = <&spi1_sleep>; - pinctrl-names = "default", "sleep"; -}; - -&qspi { - status = "okay"; - pinctrl-0 = <&qspi_default>; - pinctrl-1 = <&qspi_sleep>; - pinctrl-names = "default", "sleep"; - gd25q16: gd25q16@0 { - compatible = "nordic,qspi-nor"; - reg = <0>; - writeoc = "pp4o"; - readoc = "read4io"; - sck-frequency = <16000000>; - label = "GD25Q16"; - jedec-id = [c8 40 15]; - size = <16777216>; - has-dpd; - t-enter-dpd = <20000>; - t-exit-dpd = <20000>; - quad-enable-requirements = "S2B1v1"; - }; -}; - -&flash0 { - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - sd_partition: partition@0 { - label = "softdevice"; - reg = <0x00000000 0x00027000>; - }; - - code_partition: partition@27000 { - label = "code_partition"; - reg = <0x00027000 0x000c5000>; - }; - - storage_partition: partition@ec000 { - label = "storage"; - reg = <0x000ec000 0x00008000>; - }; - - boot_partition: partition@f4000 { - label = "adafruit_boot"; - reg = <0x000f4000 0x0000c000>; - }; - }; -}; - -zephyr_udc0: &usbd { - compatible = "nordic,nrf-usbd"; - status = "okay"; -}; diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840.yaml b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840.yaml deleted file mode 100644 index 3188cb9e..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840.yaml +++ /dev/null @@ -1,16 +0,0 @@ -identifier: seeed_xiao_nrf52840 -name: Seeed Studio XIAO nRF52840 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - usb_cdc - - ble - - ieee802154 - - watchdog - - counter diff --git a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840_defconfig b/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840_defconfig deleted file mode 100644 index d542ad16..00000000 --- a/firmware-bluetooth/boards/arm/seeed_xiao_nrf52840/seeed_xiao_nrf52840_defconfig +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_SEEED_XIAO_NRF52840=y - -# Enable MPU -CONFIG_ARM_MPU=y - -# enable GPIO -CONFIG_GPIO=y - -# enable uart driver -CONFIG_SERIAL=y - -# enable console -CONFIG_CONSOLE=y -CONFIG_UART_CONSOLE=y - -# additional board options -CONFIG_GPIO_AS_PINRESET=y - -CONFIG_PINCTRL=y diff --git a/firmware-bluetooth/boards/nrf52840_mdk_usb_dongle.overlay b/firmware-bluetooth/boards/nrf52840_mdk_usb_dongle.overlay new file mode 100644 index 00000000..049154dc --- /dev/null +++ b/firmware-bluetooth/boards/nrf52840_mdk_usb_dongle.overlay @@ -0,0 +1,7 @@ +/ { + aliases { + led0 = &led0_red; + led1 = &led0_blue; + sw0 = &reset_button; + }; +}; \ No newline at end of file diff --git a/firmware-bluetooth/boards/nrf52840dongle_nrf52840.overlay b/firmware-bluetooth/boards/nrf52840dongle_nrf52840.overlay new file mode 100644 index 00000000..e5ee83c3 --- /dev/null +++ b/firmware-bluetooth/boards/nrf52840dongle_nrf52840.overlay @@ -0,0 +1,6 @@ +/ { + aliases { + led0 = &led1_red; + led1 = &led1_blue; + }; +}; diff --git a/firmware-bluetooth/boards/xiao_ble_nrf52840.overlay b/firmware-bluetooth/boards/xiao_ble_nrf52840.overlay new file mode 100644 index 00000000..36198509 --- /dev/null +++ b/firmware-bluetooth/boards/xiao_ble_nrf52840.overlay @@ -0,0 +1,15 @@ +/ { + aliases { + led0 = &led0; + led1 = &led2; + sw0 = &button0; + }; + + buttons { + compatible = "gpio-keys"; + button0: button_0 { + gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; + label = "Push button switch"; + }; + }; +}; diff --git a/firmware-bluetooth/prj.conf b/firmware-bluetooth/prj.conf index 99e32201..c7763a67 100644 --- a/firmware-bluetooth/prj.conf +++ b/firmware-bluetooth/prj.conf @@ -3,14 +3,13 @@ CONFIG_LOG_MAX_LEVEL=3 CONFIG_LOG_FUNC_NAME_PREFIX_INF=y CONFIG_LOG_BUFFER_SIZE=4096 -CONFIG_USE_DT_CODE_PARTITION=y CONFIG_KERNEL_BIN_NAME="remapper" CONFIG_BUILD_OUTPUT_UF2=y -CONFIG_CPLUSPLUS=y +CONFIG_CPP=y CONFIG_STD_CPP17=y CONFIG_NEWLIB_LIBC=y -CONFIG_LIB_CPLUSPLUS=y +CONFIG_GLIBCXX_LIBCPP=y CONFIG_HEAP_MEM_POOL_SIZE=16384 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=16384 @@ -24,7 +23,7 @@ CONFIG_SETTINGS=y CONFIG_GPIO=y CONFIG_BT=y -CONFIG_BT_DEBUG_LOG=y +CONFIG_BT_LOG_LEVEL_DBG=y CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_L2CAP_TX_BUF_COUNT=5 @@ -57,3 +56,21 @@ CONFIG_USB_DEVICE_PRODUCT="HID Remapper Bluetooth" CONFIG_USB_SELF_POWERED=n CONFIG_USB_DEVICE_SOF=y CONFIG_HID_INTERRUPT_EP_MPS=64 + +# Disable new USB device stack, as we +# currently still use the legacy USB stack +CONFIG_USB_DEVICE_STACK_NEXT=n + +# Disable deprecation warnings as we still +# use the legacy USB stack +CONFIG_DEPRECATION_TEST=y + + + +# ability to use reboot +CONFIG_REBOOT=y + +# Increase GATT read buffer count, +# otherwise we are unable to read +# the report map over BT +CONFIG_BT_ATT_TX_COUNT=10 \ No newline at end of file diff --git a/west.yml b/west.yml new file mode 100644 index 00000000..6afe81b2 --- /dev/null +++ b/west.yml @@ -0,0 +1,11 @@ +manifest: + remotes: + - name: ncs + url-base: https://github.com/nrfconnect + + projects: + - name: nrf + remote: ncs + repo-path: sdk-nrf + revision: v3.2.0 + import: true