Skip to content

Commit e54b89e

Browse files
doc: Matter: Add a guide for custom board creation
A new guide is added to each sample and contains instruction on how to create a custom board and prepare it to work with Matter. Signed-off-by: Arkadiusz Balys <[email protected]>
1 parent 4b41766 commit e54b89e

File tree

10 files changed

+33
-49
lines changed

10 files changed

+33
-49
lines changed

applications/matter_bridge/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,8 @@ endchoice
176176

177177
endif # OPENTHREAD
178178

179-
if BOARD_NRF7002DK_NRF5340_CPUAPP || SHIELD_NRF7002EK
180-
181-
config WIFI_NRF70
182-
default y
183-
184179
config CHIP_WIFI
185-
default y
186-
187-
endif # BOARD_NRF7002DK_NRF5340_CPUAPP || SHIELD_NRF7002EK
180+
default y if BOARD_NRF7002DK_NRF5340_CPUAPP || SHIELD_NRF7002EK
188181

189182
# Dummy Kconfig just to select experimental for some of the configurations.
190183
config BRIDGE_EXPERIMENTAL

doc/nrf/includes/advanced_conf_matter.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ Factory data support
2323
.. include:: ../lock/README.rst
2424
:start-after: matter_door_lock_sample_factory_data_start
2525
:end-before: matter_door_lock_sample_factory_data_end
26+
27+
Custom board with Nordic SoC
28+
----------------------------
29+
30+
.. include:: /includes/matter_custom_board.txt

doc/nrf/includes/matter_building_nrf5340dk_70ek

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To build the Matter over Wi-Fi sample variant on nRF5340 DK with nRF7002 EK shie
1010

1111
.. code-block:: console
1212

13-
-- -DSHIELD=nrf7002ek -DFILE_SUFFIX=nrf70ek -DSB_CONFIG_WIFI_NRF70=y
13+
-- -DSHIELD=nrf7002ek -DFILE_SUFFIX=nrf70ek -DSB_CONFIG_WIFI_NRF70=y -DCONFIG_CHIP_WIFI=y
1414

1515
.. group-tab:: Command line
1616

@@ -20,11 +20,11 @@ To build the Matter over Wi-Fi sample variant on nRF5340 DK with nRF7002 EK shie
2020

2121
.. code-block:: console
2222

23-
west build -p -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD=nrf7002ek -DFILE_SUFFIX=nrf70ek -DSB_CONFIG_WIFI_NRF70=y
23+
west build -p -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD=nrf7002ek -DFILE_SUFFIX=nrf70ek -DSB_CONFIG_WIFI_NRF70=y -DCONFIG_CHIP_WIFI=y
2424

2525
* CMake with the following command:
2626

2727
.. code-block:: console
2828

29-
cmake -GNinja -Bbuild -DBOARD=nrf5340dk/nrf5340/cpuapp -DSHIELD=nrf7002ek -DFILE_SUFFIX=nrf70ek -DSB_CONFIG_WIFI_NRF70=y -DAPP_DIR=*app_path* *path_to_zephyr*/share/sysbuild
29+
cmake -GNinja -Bbuild -DBOARD=nrf5340dk/nrf5340/cpuapp -DSHIELD=nrf7002ek -DFILE_SUFFIX=nrf70ek -DSB_CONFIG_WIFI_NRF70=y -DCONFIG_CHIP_WIFI=y -DAPP_DIR=*app_path* *path_to_zephyr*/share/sysbuild
3030
ninja -C build
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. toggle::
2+
3+
To perpare the sample to work with a custom board you need to complete the following steps:
4+
5+
1. See this the :ref:`create-your-board-directory` Zephyr guide and prepare your board directory.
6+
#. Modify the content of the :file:`board.yaml` file according to the :ref:`board_description` user guide.
7+
#. :ref:`default_board_configuration` (all `.dts` and `.dtsi` files) to meet your board requirements.
8+
#. :ref:`Write Kconfig files` to enable all required Kconfig options for your board.
9+
#. If you want to build your custom board with nRF70 Wi-Fi support, set the :kconfig:option:`CONFIG_CHIP_WIFI`, and :kconfig:option:`SB_CONFIG_NRF70` Kconfig options to ``y``.
10+
#. If your device use external flash, add its devicetree defintion under :file:`board/<board_name>_<soc_name>.overlay` file, and set ``nordic,pm-ext-flash`` in the devicetree's ``chosen`` configuration.
11+
#. See the :ref:`ug_matter_device_advanced_kconfigs` user guide, compose your list of advanced configuration for your board, and apply chosen Kconfig options in :file:`board/<board_name>_<soc_name>.conf` file.
12+
#. See the :ref:`list of threads used in Matter application <matter_threads_table>` and then modify stack sizes according to your board and project requirements.
13+
#. A custom board does not have support for LEDs and Buttons, therefore you need to use your custom implementation of the :file:`nrf/samples/matter/common/src/board/board.cpp` board file.
14+
15+
For more information, see the following guides:
16+
17+
* :ref:`board_porting_guide` and :ref:`custom_board_definition` to learn about creating a custom board directory.
18+
* :ref:`ug_matter_device_optimizing_memory` to learn how to optimize memory on your board.
19+
* :ref:`ug_matter_device_advanced_kconfigs` to learn about Matter configuration.
20+
* :ref:`ug_matter_hw_requirements` to learn about hardware requirements for Nordic Developement Kits and refer to this during planning your custom board.

samples/matter/light_bulb/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ endchoice
1818

1919
endif # OPENTHREAD
2020

21-
if BOARD_NRF7002DK_NRF5340_CPUAPP
22-
23-
config WIFI_NRF70
24-
default y
25-
2621
config CHIP_WIFI
27-
default y
28-
29-
endif # BOARD_NRF7002DK_NRF5340_CPUAPP
22+
default y if BOARD_NRF7002DK_NRF5340_CPUAPP
3023

3124
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.features"
3225
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.defaults"

samples/matter/light_switch/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ endif # OPENTHREAD
3535

3636
if BOARD_NRF7002DK_NRF5340_CPUAPP
3737

38-
config WIFI_NRF70
39-
default y
40-
4138
config CHIP_WIFI
4239
default y
4340

samples/matter/lock/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ endif # OPENTHREAD
132132

133133
if BOARD_NRF7002DK_NRF5340_CPUAPP || SHIELD_NRF7002EK
134134

135-
config WIFI_NRF70
136-
default y
137-
138135
config CHIP_WIFI
139136
default y
140137

samples/matter/manufacturer_specific/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ endchoice
1818

1919
endif # OPENTHREAD
2020

21-
if BOARD_NRF7002DK_NRF5340_CPUAPP
22-
23-
config WIFI_NRF70
24-
default y
25-
2621
config CHIP_WIFI
27-
default y
28-
29-
endif # BOARD_NRF7002DK_NRF5340_CPUAPP
22+
default y if BOARD_NRF7002DK_NRF5340_CPUAPP
3023

3124
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.features"
3225
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.defaults"

samples/matter/template/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ endchoice
1818

1919
endif # OPENTHREAD
2020

21-
if BOARD_NRF7002DK_NRF5340_CPUAPP
22-
23-
config WIFI_NRF70
24-
default y
25-
2621
config CHIP_WIFI
27-
default y
28-
29-
endif # BOARD_NRF7002DK_NRF5340_CPUAPP
22+
default y if BOARD_NRF7002DK_NRF5340_CPUAPP
3023

3124
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.features"
3225
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.defaults"

samples/matter/thermostat/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,8 @@ endchoice
4242

4343
endif # OPENTHREAD
4444

45-
if BOARD_NRF7002DK_NRF5340_CPUAPP
46-
47-
config WIFI_NRF70
48-
default y
49-
5045
config CHIP_WIFI
51-
default y
52-
53-
endif # BOARD_NRF7002DK_NRF5340_CPUAPP
46+
default y if BOARD_NRF7002DK_NRF5340_CPUAPP
5447

5548
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.features"
5649
source "$(ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR)/config/nrfconnect/chip-module/Kconfig.defaults"

0 commit comments

Comments
 (0)