Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
David Hu | 52c65f0 | 2020-01-10 11:19:19 +0800 | [diff] [blame] | 2 | # Copyright (c) 2018-2020, Arm Limited. All rights reserved. |
Alamy Liu | d33851f | 2019-11-21 13:17:58 -0800 | [diff] [blame] | 3 | # Copyright (c) 2019-2020, Cypress Semiconductor Corporation. All rights reserved. |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | #------------------------------------------------------------------------------- |
| 8 | |
| 9 | #This file gathers all Cypress PSoC 6 specific files in the application. |
| 10 | |
| 11 | include("Common/MultiCore") |
| 12 | |
| 13 | # Select configuration of multi-core topology |
| 14 | enable_multi_core_topology_config() |
| 15 | |
David Hu | 08d5572 | 2019-11-28 17:50:53 +0800 | [diff] [blame] | 16 | # Enable multiple outstanding NS PSA Client calls |
| 17 | enable_multi_core_multi_client_call() |
| 18 | |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 19 | set(TFM_NS_CLIENT_IDENTIFICATION OFF) |
| 20 | |
| 21 | add_definitions(-DCYB0644ABZI_S2D44=1) |
| 22 | |
| 23 | add_definitions(-DTFM_CORE_DEBUG) |
| 24 | |
| 25 | # psoc64 platform doesn't yet use TF-M BL2 |
| 26 | set(BL2 False) |
| 27 | remove_definitions(-DBL2) |
| 28 | |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 29 | # Skip peripheral access test |
| 30 | set(TFM_ENABLE_PERIPH_ACCESS_TEST OFF) |
David Hu | 7014bf4 | 2019-11-15 20:44:58 +0800 | [diff] [blame] | 31 | if (REGRESSION) |
| 32 | # Enable multi-core specific test cases |
| 33 | set(TFM_MULTI_CORE_TEST ON) |
| 34 | endif() |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 35 | |
| 36 | # Set Cortex-M0plus as secure core |
| 37 | set_secure_cpu_type("CpuM0p") |
| 38 | # Set Cortex-M4 as non-secure core |
| 39 | set_ns_cpu_type("CpuM4") |
| 40 | |
| 41 | # Set PSoC62 specific secure definitions |
| 42 | add_platform_secure_definitions(CY_PSOC6_CM0P=1) |
| 43 | |
| 44 | set(PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR}) |
| 45 | |
| 46 | #Specify the location of platform specific build dependencies. |
| 47 | if(COMPILER STREQUAL "ARMCLANG") |
| 48 | set (S_SCATTER_FILE_NAME "${PLATFORM_DIR}/common/armclang/tfm_common_s.sct") |
| 49 | set (NS_SCATTER_FILE_NAME "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/armclang/psoc6_ns.sct") |
| 50 | if (DEFINED CMSIS_5_DIR) |
| 51 | # not all project defines CMSIS_5_DIR, only the ones that use it. |
| 52 | set (RTX_LIB_PATH "${CMSIS_5_DIR}/CMSIS/RTOS2/RTX/Library/ARM/RTX_CM4F.lib") |
| 53 | endif() |
| 54 | elseif(COMPILER STREQUAL "GNUARM") |
| 55 | set (S_SCATTER_FILE_NAME "${PLATFORM_DIR}/common/gcc/tfm_common_s.ld") |
| 56 | set (NS_SCATTER_FILE_NAME "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/gcc/psoc6_ns.ld") |
| 57 | if (DEFINED CMSIS_5_DIR) |
| 58 | # not all project defines CMSIS_5_DIR, only the ones that use it. |
| 59 | # [libRTX_CM3.a should be used for CM4 without FPU] |
| 60 | set (RTX_LIB_PATH "${CMSIS_5_DIR}/CMSIS/RTOS2/RTX/Library/GCC/libRTX_CM3.a") |
| 61 | endif() |
TTornblom | e3ef1fd | 2020-01-23 16:50:19 +0100 | [diff] [blame] | 62 | elseif(COMPILER STREQUAL "IARARM") |
| 63 | set (S_SCATTER_FILE_NAME "${PLATFORM_DIR}/common/iar/tfm_common_s.icf") |
| 64 | set (NS_SCATTER_FILE_NAME "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/iar/psoc6_ns.icf") |
| 65 | if (DEFINED CMSIS_5_DIR) |
| 66 | # not all project defines CMSIS_5_DIR, only the ones that use it. |
| 67 | # [RTX_CM3.a should be used for CM4 without FPU] |
| 68 | set (RTX_LIB_PATH "${CMSIS_5_DIR}/CMSIS/RTOS2/RTX/Library/IAR/RTX_CM3.a") |
| 69 | endif() |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 70 | else() |
| 71 | message(FATAL_ERROR "No startup file is available for compiler '${CMAKE_C_COMPILER_ID}'.") |
| 72 | endif() |
| 73 | set (FLASH_LAYOUT "${PLATFORM_DIR}/target/cypress/psoc64/partition/flash_layout.h") |
| 74 | set (PLATFORM_LINK_INCLUDES "${PLATFORM_DIR}/target/cypress/psoc64/partition") |
| 75 | |
| 76 | embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE) |
| 77 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64" ABSOLUTE) |
| 78 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/CMSIS_Driver/Config" ABSOLUTE) |
| 79 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/Device/Config" ABSOLUTE) |
| 80 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/Device/Include" ABSOLUTE) |
| 81 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/include" ABSOLUTE) |
| 82 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source" ABSOLUTE) |
| 83 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/mailbox" ABSOLUTE) |
| 84 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/partition" ABSOLUTE) |
| 85 | embedded_include_directories(PATH "${TFM_ROOT_DIR}/interface/include" ABSOLUTE) |
| 86 | embedded_include_directories(PATH "${TFM_ROOT_DIR}/platform/include" ABSOLUTE) |
| 87 | embedded_include_directories(PATH "${TFM_ROOT_DIR}/secure_fw/core/arch/include" ABSOLUTE) |
| 88 | embedded_include_directories(PATH "${TFM_ROOT_DIR}/secure_fw/core/ipc/include" ABSOLUTE) |
| 89 | |
| 90 | #Gather all source files we need. |
| 91 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/mailbox/platform_multicore.c") |
| 92 | list(APPEND ALL_SRC_C_NS "${PLATFORM_DIR}/target/cypress/psoc64/mailbox/platform_ns_mailbox.c") |
| 93 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/mailbox/mailbox_ipc_intr.c") |
| 94 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/mailbox/platform_spe_mailbox.c") |
| 95 | |
| 96 | install(FILES ${PLATFORM_DIR}/target/cypress/psoc64/mailbox/ns_ipc_config.h |
| 97 | ${PLATFORM_DIR}/target/cypress/psoc64/mailbox/platform_multicore.h |
David Hu | 52c65f0 | 2020-01-10 11:19:19 +0800 | [diff] [blame] | 98 | DESTINATION export/tfm/include) |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 99 | |
| 100 | install(FILES ${PLATFORM_DIR}/target/cypress/psoc64/mailbox/platform_multicore.c |
| 101 | ${PLATFORM_DIR}/target/cypress/psoc64/mailbox/platform_ns_mailbox.c |
| 102 | DESTINATION export/tfm/src) |
| 103 | |
| 104 | if (NOT DEFINED BUILD_CMSIS_CORE) |
| 105 | message(FATAL_ERROR "Configuration variable BUILD_CMSIS_CORE (true|false) is undefined!") |
| 106 | elseif(BUILD_CMSIS_CORE) |
| 107 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/system_psoc6_cm0plus.c") |
| 108 | list(APPEND ALL_SRC_C_NS "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/system_psoc6_cm4.c") |
| 109 | endif() |
| 110 | |
| 111 | if (NOT DEFINED BUILD_RETARGET) |
| 112 | message(FATAL_ERROR "Configuration variable BUILD_RETARGET (true|false) is undefined!") |
| 113 | elseif(BUILD_RETARGET) |
| 114 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/device_definition.c") |
| 115 | endif() |
| 116 | |
| 117 | if (NOT DEFINED BUILD_UART_STDOUT) |
| 118 | message(FATAL_ERROR "Configuration variable BUILD_UART_STDOUT (true|false) is undefined!") |
| 119 | elseif(BUILD_UART_STDOUT) |
| 120 | if (NOT DEFINED SECURE_UART1) |
| 121 | message(FATAL_ERROR "Configuration variable SECURE_UART1 (true|false) is undefined!") |
| 122 | elseif(SECURE_UART1) |
| 123 | message(FATAL_ERROR "Configuration SECURE_UART1 TRUE is invalid for this target!") |
| 124 | endif() |
| 125 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/uart_stdout.c") |
| 126 | embedded_include_directories(PATH "${PLATFORM_DIR}/common" ABSOLUTE) |
| 127 | set(BUILD_NATIVE_DRIVERS true) |
| 128 | set(BUILD_CMSIS_DRIVERS true) |
| 129 | endif() |
| 130 | |
| 131 | if (NOT DEFINED BUILD_NATIVE_DRIVERS) |
| 132 | message(FATAL_ERROR "Configuration variable BUILD_NATIVE_DRIVERS (true|false) is undefined!") |
| 133 | elseif(BUILD_NATIVE_DRIVERS) |
| 134 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_device.c") |
| 135 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_flash.c") |
| 136 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_gpio.c") |
| 137 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_prot.c") |
| 138 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_ipc_drv.c") |
| 139 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_ipc_pipe.c") |
| 140 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_ipc_sema.c") |
| 141 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_scb_common.c") |
| 142 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_scb_uart.c") |
| 143 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_sysclk.c") |
| 144 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_sysint.c") |
| 145 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_syslib.c") |
| 146 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_syspm.c") |
| 147 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_systick.c") |
Alamy Liu | d33851f | 2019-11-21 13:17:58 -0800 | [diff] [blame] | 148 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_tcpwm_counter.c") |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 149 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_trigmux.c") |
| 150 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/source/cy_wdt.c") |
| 151 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg.c") |
| 152 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg_clocks.c") |
| 153 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg_clocks.c") |
| 154 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg_peripherals.c") |
| 155 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg_pins.c") |
| 156 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg_routing.c") |
| 157 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/Native_Driver/generated_source/cycfg_system.c") |
| 158 | if(CMAKE_C_COMPILER_ID STREQUAL "ARMCLANG") |
| 159 | list(APPEND ALL_SRC_ASM "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/armclang/cy_syslib_mdk.s") |
| 160 | elseif(CMAKE_C_COMPILER_ID STREQUAL "GNUARM") |
| 161 | list(APPEND ALL_SRC_ASM "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/gcc/cy_syslib_gcc.S") |
TTornblom | e3ef1fd | 2020-01-23 16:50:19 +0100 | [diff] [blame] | 162 | elseif(CMAKE_C_COMPILER_ID STREQUAL "IARARM") |
| 163 | list(APPEND ALL_SRC_ASM "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/iar/cy_syslib_iar.c") |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 164 | else() |
| 165 | message(FATAL_ERROR "No cy_syslib is available for compiler '${CMAKE_C_COMPILER_ID}'.") |
| 166 | endif() |
| 167 | endif() |
| 168 | |
| 169 | if (NOT DEFINED BUILD_TIME) |
| 170 | message(FATAL_ERROR "Configuration variable BUILD_TIME (true|false) is undefined!") |
| 171 | elseif(BUILD_TIME) |
| 172 | endif() |
| 173 | |
| 174 | if (NOT DEFINED BUILD_STARTUP) |
| 175 | message(FATAL_ERROR "Configuration variable BUILD_STARTUP (true|false) is undefined!") |
| 176 | elseif(BUILD_STARTUP) |
| 177 | if(CMAKE_C_COMPILER_ID STREQUAL "ARMCLANG") |
| 178 | list(APPEND ALL_SRC_ASM_S "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/armclang/startup_psoc64_s.s") |
| 179 | list(APPEND ALL_SRC_ASM_NS "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/armclang/startup_psoc64_ns.s") |
| 180 | elseif(CMAKE_C_COMPILER_ID STREQUAL "GNUARM") |
| 181 | list(APPEND ALL_SRC_ASM_S "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/gcc/startup_psoc64_s.S") |
| 182 | list(APPEND ALL_SRC_ASM_NS "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/gcc/startup_psoc64_ns.S") |
| 183 | set_property(SOURCE "${ALL_SRC_ASM_S}" "${ALL_SRC_ASM_NS}" APPEND |
| 184 | PROPERTY COMPILE_DEFINITIONS "__STARTUP_CLEAR_BSS_MULTIPLE" "__STARTUP_COPY_MULTIPLE") |
TTornblom | e3ef1fd | 2020-01-23 16:50:19 +0100 | [diff] [blame] | 185 | elseif(CMAKE_C_COMPILER_ID STREQUAL "IARARM") |
| 186 | list(APPEND ALL_SRC_ASM_S "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/iar/startup_psoc64_s.s") |
| 187 | list(APPEND ALL_SRC_ASM_NS "${PLATFORM_DIR}/target/cypress/psoc64/Device/Source/iar/startup_psoc64_ns.s") |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 188 | else() |
| 189 | message(FATAL_ERROR "No startup file is available for compiler '${CMAKE_C_COMPILER_ID}'.") |
| 190 | endif() |
| 191 | endif() |
| 192 | |
Balint Matyi | 95f58eb | 2020-05-22 08:52:32 +0100 | [diff] [blame] | 193 | #Enable the checks of attestation claims against hard-coded values. |
| 194 | set(ATTEST_CLAIM_VALUE_CHECK ON) |
| 195 | |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 196 | if (NOT DEFINED BUILD_TARGET_CFG) |
| 197 | message(FATAL_ERROR "Configuration variable BUILD_TARGET_CFG (true|false) is undefined!") |
| 198 | elseif(BUILD_TARGET_CFG) |
| 199 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/target_cfg.c") |
| 200 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/spm_hal.c") |
| 201 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/attest_hal.c") |
| 202 | if (TFM_PARTITION_PLATFORM) |
| 203 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/services/src/tfm_platform_system.c") |
| 204 | endif() |
| 205 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/tfm_platform.c") |
| 206 | embedded_include_directories(PATH "${PLATFORM_DIR}/common" ABSOLUTE) |
| 207 | endif() |
| 208 | |
Alamy Liu | cc419f9 | 2019-11-21 15:55:33 -0800 | [diff] [blame] | 209 | if (NOT DEFINED BUILD_PLAT_TEST) |
| 210 | message(FATAL_ERROR "Configuration variable BUILD_PLAT_TEST (true|false) is undefined!") |
| 211 | elseif(BUILD_PLAT_TEST) |
| 212 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/plat_test.c") |
| 213 | endif() |
| 214 | |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 215 | if (NOT DEFINED BUILD_TARGET_HARDWARE_KEYS) |
| 216 | message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!") |
| 217 | elseif(BUILD_TARGET_HARDWARE_KEYS) |
David Hu | b3d2d62 | 2019-12-06 10:24:44 +0800 | [diff] [blame] | 218 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c") |
David Hu | 086ffe3 | 2019-12-06 10:36:56 +0800 | [diff] [blame] | 219 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/template/tfm_rotpk.c") |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 220 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/dummy_crypto_keys.c") |
| 221 | endif() |
| 222 | |
| 223 | if (NOT DEFINED BUILD_TARGET_NV_COUNTERS) |
| 224 | message(FATAL_ERROR "Configuration variable BUILD_TARGET_NV_COUNTERS (true|false) is undefined!") |
| 225 | elseif(BUILD_TARGET_NV_COUNTERS) |
Chris Brand | cfc5114 | 2020-03-23 14:02:28 -0700 | [diff] [blame] | 226 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/nv_counters.c") |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 227 | set(TARGET_NV_COUNTERS_ENABLE ON) |
Kevin Peng | c6d7450 | 2020-03-04 16:55:37 +0800 | [diff] [blame] | 228 | # Sets PS_ROLLBACK_PROTECTION flag to compile in the PS services |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 229 | # rollback protection code as the target supports nv counters. |
Kevin Peng | c6d7450 | 2020-03-04 16:55:37 +0800 | [diff] [blame] | 230 | set (PS_ROLLBACK_PROTECTION ON) |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 231 | endif() |
| 232 | |
| 233 | if (NOT DEFINED BUILD_CMSIS_DRIVERS) |
| 234 | message(FATAL_ERROR "Configuration variable BUILD_CMSIS_DRIVERS (true|false) is undefined!") |
| 235 | elseif(BUILD_CMSIS_DRIVERS) |
| 236 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/driver_smpu.c") |
| 237 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/driver_ppu.c") |
Andrei Narkevitch | 995bb45 | 2020-01-15 13:58:47 -0800 | [diff] [blame] | 238 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/driver_dap.c") |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 239 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/CMSIS_Driver/Driver_USART.c") |
| 240 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/CMSIS_Driver" ABSOLUTE) |
| 241 | embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE) |
| 242 | endif() |
| 243 | |
| 244 | if (NOT DEFINED BUILD_FLASH) |
| 245 | message(FATAL_ERROR "Configuration variable BUILD_FLASH (true|false) is undefined!") |
| 246 | elseif(BUILD_FLASH) |
| 247 | list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/cypress/psoc64/CMSIS_Driver/Driver_Flash.c") |
Kevin Peng | c6d7450 | 2020-03-04 16:55:37 +0800 | [diff] [blame] | 248 | # As the PS area is going to be in RAM, it is required to set PS_CREATE_FLASH_LAYOUT |
| 249 | # to be sure the PS service knows that when it starts the PS area does not contain any |
| 250 | # valid PS flash layout and it needs to create one. |
| 251 | set(PS_CREATE_FLASH_LAYOUT ON) |
Chris Brand | b42fed5 | 2019-12-02 16:10:17 -0800 | [diff] [blame] | 252 | set(ITS_CREATE_FLASH_LAYOUT ON) |
| 253 | embedded_include_directories(PATH "${PLATFORM_DIR}/target/cypress/psoc64/CMSIS_Driver" ABSOLUTE) |
| 254 | embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE) |
| 255 | endif() |
| 256 | |
| 257 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/dummy_boot_seed.c") |
| 258 | list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/target/cypress/psoc64/dummy_device_id.c") |