Skip to content

Commit 171ae2b

Browse files
committed
Bluetooth: Mesh: Add external flash support to DFU samples on nRF54L
This adds the required application configuration and mcuboot configuration required to make the DFU samples work with the `ext_flash` file suffix on both nRF52840 and nRF54L15 DKs. Signed-off-by: Ludvig Jordet <[email protected]>
1 parent 5390eed commit 171ae2b

24 files changed

+354
-18
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ Bluetooth Mesh samples
333333

334334
* :ref:`ble_mesh_dfu_distributor` sample:
335335

336-
* Added support for external flash memory for the ``nrf52840dk/nrf52840`` as the secondary partition for the DFU process.
336+
* Added support for external flash memory for the ``nrf52840dk/nrf52840`` and the ``nrf54l15dk/nrf54l15/cpuapp`` as the secondary partition for the DFU process.
337337

338338
* :ref:`ble_mesh_dfu_target` sample:
339339

340-
* Added support for external flash memory for the ``nrf52840dk/nrf52840`` as the secondary partition for the DFU process.
340+
* Added support for external flash memory for the ``nrf52840dk/nrf52840`` and the ``nrf54l15dk/nrf54l15/cpuapp`` as the secondary partition for the DFU process.
341341

342342
* :ref:`bluetooth_mesh_sensor_client` sample:
343343

samples/bluetooth/mesh/dfu/distributor/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Build the sample using the following command:
254254
.. note::
255255
The external flash is not erased during the internal flash erasing procedure.
256256
See `nRF Util`_ for more information on how to erase the external flash.
257-
Currently, only the external flash on the ``nrf52840dk/nrf52840`` board is supported at the moment.
257+
Currently, external flash is supported on the ``nrf52840dk/nrf52840`` board and the ``nrf54l15dk/nrf54l15/cpuapp`` board.
258258

259259
Dependencies
260260
************
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
# Application overlay - nrf54l15
8+
9+
CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=n
10+
CONFIG_NVS=n
11+
CONFIG_NVS_LOOKUP_CACHE=n
12+
CONFIG_SETTINGS_NVS_NAME_CACHE=n
13+
CONFIG_ZMS=y
14+
CONFIG_SETTINGS_ZMS_CUSTOM_SECTOR_COUNT=y
15+
CONFIG_SETTINGS_ZMS_SECTOR_COUNT=8
16+
CONFIG_ZMS_LOOKUP_CACHE=y
17+
CONFIG_ZMS_LOOKUP_CACHE_SIZE=512
18+
CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y
19+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
20+
CONFIG_BT_RX_STACK_SIZE=5120
21+
CONFIG_SHELL_STACK_SIZE=2560
22+
23+
# External flash specific settings
24+
CONFIG_GPIO=y
25+
CONFIG_SPI=y
26+
CONFIG_SPI_NOR=y
27+
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
28+
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
29+
# QSPI drivers are enabled by default for some chips.
30+
# Disable it explicitly to be sure QSPI is disabled.
31+
CONFIG_NORDIC_QSPI_NOR=n

samples/bluetooth/mesh/dfu/distributor/sysbuild/mcuboot.conf

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* Copyright (c) 2025 Nordic Semiconductor ASA
2+
*
3+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
*/
5+
6+
/ {
7+
chosen {
8+
zephyr,code-partition = &boot_partition;
9+
};
10+
};
File renamed without changes.
File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CONFIG_GPIO=y
2+
CONFIG_SPI=y
3+
CONFIG_SPI_NOR=y
4+
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
5+
CONFIG_FLASH=y
6+
CONFIG_MAIN_STACK_SIZE=20480
7+
CONFIG_BOOT_MAX_IMG_SECTORS=512
8+
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
9+
# Ensure that the qspi driver is disabled by default
10+
CONFIG_NORDIC_QSPI_NOR=n
11+
12+
CONFIG_MULTITHREADING=y
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/ {
2+
chosen {
3+
nordic,pm-ext-flash = &mx25r64;
4+
zephyr,code-partition = &boot_partition;
5+
};
6+
};
7+
8+
/delete-node/ &boot_partition;
9+
/delete-node/ &slot0_partition;
10+
/delete-node/ &slot1_partition;
11+
12+
/delete-node/ &storage_partition;
13+
14+
&cpuapp_rram {
15+
reg = < 0x0 DT_SIZE_K(1524) >;
16+
17+
partitions {
18+
boot_partition: partition@0 {
19+
label = "mcuboot";
20+
reg = <0x000000000 0x00014000>;
21+
};
22+
23+
slot0_partition: partition@14000 {
24+
label = "image-0";
25+
reg = <0x000014000 0x0015A000>;
26+
};
27+
28+
storage_partition: partition@16E000 {
29+
label = "storage";
30+
reg = < 0x16E000 0x9000 >;
31+
};
32+
};
33+
};
34+
35+
&mx25r64 {
36+
status = "okay";
37+
38+
partitions {
39+
compatible = "fixed-partitions";
40+
#address-cells = <1>;
41+
#size-cells = <1>;
42+
43+
slot1_partition: partition@0 {
44+
label = "image-1";
45+
reg = <0x000000000 0x0015A000>;
46+
};
47+
};
48+
};

0 commit comments

Comments
 (0)