boards: adafruit feather nrf52840 convert to variants

Update both versions of adafruit feather nrf52840 to be variants rather
than separate boards. The aim is to provide a more consistent approach
and to remove some unnecessary Kconfig redundancy.

Signed-off-by: Jacob Winther <jacob@9.nz>
This commit is contained in:
Jacob Winther 2024-08-30 19:07:20 +12:00 committed by Fabio Baltieri
commit dcb05ce31e
15 changed files with 37 additions and 37 deletions

View file

@ -4,5 +4,5 @@
# Copyright (c) 2024 Jacob Winther # Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
config BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE config BOARD_ADAFRUIT_FEATHER_NRF52840
select SOC_NRF52840_QIAA select SOC_NRF52840_QIAA

View file

@ -1,8 +0,0 @@
# Adafruit Feather nRF52840 Express board configuration
# Copyright (c) 2020 Tobias Svehagen
# Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0
config BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS
select SOC_NRF52840_QIAA

View file

@ -4,9 +4,9 @@
# Copyright (c) 2024 Jacob Winther # Copyright (c) 2024 Jacob Winther
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
if (BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE) if BOARD_ADAFRUIT_FEATHER_NRF52840
config BT_CTLR config BT_CTLR
default BT default BT
endif # BOARD_ADAFRUIT_FEATHER_NRF52840_EXPRESS || BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE endif # BOARD_ADAFRUIT_FEATHER_NRF52840

View file

@ -11,7 +11,7 @@
/ { / {
model = "Adafruit Feather nRF52840 Express"; model = "Adafruit Feather nRF52840 Express";
compatible = "adafruit,feather_nrf52840-express"; compatible = "adafruit,feather-nrf52840";
chosen { chosen {
zephyr,console = &uart0; zephyr,console = &uart0;

View file

@ -1,4 +1,4 @@
identifier: adafruit_feather_nrf52840_express identifier: adafruit_feather_nrf52840/nrf52840
name: Adafruit Feather nRF52840 Express name: Adafruit Feather nRF52840 Express
type: mcu type: mcu
arch: arm arch: arm

View file

@ -3,12 +3,12 @@
# Enable MPU # Enable MPU
CONFIG_ARM_MPU=y CONFIG_ARM_MPU=y
# enable GPIO # Enable GPIO
CONFIG_GPIO=y CONFIG_GPIO=y
# enable uart driver # Enable UART driver
CONFIG_SERIAL=y CONFIG_SERIAL=y
# enable console # Enable console
CONFIG_CONSOLE=y CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y CONFIG_UART_CONSOLE=y

View file

@ -10,7 +10,7 @@
/ { / {
model = "Adafruit Feather nRF52840 Sense"; model = "Adafruit Feather nRF52840 Sense";
compatible = "adafruit,feather_nrf52840-sense"; compatible = "adafruit,feather-nrf52840-sense";
chosen { chosen {
zephyr,console = &cdc_acm_uart0; zephyr,console = &cdc_acm_uart0;
@ -48,6 +48,7 @@
*/ */
reserved_partition_0: partition@0 { reserved_partition_0: partition@0 {
label = "SoftDevice"; label = "SoftDevice";
read-only;
reg = <0x000000000 DT_SIZE_K(152)>; reg = <0x000000000 DT_SIZE_K(152)>;
}; };
code_partition: partition@26000 { code_partition: partition@26000 {
@ -66,6 +67,7 @@
boot_partition: partition@f4000 { boot_partition: partition@f4000 {
label = "UF2"; label = "UF2";
read-only;
reg = <0x000f4000 DT_SIZE_K(48)>; reg = <0x000f4000 DT_SIZE_K(48)>;
}; };
}; };

View file

@ -1,4 +1,4 @@
identifier: adafruit_feather_nrf52840_sense identifier: adafruit_feather_nrf52840/nrf52840/sense
name: Adafruit Feather nRF52840 Sense name: Adafruit Feather nRF52840 Sense
type: mcu type: mcu
arch: arm arch: arm

View file

@ -2,7 +2,7 @@
board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000") board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000")
board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
if(CONFIG_BOARD_ADAFRUIT_FEATHER_NRF52840_SENSE) if(CONFIG_BUILD_OUTPUT_UF2)
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
endif() endif()
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -1,9 +1,7 @@
boards: board:
- name: adafruit_feather_nrf52840_express name: adafruit_feather_nrf52840
vendor: adafruit
socs:
- name: nrf52840
- name: adafruit_feather_nrf52840_sense
vendor: adafruit vendor: adafruit
socs: socs:
- name: nrf52840 - name: nrf52840
variants:
- name: sense

View file

@ -135,11 +135,11 @@ Programming and Debugging
Flashing Flashing
======== ========
Flashing Zephyr onto the ``adafruit_feather_nrf52480_express`` board is possible Flashing Zephyr onto the ``adafruit_feather_nrf52480`` board is possible
using an external programmer. The programmer is attached to the SWD header. using an external programmer. The programmer is attached to the SWD header.
The Feather nRF52840 ships with the `Adafruit nRF52 Bootloader`_ which Both the Feather nRF52840 Express and Sense ship with the `Adafruit nRF52 Bootloader`_
supports flashing using `UF2`_. This allows easy flashing of new images, which supports flashing using `UF2`_. This allows easy flashing of new images,
but does not support debugging the device. but does not support debugging the device.
#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application. #. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application.
@ -150,7 +150,7 @@ but does not support debugging the device.
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky :zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_express/nrf52840 :board: adafruit_feather_nrf52840/nrf52840
:goals: build :goals: build
:compact: :compact:
@ -158,7 +158,7 @@ but does not support debugging the device.
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky :zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_sense/nrf52840 :board: adafruit_feather_nrf52840/nrf52840/sense
:goals: build :goals: build
:compact: :compact:
@ -173,11 +173,19 @@ but does not support debugging the device.
.. tabs:: .. tabs::
.. group-tab:: Express
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840/nrf52840
:goals: flash
:compact:
.. group-tab:: Sense .. group-tab:: Sense
.. zephyr-app-commands:: .. zephyr-app-commands::
:zephyr-app: samples/basic/blinky :zephyr-app: samples/basic/blinky
:board: adafruit_feather_nrf52840_sense :board: adafruit_feather_nrf52840/nrf52840/sense
:goals: flash :goals: flash
:compact: :compact:

View file

@ -35,10 +35,10 @@ set(actinius_icarus_som_ns_DEPRECATED
actinius_icarus_som/nrf9160/ns actinius_icarus_som/nrf9160/ns
) )
set(adafruit_feather_DEPRECATED set(adafruit_feather_DEPRECATED
adafruit_feather_nrf52840_express adafruit_feather_nrf52840/nrf52840
) )
set(adafruit_feather_nrf52840_DEPRECATED set(adafruit_feather_nrf52840_DEPRECATED
adafruit_feather_nrf52840_express adafruit_feather_nrf52840/nrf52840
) )
set(adafruit_itsybitsy_nrf52840_DEPRECATED set(adafruit_itsybitsy_nrf52840_DEPRECATED
adafruit_itsybitsy adafruit_itsybitsy