1#-------------------------------------------------------------------------------
2# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
3# Copyright (c) 2021, Nordic Semiconductor ASA.
4# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
5# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
6#
7# SPDX-License-Identifier: BSD-3-Clause
8#
9#-------------------------------------------------------------------------------
10
11set(HAL_NORDIC_PATH "DOWNLOAD" CACHE PATH "Path to the Nordic HAL (or DOWNLOAD to fetch automatically)")
12set(HAL_NORDIC_VERSION "nrfx-3.0.0" CACHE STRING "Version of the Nordic HAL to download")
13set(HAL_NORDIC_REMOTE "https://github.com/zephyrproject-rtos/hal_nordic" CACHE STRING "Remote of the Nordic HAL to download")
14# Set to FALSE if HAL_NORDIC_VERSION is a SHA.
15set(HAL_NORDIC_SHALLOW_FETCH CACHE BOOL TRUE "Use shallow fetch to download Nordic HAL.")
16
17set(NULL_POINTER_EXCEPTION_DETECTION    FALSE       CACHE BOOL
18  "Enable null-pointer dereference detection for \
19   priviliged and unpriviliged secure reads and writes on supported platforms. \
20   Can be used to debug faults in the SPE. \
21   Note that null-pointer dereferences from the NSPE \
22   will trigger SecureFaults even without this option enabled. \
23   May require more MPU regions than are available depending on the configuration."
24  )
25
26# Required if MCUBoot has been built without CONFIG_MCUBOOT_CLEANUP_ARM_CORE enabled
27set(NRF_HW_INIT_RESET_ON_BOOT OFF CACHE BOOL "Initialize internal architecture state at boot")
28
29# Required if MCUboot has been built without CONFIG_MCUBOOT_NRF_CLEANUP_PERIPHERAL enabled.
30set(NRF_HW_INIT_NRF_PERIPHERALS OFF CACHE BOOL "Initialize nRF peripherals at boot")
31
32if (NRF_HW_INIT_NRF_PERIPHERALS AND NOT NRF_HW_INIT_RESET_ON_BOOT)
33        message(FATAL_ERROR "NRF_HW_INIT_NRF_PERIPHERALS depends on NRF_HW_INIT_RESET_ON_BOOT")
34endif()
35
36set(SECURE_UART1                        ON         CACHE BOOL      "Enable secure UART1")
37set(NRF_NS_STORAGE                      OFF        CACHE BOOL      "Enable non-secure storage partition")
38set(BL2                                 ON         CACHE BOOL      "Whether to build BL2")
39set(NRF_NS_SECONDARY                    ${BL2}     CACHE BOOL      "Enable non-secure secondary partition")
40
41# Platform-specific configurations
42set(CONFIG_TFM_USE_TRUSTZONE            ON)
43set(TFM_MULTI_CORE_TOPOLOGY             OFF)
44