1#-------------------------------------------------------------------------------
2# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
3# Copyright (c) 2021 STMicroelectronics. All rights reserved.
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
11########################## BL2 #################################################
12
13set(MCUBOOT_IMAGE_NUMBER                2           CACHE STRING    "Whether to combine S and NS into either 1 image, or sign each seperately")
14set(BL2_TRAILER_SIZE                    0x2000      CACHE STRING    "Trailer size")
15set(MCUBOOT_ALIGN_VAL                   16          CACHE STRING    "Align option to build image with imgtool")
16set(MCUBOOT_UPGRADE_STRATEGY            "SWAP_USING_SCRATCH"      CACHE STRING    "Upgrade strategy for images")
17set(MCUBOOT_BOOTSTRAP                   ON          CACHE BOOL      "Allow initial state with images in secondary slots(empty primary slots)")
18set(MCUBOOT_ENC_IMAGES                  ON          CACHE BOOL      "Enable encrypted image upgrade support")
19set(MCUBOOT_ENCRYPT_RSA                 ON          CACHE BOOL      "Use RSA for encrypted image upgrade support")
20################################## Dependencies ################################
21set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON       CACHE BOOL      "Enable Internal Trusted Storage partition")
22set(TFM_PARTITION_CRYPTO                ON          CACHE BOOL      "Enable Crypto partition")
23set(CRYPTO_HW_ACCELERATOR               ON          CACHE BOOL      "Whether to enable the crypto hardware accelerator on supported platforms")
24set(MBEDCRYPTO_BUILD_TYPE               minsizerel  CACHE STRING    "Build type of Mbed Crypto library")
25set(TFM_DUMMY_PROVISIONING              OFF         CACHE BOOL      "Provision with dummy values. NOT to be used in production")
26set(PLATFORM_DEFAULT_OTP_WRITEABLE      OFF         CACHE BOOL      "Use on chip flash with write support")
27set(PLATFORM_DEFAULT_NV_COUNTERS        OFF         CACHE BOOL      "Use default nv counter implementation.")
28set(PS_CRYPTO_AEAD_ALG                  PSA_ALG_GCM CACHE STRING    "The AEAD algorithm to use for authenticated encryption in Protected Storage")
29set(MCUBOOT_FIH_PROFILE                 LOW         CACHE STRING    "Fault injection hardening profile [OFF, LOW, MEDIUM, HIGH]")
30
31# Platform-specific configurations
32set(CONFIG_TFM_USE_TRUSTZONE             ON)
33set(TFM_MULTI_CORE_TOPOLOGY              OFF)
34set(PLATFORM_HAS_FIRMWARE_UPDATE_SUPPORT ON)
35set(STSAFEA                             OFF          CACHE BOOL      "Activate ST SAFE SUPPORT")
36set(MCUBOOT_DATA_SHARING                ON)
37