samples: soc_flash_nrf: Make sure that the flash partition is valid

Make sure that the flash partition is valid.
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2023-12-07 19:21:06 +01:00 committed by Carles Cufí
parent 29fc537bfb
commit afe4cce831
2 changed files with 5 additions and 5 deletions

View file

@ -3,3 +3,7 @@ CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
CONFIG_FCB=y
CONFIG_FLASH_MAP=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y

View file

@ -13,11 +13,7 @@
#include <stdio.h>
#ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE
#define TEST_PARTITION slot1_ns_partition
#else
#define TEST_PARTITION slot1_partition
#endif
#define TEST_PARTITION storage_partition
#define TEST_PARTITION_OFFSET FIXED_PARTITION_OFFSET(TEST_PARTITION)
#define TEST_PARTITION_DEVICE FIXED_PARTITION_DEVICE(TEST_PARTITION)