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:
parent
29fc537bfb
commit
afe4cce831
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue