Skip to content

Commit

Permalink
samples: bluetooth: fast_pair: locator_tag: Change TF-M profile
Browse files Browse the repository at this point in the history
Changed TF-M profile from minimal to manually configured with
minimal feature set needed for the proper work of the
Bluetooth stack that uses PSA Crypto.
Changed pm_static files for nrf5340dk/nrf5340/cpuapp/ns
and thingy53/nrf5340/cpuapp/ns to accomodate needed
tfm_its partition and fix placement of bt_fast_pair partition.

Jira: NCSDK-31777

Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
  • Loading branch information
mkapala-nordic committed Feb 19, 2025
1 parent 01ad075 commit bcba759
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TF-M profile has to be properly configured to be able to run
# the Bluetooth stack which uses PSA crypto API.
# The following configuration is a minimal set of options required.
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y

CONFIG_TFM_PARTITION_PLATFORM=y
CONFIG_TFM_PARTITION_CRYPTO=y
CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE=y
CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n
CONFIG_TFM_PARTITION_INITIAL_ATTESTATION=n
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,16 @@
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TF-M profile has to be properly configured to be able to run
# the Bluetooth stack which uses PSA crypto API.
# The following configuration is a minimal set of options required.
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y

CONFIG_TFM_PARTITION_PLATFORM=y
CONFIG_TFM_PARTITION_CRYPTO=y
CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE=y
CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n
CONFIG_TFM_PARTITION_INITIAL_ATTESTATION=n

# Disable TF-M logging
CONFIG_TFM_LOG_LEVEL_SILENCE=y
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ CONFIG_DULT_BATTERY_TYPE_RECHARGEABLE=y
# * thingy53/nrf5340/cpuapp(/ns)
CONFIG_BT_ADV_PROV_TX_POWER_CORRECTION_VAL=-12
CONFIG_BT_FAST_PAIR_FMDN_TX_POWER_CORRECTION_VAL=-12

# TF-M profile has to be properly configured to be able to run
# the Bluetooth stack which uses PSA crypto API.
# The following configuration is a minimal set of options required.
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y

CONFIG_TFM_PARTITION_PLATFORM=y
CONFIG_TFM_PARTITION_CRYPTO=y
CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE=y
CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n
CONFIG_TFM_PARTITION_INITIAL_ATTESTATION=n
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,14 @@ CONFIG_DULT_BATTERY_TYPE_RECHARGEABLE=y
# * thingy53/nrf5340/cpuapp(/ns)
CONFIG_BT_ADV_PROV_TX_POWER_CORRECTION_VAL=-12
CONFIG_BT_FAST_PAIR_FMDN_TX_POWER_CORRECTION_VAL=-12

# TF-M profile has to be properly configured to be able to run
# the Bluetooth stack which uses PSA crypto API.
# The following configuration is a minimal set of options required.
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y

CONFIG_TFM_PARTITION_PLATFORM=y
CONFIG_TFM_PARTITION_CRYPTO=y
CONFIG_TFM_PARTITION_INTERNAL_TRUSTED_STORAGE=y
CONFIG_TFM_PARTITION_PROTECTED_STORAGE=n
CONFIG_TFM_PARTITION_INITIAL_ATTESTATION=n
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mcuboot_primary:
- tfm
- app
region: flash_primary
size: 0xef000
size: 0xe8000
span: *id001
mcuboot_pad:
address: 0xc000
Expand All @@ -19,38 +19,46 @@ mcuboot_pad:
tfm:
address: 0xc200
region: flash_primary
size: 0xbe00
size: 0x17e00
tfm_secure:
address: 0xc000
size: 0xc000
size: 0x18000
span: [mcuboot_pad, tfm]
tfm_nonsecure:
address: 0x18000
size: 0xe3000
address: 0x24000
size: 0xd0000
span: [app]
app:
address: 0x18000
address: 0x24000
region: flash_primary
size: 0xe3000
size: 0xd0000
mcuboot_primary_app:
address: 0xc200
orig_span: &id002
- tfm
- app
region: flash_primary
size: 0xeee00
size: 0xe7e00
span: *id002

nonsecure_storage:
address: 0xf4000
size: 0x8000
span: [bt_fast_pair, settings_storage]
bt_fast_pair:
address: 0xfb000
address: 0xf4000
region: flash_primary
size: 0x1000
settings_storage:
address: 0xf5000
region: flash_primary
size: 0x7000

nonsecure_storage:
tfm_storage:
address: 0xfc000
size: 0x4000
span: [settings_storage]
settings_storage:
span: [tfm_its]
tfm_its:
address: 0xfc000
region: flash_primary
size: 0x4000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mcuboot_primary:
- tfm
- app
region: flash_primary
size: 0xef000
size: 0xe8000
span: *id001
mcuboot_pad:
address: 0xc000
Expand All @@ -19,38 +19,46 @@ mcuboot_pad:
tfm:
address: 0xc200
region: flash_primary
size: 0xbe00
size: 0x17e00
tfm_secure:
address: 0xc000
size: 0xc000
size: 0x18000
span: [mcuboot_pad, tfm]
tfm_nonsecure:
address: 0x18000
size: 0xe3000
address: 0x24000
size: 0xd0000
span: [app]
app:
address: 0x18000
address: 0x24000
region: flash_primary
size: 0xe3000
size: 0xd0000
mcuboot_primary_app:
address: 0xc200
orig_span: &id002
- tfm
- app
region: flash_primary
size: 0xeee00
size: 0xe7e00
span: *id002

nonsecure_storage:
address: 0xf4000
size: 0x8000
span: [bt_fast_pair, settings_storage]
bt_fast_pair:
address: 0xfb000
address: 0xf4000
region: flash_primary
size: 0x1000
settings_storage:
address: 0xf5000
region: flash_primary
size: 0x7000

nonsecure_storage:
tfm_storage:
address: 0xfc000
size: 0x4000
span: [settings_storage]
settings_storage:
span: [tfm_its]
tfm_its:
address: 0xfc000
region: flash_primary
size: 0x4000
Expand Down

0 comments on commit bcba759

Please sign in to comment.