Skip to content

Commit

Permalink
Bluetooth: Mesh: Add sysbuild support to Light DFU overlay
Browse files Browse the repository at this point in the history
This does the following:

 * Add sysbuild_dfu.conf to enable the bootloader when building with DFU
   support.
 * Replace overlay-dfu.conf with prj_dfu.conf, to enable use of
   FILE_SUFFIX to specify all required config for the DFU configuration

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
  • Loading branch information
ludvigsj committed May 14, 2024
1 parent 10dca6f commit 4d8375c
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 21 deletions.
20 changes: 0 additions & 20 deletions samples/bluetooth/mesh/light/overlay-dfu.conf

This file was deleted.

72 changes: 72 additions & 0 deletions samples/bluetooth/mesh/light/prj_dfu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

# Deffered logging helps improve LPN power consumption
# when friendship is established.
CONFIG_LOG_MODE_DEFERRED=y

# General configuration
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
CONFIG_NVS_LOOKUP_CACHE=y
CONFIG_SETTINGS_NVS_NAME_CACHE=y
CONFIG_HWINFO=y
CONFIG_DK_LIBRARY=y
CONFIG_PM_SINGLE_IMAGE=y
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_DEVICE_NAME="New Mesh Light"
CONFIG_BT_L2CAP_TX_BUF_COUNT=8

CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SETTINGS=y
# Increase RX stack size to avoid overflow during provisioning
CONFIG_BT_RX_STACK_SIZE=2700

# Disable unused Bluetooth features
CONFIG_BT_CTLR_LE_ENC=n
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_CTLR_CHAN_SEL_2=n
CONFIG_BT_CTLR_MIN_USED_CHAN=n
CONFIG_BT_CTLR_PRIVACY=n

# Bluetooth Mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_TX_SEG_MAX=10
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_PROXY_USE_DEVICE_NAME=y
CONFIG_BT_MESH_DK_PROV=y

# Bluetooth Mesh models
CONFIG_BT_MESH_ONOFF_SRV=y

# ==== DFU specific configuration ====

# Enable point to point DFU over SMP
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y

# Enable Extended Advertiser to advertise BT SMP service
CONFIG_BT_EXT_ADV=y
CONFIG_BT_EXT_ADV_MAX_ADV_SET=6

# One extra connection for mesh GATT/proxy and one for SMP BT.
CONFIG_BT_MAX_CONN=3

# One extra identity for SMP service
CONFIG_BT_ID_MAX=2
2 changes: 1 addition & 1 deletion samples/bluetooth/mesh/light/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ tests:
- nrf21540dk/nrf52840
- nrf54l15pdk/nrf54l15/cpuapp
platform_allow: nrf52840dk/nrf52840 nrf21540dk/nrf52840 nrf54l15pdk/nrf54l15/cpuapp
extra_args: OVERLAY_CONFIG=overlay-dfu.conf
extra_args: FILE_SUFFIX=dfu
tags: bluetooth ci_build sysbuild
7 changes: 7 additions & 0 deletions samples/bluetooth/mesh/light/sysbuild_dfu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

SB_CONFIG_BOOTLOADER_MCUBOOT=y

0 comments on commit 4d8375c

Please sign in to comment.