Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Edison Ai | 7d6cb3b | 2018-09-19 16:41:50 +0800 | [diff] [blame] | 2 | # Copyright (c) 2018-2019, Arm Limited. All rights reserved. |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | if(NOT DEFINED REGRESSION) |
| 9 | message(FATAL_ERROR "ERROR: Incomplete Configuration: REGRESSION not defined, Include this file from a Config*.cmake") |
| 10 | elseif(NOT DEFINED CORE_TEST) |
| 11 | message(FATAL_ERROR "ERROR: Incomplete Configuration: CORE_TEST not defined, Include this file from a Config*.cmake") |
| 12 | elseif(NOT DEFINED BL2) |
| 13 | message(FATAL_ERROR "ERROR: Incomplete Configuration: BL2 not defined, Include this file from a Config*.cmake") |
Tamas Ban | d90c81b | 2018-08-15 15:03:42 +0100 | [diff] [blame] | 14 | elseif(NOT DEFINED TFM_LVL) |
| 15 | message(FATAL_ERROR "ERROR: Incomplete Configuration: TFM_LVL not defined, Include this file from a Config*.cmake") |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 16 | endif() |
| 17 | |
Mate Toth-Pal | ee551bc | 2018-06-12 16:40:45 +0200 | [diff] [blame] | 18 | if(NOT DEFINED COMPILER) |
| 19 | message(FATAL_ERROR "ERROR: COMPILER is not set in command line") |
| 20 | elseif((NOT ${COMPILER} STREQUAL "ARMCLANG") AND (NOT ${COMPILER} STREQUAL "GNUARM")) |
| 21 | message(FATAL_ERROR "ERROR: Compiler \"${COMPILER}\" is not supported.") |
| 22 | endif() |
| 23 | |
Mate Toth-Pal | 48fc6a0 | 2018-01-24 09:50:14 +0100 | [diff] [blame] | 24 | set(BUILD_CMSIS_CORE Off) |
| 25 | set(BUILD_RETARGET Off) |
| 26 | set(BUILD_NATIVE_DRIVERS Off) |
| 27 | set(BUILD_TIME Off) |
| 28 | set(BUILD_STARTUP Off) |
| 29 | set(BUILD_TARGET_CFG Off) |
| 30 | set(BUILD_TARGET_HARDWARE_KEYS Off) |
Marc Moreno Berengue | 4cc81fc | 2018-08-10 14:32:01 +0100 | [diff] [blame] | 31 | set(BUILD_TARGET_NV_COUNTERS Off) |
Mate Toth-Pal | 48fc6a0 | 2018-01-24 09:50:14 +0100 | [diff] [blame] | 32 | set(BUILD_CMSIS_DRIVERS Off) |
| 33 | set(BUILD_UART_STDOUT Off) |
| 34 | set(BUILD_FLASH Off) |
Tamas Ban | 3681ce0 | 2018-11-22 15:19:24 +0000 | [diff] [blame] | 35 | set(BUILD_BOOT_SEED Off) |
Tamas Ban | 38e1731 | 2018-11-22 15:26:35 +0000 | [diff] [blame] | 36 | set(BUILD_DEVICE_ID Off) |
Mate Toth-Pal | 48fc6a0 | 2018-01-24 09:50:14 +0100 | [diff] [blame] | 37 | if(NOT DEFINED PLATFORM_CMAKE_FILE) |
| 38 | message (FATAL_ERROR "Platform specific CMake is not defined. Please set PLATFORM_CMAKE_FILE.") |
| 39 | elseif(NOT EXISTS ${PLATFORM_CMAKE_FILE}) |
| 40 | message (FATAL_ERROR "Platform specific CMake \"${PLATFORM_CMAKE_FILE}\" file does not exist. Please fix value of PLATFORM_CMAKE_FILE.") |
| 41 | else() |
| 42 | include(${PLATFORM_CMAKE_FILE}) |
| 43 | endif() |
| 44 | |
Oliver Swede | 2144044 | 2018-07-10 09:31:32 +0100 | [diff] [blame] | 45 | if (NOT DEFINED IMAGE_VERSION) |
Jamie Fox | 7a4170d | 2018-08-15 14:13:42 +0100 | [diff] [blame] | 46 | set(IMAGE_VERSION 0.0.0+0) |
Oliver Swede | 2144044 | 2018-07-10 09:31:32 +0100 | [diff] [blame] | 47 | endif() |
| 48 | |
Mate Toth-Pal | ee551bc | 2018-06-12 16:40:45 +0200 | [diff] [blame] | 49 | if(${COMPILER} STREQUAL "ARMCLANG") |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 50 | #Use any ARMCLANG version found on PATH. Note: Only versions supported by the |
| 51 | #build system will work. A file cmake/Common/CompilerArmClangXY.cmake |
| 52 | #must be present with a matching version. |
| 53 | include("Common/FindArmClang") |
| 54 | include("Common/${ARMCLANG_MODULE}") |
Mate Toth-Pal | 48fc6a0 | 2018-01-24 09:50:14 +0100 | [diff] [blame] | 55 | |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 56 | set (COMMON_COMPILE_FLAGS -fshort-enums -fshort-wchar -funsigned-char -mfpu=none -mcmse) |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 57 | ##Shared compiler settings. |
| 58 | function(config_setting_shared_compiler_flags tgt) |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 59 | embedded_set_target_compile_flags(TARGET ${tgt} LANGUAGE C FLAGS -xc -std=c99 ${COMMON_COMPILE_FLAGS} -Wall -Werror) |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 60 | endfunction() |
| 61 | |
| 62 | ##Shared linker settings. |
| 63 | function(config_setting_shared_linker_flags tgt) |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 64 | embedded_set_target_link_flags(TARGET ${tgt} FLAGS --strict --map --symbols --xref --entry=Reset_Handler --info=summarysizes,sizes,totals,unused,veneers) |
| 65 | endfunction() |
| 66 | elseif(${COMPILER} STREQUAL "GNUARM") |
| 67 | #Use any GNUARM version found on PATH. Note: Only versions supported by the |
| 68 | #build system will work. A file cmake/Common/CompilerGNUARMXY.cmake |
| 69 | #must be present with a matching version. |
| 70 | include("Common/FindGNUARM") |
| 71 | include("Common/${GNUARM_MODULE}") |
Mate Toth-Pal | 48fc6a0 | 2018-01-24 09:50:14 +0100 | [diff] [blame] | 72 | |
Mate Toth-Pal | f64f1eb | 2018-04-26 17:22:37 +0200 | [diff] [blame] | 73 | set (COMMON_COMPILE_FLAGS -fshort-enums -fshort-wchar -funsigned-char -msoft-float -mcmse --specs=nano.specs) |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 74 | ##Shared compiler and linker settings. |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 75 | function(config_setting_shared_compiler_flags tgt) |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 76 | embedded_set_target_compile_flags(TARGET ${tgt} LANGUAGE C FLAGS -xc -std=c99 ${COMMON_COMPILE_FLAGS} -Wall -Werror -Wno-format -Wno-return-type -Wno-unused-but-set-variable) |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 77 | endfunction() |
| 78 | |
| 79 | ##Shared linker settings. |
| 80 | function(config_setting_shared_linker_flags tgt) |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 81 | #--no-wchar-size-warning flag is added because TF-M sources are compiled |
| 82 | #with short wchars, however the standard library is compiled with normal |
| 83 | #wchar, and this generates linker time warnings. TF-M code does not use |
| 84 | #wchar, so the warning can be suppressed. |
Karl Zhang | b3b9d95 | 2018-08-07 21:47:11 +0800 | [diff] [blame] | 85 | embedded_set_target_link_flags(TARGET ${tgt} FLAGS -Xlinker -check-sections -Xlinker -fatal-warnings --entry=Reset_Handler -Wl,--no-wchar-size-warning --specs=nano.specs |
| 86 | -Wl,--print-memory-usage) |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 87 | endfunction() |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 88 | endif() |
| 89 | |
| 90 | #Create a string from the compile flags list, so that it can be used later |
| 91 | #in this file to set mbedtls and BL2 flags |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 92 | list_to_string(COMMON_COMPILE_FLAGS_STR ${COMMON_COMPILE_FLAGS}) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 93 | |
| 94 | #Settings which shall be set for all projects the same way based |
| 95 | # on the variables above. |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 96 | set (TFM_PARTITION_TEST_CORE OFF) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 97 | set (CORE_TEST_POSITIVE OFF) |
| 98 | set (CORE_TEST_INTERACTIVE OFF) |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 99 | set (TFM_PARTITION_TEST_SST OFF) |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 100 | set (TEST_FRAMEWORK_S OFF) |
Miklos Balint | f13ec02 | 2018-04-06 17:21:22 +0200 | [diff] [blame] | 101 | set (REFERENCE_PLATFORM OFF) |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 102 | set (TFM_PARTITION_TEST_SECURE_SERVICES OFF) |
Tamas Ban | d90c81b | 2018-08-15 15:03:42 +0100 | [diff] [blame] | 103 | set (SERVICES_TEST_ENABLED OFF) |
Marc Moreno Berengue | cae2c53 | 2018-10-09 12:58:46 +0100 | [diff] [blame] | 104 | set (TEST_FRAMEWORK_S OFF) |
| 105 | set (TEST_FRAMEWORK_NS OFF) |
Edison Ai | ec109cd | 2018-07-17 16:04:14 +0800 | [diff] [blame] | 106 | set (TFM_PSA_API OFF) |
Miklos Balint | 87da251 | 2018-04-19 13:45:50 +0200 | [diff] [blame] | 107 | set (TFM_LEGACY_API ON) |
Edison Ai | ec109cd | 2018-07-17 16:04:14 +0800 | [diff] [blame] | 108 | set (CORE_TEST_IPC OFF) |
Miklos Balint | f13ec02 | 2018-04-06 17:21:22 +0200 | [diff] [blame] | 109 | |
| 110 | if(${TARGET_PLATFORM} STREQUAL "AN521" OR ${TARGET_PLATFORM} STREQUAL "AN519") |
| 111 | set (REFERENCE_PLATFORM ON) |
| 112 | endif() |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 113 | |
Miklos Balint | 6cbeba6 | 2018-04-12 17:31:34 +0200 | [diff] [blame] | 114 | # Option to demonstrate usage of secure-only peripheral |
| 115 | set (SECURE_UART1 OFF) |
| 116 | |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 117 | if (REGRESSION) |
| 118 | set(SERVICES_TEST_ENABLED ON) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 119 | endif() |
| 120 | |
Edison Ai | ec109cd | 2018-07-17 16:04:14 +0800 | [diff] [blame] | 121 | if (CORE_IPC) |
| 122 | set(TFM_PSA_API ON) |
| 123 | set(CORE_TEST_IPC ON) |
| 124 | endif() |
| 125 | |
Miklos Balint | 87da251 | 2018-04-19 13:45:50 +0200 | [diff] [blame] | 126 | if (TFM_PSA_API) |
| 127 | add_definitions(-DTFM_PSA_API) |
| 128 | endif() |
| 129 | |
| 130 | if (TFM_LEGACY_API) |
| 131 | add_definitions(-DTFM_LEGACY_API) |
| 132 | endif() |
| 133 | |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 134 | if (SERVICES_TEST_ENABLED) |
| 135 | set(SERVICE_TEST_S ON) |
| 136 | set(SERVICE_TEST_NS ON) |
Miklos Balint | f13ec02 | 2018-04-06 17:21:22 +0200 | [diff] [blame] | 137 | if (REFERENCE_PLATFORM) |
| 138 | set(CORE_TEST_POSITIVE ON) |
| 139 | endif() |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 140 | endif() |
| 141 | |
| 142 | if (CORE_TEST) |
| 143 | set(CORE_TEST_POSITIVE ON) |
| 144 | set(CORE_TEST_INTERACTIVE OFF) |
Tamas Ban | 244f08c | 2018-09-20 22:02:30 +0100 | [diff] [blame] | 145 | set (TFM_PARTITION_TEST_SECURE_SERVICES ON) |
| 146 | add_definitions(-DTFM_PARTITION_TEST_SECURE_SERVICES) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 147 | endif() |
| 148 | |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 149 | if (CORE_TEST_INTERACTIVE) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 150 | add_definitions(-DCORE_TEST_INTERACTIVE) |
| 151 | set(TEST_FRAMEWORK_NS ON) |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 152 | set(TFM_PARTITION_TEST_CORE ON) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 153 | endif() |
| 154 | |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 155 | if (CORE_TEST_POSITIVE) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 156 | add_definitions(-DCORE_TEST_POSITIVE) |
| 157 | set(TEST_FRAMEWORK_NS ON) |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 158 | set(TFM_PARTITION_TEST_CORE ON) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 159 | endif() |
| 160 | |
Edison Ai | ec109cd | 2018-07-17 16:04:14 +0800 | [diff] [blame] | 161 | if (CORE_TEST_IPC) |
| 162 | add_definitions(-DCORE_TEST_IPC) |
Edison Ai | 7d6cb3b | 2018-09-19 16:41:50 +0800 | [diff] [blame] | 163 | set(TEST_FRAMEWORK_S ON) |
| 164 | set(TFM_PARTITION_TEST_SECURE_SERVICES ON) |
| 165 | set(TEST_FRAMEWORK_NS ON) |
Edison Ai | ec109cd | 2018-07-17 16:04:14 +0800 | [diff] [blame] | 166 | endif() |
| 167 | |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 168 | if (SERVICE_TEST_S) |
| 169 | add_definitions(-DSERVICES_TEST_S) |
| 170 | set(TEST_FRAMEWORK_S ON) |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 171 | set(TFM_PARTITION_TEST_SECURE_SERVICES ON) |
Tamas Ban | d90c81b | 2018-08-15 15:03:42 +0100 | [diff] [blame] | 172 | set(TFM_PARTITION_TEST_SST ON) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 173 | endif() |
| 174 | |
Edison Ai | 7d6cb3b | 2018-09-19 16:41:50 +0800 | [diff] [blame] | 175 | if (TFM_PARTITION_TEST_SECURE_SERVICES) |
| 176 | add_definitions(-DTFM_PARTITION_TEST_SECURE_SERVICES) |
| 177 | endif() |
| 178 | |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 179 | if (SERVICE_TEST_NS) |
| 180 | add_definitions(-DSERVICES_TEST_NS) |
| 181 | set(TEST_FRAMEWORK_NS ON) |
| 182 | endif() |
| 183 | |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 184 | if (TEST_FRAMEWORK_S) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 185 | add_definitions(-DTEST_FRAMEWORK_S) |
| 186 | endif() |
| 187 | |
Ben Davis | 6d7256b | 2018-04-18 14:16:53 +0100 | [diff] [blame] | 188 | if (TEST_FRAMEWORK_NS) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 189 | add_definitions(-DTEST_FRAMEWORK_NS) |
| 190 | endif() |
| 191 | |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 192 | if (TFM_PARTITION_TEST_CORE) |
| 193 | add_definitions(-DTFM_PARTITION_TEST_CORE) |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 194 | endif() |
| 195 | |
Mate Toth-Pal | 349714a | 2018-02-23 15:30:24 +0100 | [diff] [blame] | 196 | if (TFM_PARTITION_TEST_SST) |
| 197 | add_definitions(-DTFM_PARTITION_TEST_SST) |
Jamie Fox | 5592db0 | 2017-12-18 16:48:29 +0000 | [diff] [blame] | 198 | endif() |
| 199 | |
Marc Moreno Berengue | c2e4db8 | 2018-09-14 16:32:24 +0100 | [diff] [blame] | 200 | # This flag indicates if the non-secure OS is capable of identify the non-secure clients |
| 201 | # which call the secure services |
| 202 | if (NOT DEFINED TFM_NS_CLIENT_IDENTIFICATION) |
| 203 | set (TFM_NS_CLIENT_IDENTIFICATION ON) |
| 204 | endif() |
| 205 | |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 206 | if (BL2) |
| 207 | add_definitions(-DBL2) |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 208 | if (MCUBOOT_NO_SWAP) |
| 209 | set(LINK_TO_BOTH_MEMORY_REGION ON) |
| 210 | endif() |
Oliver Swede | f998244 | 2018-08-24 18:37:44 +0100 | [diff] [blame] | 211 | if (MCUBOOT_NO_SWAP AND MCUBOOT_RAM_LOADING) |
| 212 | message (FATAL_ERROR "Bootloader: MCUBOOT_RAM_LOADING and MCUBOOT_NO_SWAP are not supported together") |
| 213 | endif() |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 214 | else() |
| 215 | if (MCUBOOT_NO_SWAP) |
| 216 | message (FATAL_ERROR "Bootloader build is turned off, not possible to specify bootloader behavior") |
| 217 | endif() |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 218 | endif() |
| 219 | |
Antonio de Angelis | 8908f47 | 2018-08-31 15:44:25 +0100 | [diff] [blame] | 220 | ##Set mbedTLS compiler flags and variables for secure storage, audit log and crypto |
| 221 | set(MBEDTLS_C_FLAGS_SERVICES "-D__ARM_FEATURE_CMSE=3 -D__thumb2__ ${COMMON_COMPILE_FLAGS_STR} -DMBEDTLS_CONFIG_FILE=\\\\\\\"tfm_mbedtls_config.h\\\\\\\" -I${CMAKE_CURRENT_LIST_DIR}/platform/ext/common") |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 222 | |
Marc Moreno Berengue | 6ffb22f | 2018-02-20 13:46:30 +0000 | [diff] [blame] | 223 | #Default TF-M secure storage flags. |
| 224 | #These flags values can be overwritten by setting them in platform/ext/<TARGET_NAME>.cmake |
Marc Moreno Berengue | f6a64f7 | 2018-07-26 17:33:38 +0100 | [diff] [blame] | 225 | #Documentation about these flags can be found in docs/user_guides/services/tfm_sst_integration_guide.md |
Marc Moreno Berengue | 6ffb22f | 2018-02-20 13:46:30 +0000 | [diff] [blame] | 226 | if (NOT DEFINED ENABLE_SECURE_STORAGE) |
| 227 | set (ENABLE_SECURE_STORAGE ON) |
| 228 | |
| 229 | if (NOT DEFINED SST_ENCRYPTION) |
| 230 | set (SST_ENCRYPTION ON) |
| 231 | endif() |
| 232 | |
Marc Moreno Berengue | 184d203 | 2018-08-14 12:51:43 +0100 | [diff] [blame] | 233 | if (NOT DEFINED SST_ROLLBACK_PROTECTION) |
| 234 | set (SST_ROLLBACK_PROTECTION OFF) |
| 235 | endif() |
| 236 | |
Marc Moreno Berengue | 95d6572 | 2018-07-26 17:24:02 +0100 | [diff] [blame] | 237 | if (NOT DEFINED SST_CREATE_FLASH_LAYOUT) |
| 238 | set (SST_CREATE_FLASH_LAYOUT OFF) |
Marc Moreno Berengue | 6ffb22f | 2018-02-20 13:46:30 +0000 | [diff] [blame] | 239 | endif() |
| 240 | |
| 241 | if (NOT DEFINED SST_VALIDATE_METADATA_FROM_FLASH) |
| 242 | set (SST_VALIDATE_METADATA_FROM_FLASH ON) |
| 243 | endif() |
Ben Davis | 38902c8 | 2018-05-01 15:36:31 +0100 | [diff] [blame] | 244 | |
| 245 | if (NOT DEFINED SST_ENABLE_PARTIAL_ASSET_RW) |
| 246 | set (SST_ENABLE_PARTIAL_ASSET_RW ON) |
| 247 | endif() |
Marc Moreno Berengue | 02a2344 | 2018-08-15 14:28:45 +0100 | [diff] [blame] | 248 | |
| 249 | if (NOT DEFINED SST_RAM_FS) |
| 250 | if (REGRESSION) |
| 251 | set (SST_RAM_FS ON) |
| 252 | else() |
| 253 | set (SST_RAM_FS OFF) |
| 254 | endif() |
| 255 | endif() |
Marc Moreno Berengue | 792fc68 | 2018-02-20 11:53:30 +0000 | [diff] [blame] | 256 | endif() |
Marc Moreno Berengue | 6ffb22f | 2018-02-20 13:46:30 +0000 | [diff] [blame] | 257 | |
| 258 | if (NOT DEFINED MBEDTLS_DEBUG) |
Jamie Fox | 287885f | 2018-10-24 14:09:34 +0100 | [diff] [blame] | 259 | set(MBEDTLS_DEBUG OFF) |
Marc Moreno Berengue | 6ffb22f | 2018-02-20 13:46:30 +0000 | [diff] [blame] | 260 | endif() |
Mate Toth-Pal | 65c935e | 2018-01-17 18:42:13 +0100 | [diff] [blame] | 261 | |
Tamas Ban | db69d52 | 2018-03-01 10:04:41 +0000 | [diff] [blame] | 262 | ##Set mbedTLS compiler flags for BL2 bootloader |
Mate Toth-Pal | 7686726 | 2018-03-09 13:15:36 +0100 | [diff] [blame] | 263 | set(MBEDTLS_C_FLAGS_BL2 "-D__ARM_FEATURE_CMSE=3 -D__thumb2__ ${COMMON_COMPILE_FLAGS_STR} -DMBEDTLS_CONFIG_FILE=\\\\\\\"config-boot.h\\\\\\\" -I${CMAKE_CURRENT_LIST_DIR}/bl2/ext/mcuboot/include") |