diff --git a/samples/tfm/tfm_psa_template/Kconfig.sysbuild b/samples/tfm/tfm_psa_template/Kconfig.sysbuild new file mode 100644 index 000000000000..4ed795c0e264 --- /dev/null +++ b/samples/tfm/tfm_psa_template/Kconfig.sysbuild @@ -0,0 +1,30 @@ +# +# Copyright (c) 2024 Nordic Semiconductor +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +source "${ZEPHYR_BASE}/share/sysbuild/Kconfig" + +if BOARD_NRF5340DK_NRF5340_CPUAPP_NS + +choice NETCORE + default NETCORE_EMPTY +endchoice + +config SECURE_BOOT_NETCORE + default y + +config NETCORE_APP_UPDATE + default y + +config MCUBOOT_APP_SYNC_UPDATEABLE_IMAGES + default y + +config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY + default y + +config MCUBOOT_USE_ALL_AVAILABLE_RAM + default y + +endif diff --git a/samples/tfm/tfm_psa_template/boards/nrf5340dk_nrf5340_cpuapp_ns.conf b/samples/tfm/tfm_psa_template/boards/nrf5340dk_nrf5340_cpuapp_ns.conf new file mode 100644 index 000000000000..4deae1c7c504 --- /dev/null +++ b/samples/tfm/tfm_psa_template/boards/nrf5340dk_nrf5340_cpuapp_ns.conf @@ -0,0 +1,8 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_FPU=y +CONFIG_BOARD_ENABLE_CPUNET=y diff --git a/samples/tfm/tfm_psa_template/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay b/samples/tfm/tfm_psa_template/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay new file mode 100644 index 000000000000..18f34a962ea1 --- /dev/null +++ b/samples/tfm/tfm_psa_template/boards/nrf5340dk_nrf5340_cpuapp_ns.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +}; diff --git a/samples/tfm/tfm_psa_template/sysbuild.conf b/samples/tfm/tfm_psa_template/sysbuild.conf index bc1ff1a8b380..01c39c67965b 100644 --- a/samples/tfm/tfm_psa_template/sysbuild.conf +++ b/samples/tfm/tfm_psa_template/sysbuild.conf @@ -9,4 +9,3 @@ SB_CONFIG_SECURE_BOOT_APPCORE=y SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y SB_CONFIG_MCUBOOT_UPDATEABLE_IMAGES=2 -SB_CONFIG_MCUBOOT_APP_SYNC_UPDATEABLE_IMAGES=n diff --git a/samples/tfm/tfm_psa_template/sysbuild/b0n/prj.conf b/samples/tfm/tfm_psa_template/sysbuild/b0n/prj.conf new file mode 100644 index 000000000000..928007ce6268 --- /dev/null +++ b/samples/tfm/tfm_psa_template/sysbuild/b0n/prj.conf @@ -0,0 +1,29 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_NCS_SAMPLES_DEFAULTS=y + +CONFIG_IS_SECURE_BOOTLOADER=y +CONFIG_MULTITHREADING=n +CONFIG_GPIO=n +CONFIG_ARM_MPU=n +CONFIG_TICKLESS_KERNEL=n +CONFIG_ERRNO=n +CONFIG_SYS_CLOCK_EXISTS=y +CONFIG_FPROTECT=y +CONFIG_FW_INFO=y +CONFIG_SECURE_BOOT_CRYPTO=y +CONFIG_SECURE_BOOT_VALIDATION=y +CONFIG_SECURE_BOOT_STORAGE=y +CONFIG_PCD_NET=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_LOG=y + +# To build with a minimal configuration, use the overlay file +# '-DOVERLAY_CONFIG=overlay-minimal-size.conf' + +# Enable locking the network core for debugging +CONFIG_PCD_LOCK_NETCORE_DEBUG=y diff --git a/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 000000000000..29f50f385b31 --- /dev/null +++ b/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,22 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_BOOT_MAX_IMG_SECTORS=256 + +CONFIG_PCD_APP=y + +CONFIG_UPDATEABLE_IMAGE_NUMBER=2 +CONFIG_NRF53_MULTI_IMAGE_UPDATE=y +CONFIG_BOOT_IMAGE_ACCESS_HOOK_NRF5340=y +CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y + +CONFIG_FLASH_SIMULATOR=y +CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y +CONFIG_FLASH_SIMULATOR_STATS=n + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16 diff --git a/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 000000000000..18f34a962ea1 --- /dev/null +++ b/samples/tfm/tfm_psa_template/sysbuild/mcuboot/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/ { + chosen { + nordic,pm-ext-flash = &mx25r64; + }; +};