Skip to content

Commit 4d2c8c6

Browse files
akredalenrlubos
authored andcommitted
samples: bluetooth: mesh: add optional external flash settings
Added optional external flash settings support (nRF52840 DK only) to all mesh samples. Added build only test entries and updated docs. Renamed existing DFU external flash files from generic ext_flash to more descriptive dfu_ext_flash suffix for consistency. Signed-off-by: Stine Åkredalen <[email protected]>
1 parent 0bc045f commit 4d2c8c6

File tree

60 files changed

+531
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+531
-28
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
This sample supports relocating mesh settings to external flash on ``nrf52840dk/nrf52840`` board target.
2+
See the `nRF52840 DK User Guide`_ for details about the external flash memory available on the board.
3+
This provides additional storage space for mesh persistent data.
4+
5+
To enable external flash settings storage, set :makevar:`FILE_SUFFIX` to ``settings_ext_flash`` when building the sample.
6+
7+
Build the sample using the following command:
8+
9+
.. code-block:: console
10+
11+
west build -p -b nrf52840dk/nrf52840 -- -DFILE_SUFFIX=settings_ext_flash
12+
13+
.. note::
14+
The external flash is not erased during the internal flash erasing procedure.
15+
See `nRF Util`_ for more information on how to erase the external flash.
16+
17+
Currently, the external flash settings partition is only supported on the ``nrf52840dk/nrf52840`` board target.

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,27 @@ Bluetooth samples
361361
Bluetooth Mesh samples
362362
----------------------
363363

364+
* Added external flash settings support for the ``nrf52840dk/nrf52840`` board targets in all Bluetooth Mesh samples.
365+
364366
* :ref:`ble_mesh_dfu_distributor` sample:
365367

366-
* Added support for external flash memory for the ``nrf52840dk/nrf52840`` and the ``nrf54l15dk/nrf54l15/cpuapp`` as the secondary partition for the DFU process.
368+
* Added:
369+
370+
* Support for external flash memory for the ``nrf52840dk/nrf52840`` and the ``nrf54l15dk/nrf54l15/cpuapp`` as the secondary partition for the DFU process.
371+
* Support for external flash settings for the ``nrf52840dk/nrf52840`` board targets.
372+
373+
* Updated the :makevar:`FILE_SUFFIX` make variable to use more descriptive suffixes for external flash configurations.
374+
The new suffixes are ``_dfu_ext_flash`` for external flash DFU storage and ``_ext_flash_settings`` for external flash settings storage.
367375

368376
* :ref:`ble_mesh_dfu_target` sample:
369377

370-
* Added support for external flash memory for the ``nrf52840dk/nrf52840`` and the ``nrf54l15dk/nrf54l15/cpuapp`` as the secondary partition for the DFU process.
378+
* Added:
379+
380+
* Support for external flash memory for the ``nrf52840dk/nrf52840`` and the ``nrf54l15dk/nrf54l15/cpuapp`` as the secondary partition for the DFU process.
381+
* Support for external flash settings for the ``nrf52840dk/nrf52840`` board targets.
382+
383+
* Updated the :makevar:`FILE_SUFFIX` make variable to use more descriptive suffixes for external flash configurations.
384+
The new suffixes are ``_dfu_ext_flash`` for external flash DFU storage and ``_ext_flash_settings`` for external flash settings storage.
371385

372386
* :ref:`bluetooth_mesh_sensor_client` sample:
373387

samples/bluetooth/mesh/ble_peripheral_lbs_coex/README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ After programming the sample to your development kit, test it by performing the
249249
Once connected, the device will not advertise with the LBS Service UUID until the device is rebooted.
250250
Reboot the device to restart the LBS Service UUID advertisements.
251251

252+
External flash for settings partition
253+
=====================================
254+
255+
.. include:: /includes/mesh_ext_flash_settings.txt
256+
252257
Dependencies
253258
************
254259

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# External flash support for nRF52840 DK
8+
CONFIG_NORDIC_QSPI_NOR=y
9+
10+
# Relocate settings partition to external flash
11+
CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* Copyright (c) 2025 Nordic Semiconductor ASA
2+
*
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
/ {
7+
chosen {
8+
nordic,pm-ext-flash = &mx25r64;
9+
};
10+
};
11+
12+
&mx25r64 {
13+
status = "okay";
14+
};

samples/bluetooth/mesh/ble_peripheral_lbs_coex/sample.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ tests:
2525
- bluetooth
2626
- ci_build
2727
- sysbuild
28+
sample.bluetooth.mesh.ble_and_mesh.settings_ext_flash:
29+
sysbuild: true
30+
build_only: true
31+
extra_args: FILE_SUFFIX=settings_ext_flash
32+
platform_allow:
33+
- nrf52840dk/nrf52840
34+
tags:
35+
- bluetooth
36+
- ci_build
37+
- sysbuild
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# External flash support for nRF52840 DK
8+
CONFIG_NORDIC_QSPI_NOR=y
9+
10+
# Relocate settings partition to external flash
11+
CONFIG_PM_PARTITION_REGION_SETTINGS_STORAGE_EXTERNAL=y
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* Copyright (c) 2025 Nordic Semiconductor ASA
2+
*
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
/ {
7+
chosen {
8+
nordic,pm-ext-flash = &mx25r64;
9+
};
10+
};
11+
12+
&mx25r64 {
13+
status = "okay";
14+
};

samples/bluetooth/mesh/chat/sample.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ tests:
2323
- bluetooth
2424
- ci_build
2525
- sysbuild
26+
sample.bluetooth.mesh.chat.settings_ext_flash:
27+
sysbuild: true
28+
build_only: true
29+
integration_platforms:
30+
- nrf52840dk/nrf52840
31+
platform_allow:
32+
- nrf52840dk/nrf52840
33+
extra_args: FILE_SUFFIX=settings_ext_flash
34+
tags:
35+
- bluetooth
36+
- ci_build
37+
- sysbuild

samples/bluetooth/mesh/chat/sample_description.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ When the reply is received, you will see the following:
200200
201201
Note that private messages are only seen by those the messages are addressed to.
202202

203+
External flash for settings partition
204+
=====================================
205+
206+
.. include:: /includes/mesh_ext_flash_settings.txt
207+
203208
Dependencies
204209
************
205210

0 commit comments

Comments
 (0)