Skip to content

Commit

Permalink
Samples: Bluetooth: Mesh: Make Light sample fit with DFU and TFM
Browse files Browse the repository at this point in the history
This reconfigures TFM and the TFM partition size to make it possible to
fit TFM and the application when building with a bootloader using the
DFU overlay config.

Co-authored-by: Ludvig Jordet <[email protected]>
Signed-off-by: Anders Storrø <[email protected]>
  • Loading branch information
Andrewpini and ludvigsj committed May 31, 2024
1 parent 1fd0366 commit 94e2fa0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions samples/bluetooth/mesh/light/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Set lower default sizes for TF-M partition when using the TF-M Profile Small.
# This is done using defaults instead of in a conf file in order to set the
# correctly aligned size depending on the presence of the bootloader or not.

# Declared before sourcing "Kconfig.zephyr" in order to give precedence
# to these application-specific defaults instead of the unconditional default
# in the Zephyr Kconfig tree.
configdefault PM_PARTITION_SIZE_TFM
default 0x17e00 if TFM_PROFILE_TYPE_SMALL && BOOTLOADER_MCUBOOT
default 0x18000 if TFM_PROFILE_TYPE_SMALL

source "Kconfig.zephyr"
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ CONFIG_BT_HOST_CRYPTO=n
CONFIG_BT_GATT_CACHING=n

CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=n

# Use the TF-M Profile Small to save ROM and be able to fit when using bootloader
CONFIG_TFM_PROFILE_TYPE_SMALL=y

0 comments on commit 94e2fa0

Please sign in to comment.