diff options
author | Raef Coles <raef.coles@arm.com> | 2020-09-16 13:55:05 +0100 |
---|---|---|
committer | Tamas Ban <tamas.ban@arm.com> | 2020-09-24 12:49:54 +0000 |
commit | 51ab6885daed1e3c2e1564a6bcc2bb7ba890391c (patch) | |
tree | e9dfca11a1e9a670b1371d47730a202672bc3cac | |
parent | d5f943b1f0ddd022b6d1005a6fa2df54aa06d366 (diff) | |
download | trusted-firmware-m-51ab6885daed1e3c2e1564a6bcc2bb7ba890391c.tar.gz |
Build: Convert mps3/an524 target to modern cmake
Add cmake files to an539 target directory. Alter scatter files to
remove preprocessor shebang. Alter header files where include paths have
changed.
WARNING: This change will not build in isolation, it requires _all_
other cmake changes to successfully build. It is split out only for ease
of understanding.
Change-Id: I386315c03e04e98e113f6b303013992cb1cf3512
Signed-off-by: Raef Coles <raef.coles@arm.com>
-rw-r--r-- | platform/ext/Mps3AN524.cmake | 224 | ||||
-rw-r--r-- | platform/ext/target/mps3/an524/CMakeLists.txt | 159 | ||||
-rw-r--r-- | platform/ext/target/mps3/an524/config.cmake | 13 | ||||
-rw-r--r-- | platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_bl2.sct | 2 | ||||
-rw-r--r-- | platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_ns.sct | 2 | ||||
-rw-r--r-- | platform/ext/target/mps3/an524/preload.cmake | 19 |
6 files changed, 191 insertions, 228 deletions
diff --git a/platform/ext/Mps3AN524.cmake b/platform/ext/Mps3AN524.cmake deleted file mode 100644 index 557c19de6b..0000000000 --- a/platform/ext/Mps3AN524.cmake +++ /dev/null @@ -1,224 +0,0 @@ -#------------------------------------------------------------------------------- -# Copyright (c) 2019-2020, Arm Limited. All rights reserved. -# Copyright (c) 2020, Cypress Semiconductor Corporation. All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause -# -#------------------------------------------------------------------------------- - -#This file gathers all MPS3/AN524 specific files in the application. - -#MPS3/AN524 has a Cortex-M33 CPU. -include("Common/CpuM33") - -#Remap option for MPS3, default is BRAM -set(REMAP_QSPI True) -if (REMAP_QSPI) - add_definitions(-DREMAP_QSPI) -endif() - -set(PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR}) - -set(AN524_DIR ${PLATFORM_DIR}/target/mps3/an524) - -#Specify the location of platform specific build dependencies. -if(COMPILER STREQUAL "ARMCLANG") - set (BL2_SCATTER_FILE_NAME "${AN524_DIR}/device/source/armclang/mps3_an524_bl2.sct") - set (S_SCATTER_FILE_NAME "${PLATFORM_DIR}/common/armclang/tfm_common_s.sct") - set (NS_SCATTER_FILE_NAME "${AN524_DIR}/device/source/armclang/mps3_an524_ns.sct") - if (DEFINED CMSIS_DIR) - # not all project defines CMSIS_DIR, only the ones that use it. - set (RTX_LIB_PATH "${CMSIS_DIR}/RTOS2/RTX/Library/ARM/RTX_V8MMN.lib") - endif() -elseif(COMPILER STREQUAL "GNUARM") - set (BL2_SCATTER_FILE_NAME "${AN524_DIR}/device/source/gcc/mps3_an524_bl2.ld") - set (S_SCATTER_FILE_NAME "${PLATFORM_DIR}/common/gcc/tfm_common_s.ld") - set (NS_SCATTER_FILE_NAME "${AN524_DIR}/device/source/gcc/mps3_an524_ns.ld") - if (DEFINED CMSIS_DIR) - # Not all projects define CMSIS_DIR, only the ones that use it. - set(RTX_LIB_PATH "${CMSIS_DIR}/RTOS2/RTX/Library/GCC/libRTX_V8MMN.a") - endif() -elseif(COMPILER STREQUAL "IARARM") - set (BL2_SCATTER_FILE_NAME "${AN524_DIR}/device/source/iar/mps3_an524_bl2.icf") - set (S_SCATTER_FILE_NAME "${PLATFORM_DIR}/common/iar/tfm_common_s.icf") - set (NS_SCATTER_FILE_NAME "${AN524_DIR}/device/source/iar/mps3_an524_ns.icf") - if (DEFINED CMSIS_DIR) - # not all project defines CMSIS_DIR, only the ones that use it. - set (RTX_LIB_PATH "${CMSIS_DIR}/RTOS2/RTX/Library/IAR/RTX_V8MMN.a") - endif() -else() - message(FATAL_ERROR "No startup file is available for compiler '${CMAKE_C_COMPILER_ID}'.") -endif() -set (FLASH_LAYOUT "${AN524_DIR}/partition/flash_layout.h") -set (PLATFORM_LINK_INCLUDES "${AN524_DIR}/partition/") - -if (BL2) - set (BL2_LINKER_CONFIG ${BL2_SCATTER_FILE_NAME}) - if (NOT ${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "NO_SWAP") - message(WARNING "NO_SWAP upgrade strategy is mandatory on target '${TARGET_PLATFORM}'. Your choice was overriden.") - mcuboot_override_upgrade_strategy("NO_SWAP") - endif() - - #FixMe: MCUBOOT_SIGN_RSA_LEN can be removed when ROTPK won't be hard coded in platform/ext/common/template/tfm_rotpk.c - # instead independently loaded from secure code as a blob. - if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-2048") - add_definitions(-DMCUBOOT_SIGN_RSA_LEN=2048) - endif() - if (${MCUBOOT_SIGNATURE_TYPE} STREQUAL "RSA-3072") - add_definitions(-DMCUBOOT_SIGN_RSA_LEN=3072) - endif() -endif() - -embedded_include_directories(PATH "${PLATFORM_DIR}/cmsis" ABSOLUTE) -embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps3/common" ABSOLUTE) -embedded_include_directories(PATH "${PLATFORM_DIR}/../include" ABSOLUTE) -embedded_include_directories(PATH "${AN524_DIR}" ABSOLUTE) -embedded_include_directories(PATH "${AN524_DIR}/partition" ABSOLUTE) -embedded_include_directories(PATH "${AN524_DIR}/device/include" ABSOLUTE) -embedded_include_directories(PATH "${AN524_DIR}/device/config" ABSOLUTE) -embedded_include_directories(PATH "${AN524_DIR}/cmsis_drivers/config" ABSOLUTE) -embedded_include_directories(PATH "${AN524_DIR}/native_drivers" ABSOLUTE) - -#Gather all source files we need. -if (NOT DEFINED BUILD_CMSIS_CORE) - message(FATAL_ERROR "Configuration variable BUILD_CMSIS_CORE (true|false) is undefined!") -elseif(BUILD_CMSIS_CORE) - list(APPEND ALL_SRC_C "${AN524_DIR}/device/source/system_core_init.c") -endif() - -if (NOT DEFINED BUILD_RETARGET) - message(FATAL_ERROR "Configuration variable BUILD_RETARGET (true|false) is undefined!") -elseif(BUILD_RETARGET) - list(APPEND ALL_SRC_C "${AN524_DIR}/device/source/device_definition.c") -endif() - -if (NOT DEFINED BUILD_UART_STDOUT) - message(FATAL_ERROR "Configuration variable BUILD_UART_STDOUT (true|false) is undefined!") -elseif(BUILD_UART_STDOUT) - if (NOT DEFINED SECURE_UART1) - message(FATAL_ERROR "Configuration variable SECURE_UART1 (true|false) is undefined!") - elseif(SECURE_UART1) - message(FATAL_ERROR "Configuration SECURE_UART1 TRUE is invalid for this target!") - endif() - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/uart_stdout.c") - embedded_include_directories(PATH "${PLATFORM_DIR}/common" ABSOLUTE) - set(BUILD_NATIVE_DRIVERS true) - set(BUILD_CMSIS_DRIVERS true) -endif() - -if (NOT DEFINED BUILD_NATIVE_DRIVERS) - message(FATAL_ERROR "Configuration variable BUILD_NATIVE_DRIVERS (true|false) is undefined!") -elseif(BUILD_NATIVE_DRIVERS) - list(APPEND ALL_SRC_C "${AN524_DIR}/native_drivers/uart_cmsdk_drv.c") - - list(APPEND ALL_SRC_C_S "${AN524_DIR}/native_drivers/mpc_sie200_drv.c" - "${AN524_DIR}/native_drivers/ppc_sse200_drv.c") -endif() - -if (NOT DEFINED BUILD_TIME) - message(FATAL_ERROR "Configuration variable BUILD_TIME (true|false) is undefined!") -elseif(BUILD_TIME) - list(APPEND ALL_SRC_C "${AN524_DIR}/native_drivers/timer_cmsdk_drv.c") -endif() - -if (NOT DEFINED BUILD_STARTUP) - message(FATAL_ERROR "Configuration variable BUILD_STARTUP (true|false) is undefined!") -elseif(BUILD_STARTUP) - if(CMAKE_C_COMPILER_ID STREQUAL "ARMCLANG") - list(APPEND ALL_SRC_ASM_S "${AN524_DIR}/device/source/armclang/startup_cmsdk_mps3_an524_s.s") - list(APPEND ALL_SRC_ASM_NS "${AN524_DIR}/device/source/armclang/startup_cmsdk_mps3_an524_ns.s") - list(APPEND ALL_SRC_ASM_BL2 "${AN524_DIR}/device/source/armclang/startup_cmsdk_mps3_an524_bl2.s") - elseif(CMAKE_C_COMPILER_ID STREQUAL "GNUARM") - list(APPEND ALL_SRC_ASM_S "${AN524_DIR}/device/source/gcc/startup_cmsdk_mps3_an524_s.S") - list(APPEND ALL_SRC_ASM_NS "${AN524_DIR}/device/source/gcc/startup_cmsdk_mps3_an524_ns.S") - list(APPEND ALL_SRC_ASM_BL2 "${AN524_DIR}/device/source/gcc/startup_cmsdk_mps3_an524_bl2.S") - set_property(SOURCE "${ALL_SRC_ASM_S}" "${ALL_SRC_ASM_NS}" "${ALL_SRC_ASM_BL2}" APPEND - PROPERTY COMPILE_DEFINITIONS "__STARTUP_CLEAR_BSS_MULTIPLE" "__STARTUP_COPY_MULTIPLE") - elseif(CMAKE_C_COMPILER_ID STREQUAL "IARARM") - list(APPEND ALL_SRC_ASM_S "${AN524_DIR}/device/source/iar/startup_cmsdk_mps3_an524_s.s") - list(APPEND ALL_SRC_ASM_NS "${AN524_DIR}/device/source/iar/startup_cmsdk_mps3_an524_ns.s") - list(APPEND ALL_SRC_ASM_BL2 "${AN524_DIR}/device/source/iar/startup_cmsdk_mps3_an524_bl2.s") - else() - message(FATAL_ERROR "No startup file is available for compiler '${CMAKE_C_COMPILER_ID}'.") - endif() -endif() - -#Enable the checks of attestation claims against hard-coded values. -set(ATTEST_CLAIM_VALUE_CHECK ON) - -if (NOT DEFINED BUILD_TARGET_CFG) - message(FATAL_ERROR "Configuration variable BUILD_TARGET_CFG (true|false) is undefined!") -elseif(BUILD_TARGET_CFG) - list(APPEND ALL_SRC_C "${AN524_DIR}/target_cfg.c") - list(APPEND ALL_SRC_C_S "${AN524_DIR}/spm_hal.c") - list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/template/attest_hal.c") - list(APPEND ALL_SRC_C_S "${AN524_DIR}/native_drivers/mpu_armv8m_drv.c") - list(APPEND ALL_SRC_C_S "${AN524_DIR}/services/src/tfm_platform_system.c") - list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/tfm_hal_its.c") - list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/tfm_hal_ps.c") - list(APPEND ALL_SRC_C_S "${PLATFORM_DIR}/common/tfm_platform.c") - embedded_include_directories(PATH "${PLATFORM_DIR}/common" ABSOLUTE) -endif() - -if (NOT DEFINED BUILD_PLAT_TEST) - message(FATAL_ERROR "Configuration variable BUILD_PLAT_TEST (true|false) is undefined!") -elseif(BUILD_PLAT_TEST) - list(APPEND ALL_SRC_C "${AN524_DIR}/plat_test.c") -endif() - -if (NOT DEFINED BUILD_BOOT_HAL) - message(FATAL_ERROR "Configuration variable BUILD_BOOT_HAL (true|false) is undefined!") -elseif(BUILD_BOOT_HAL) - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/boot_hal.c") - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/target/mps3/an524/boot_hal.c") -endif() - -if (NOT DEFINED BUILD_TARGET_HARDWARE_KEYS) - message(FATAL_ERROR "Configuration variable BUILD_TARGET_HARDWARE_KEYS (true|false) is undefined!") -elseif(BUILD_TARGET_HARDWARE_KEYS) - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_initial_attestation_key_material.c") - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/tfm_rotpk.c") - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/crypto_keys.c") -endif() - -if (NOT DEFINED BUILD_TARGET_NV_COUNTERS) - message(FATAL_ERROR "Configuration variable BUILD_TARGET_NV_COUNTERS (true|false) is undefined!") -elseif (BUILD_TARGET_NV_COUNTERS) - # NOTE: This non-volatile counters implementation is a dummy - # implementation. Platform vendors have to implement the - # API ONLY if the target has non-volatile counters. - list(APPEND ALL_SRC_C "${PLATFORM_DIR}/common/template/nv_counters.c") - set(TARGET_NV_COUNTERS_ENABLE ON) - # Sets PS_ROLLBACK_PROTECTION flag to compile in the PS services - # rollback protection code as the target supports nv counters. - set(PS_ROLLBACK_PROTECTION ON) -endif() - -if (NOT DEFINED BUILD_CMSIS_DRIVERS) - message(FATAL_ERROR "Configuration variable BUILD_CMSIS_DRIVERS (true|false) is undefined!") -elseif(BUILD_CMSIS_DRIVERS) - list(APPEND ALL_SRC_C_S "${AN524_DIR}/cmsis_drivers/Driver_MPC.c" - "${AN524_DIR}/cmsis_drivers/Driver_PPC.c") - list(APPEND ALL_SRC_C "${AN524_DIR}/cmsis_drivers/Driver_USART.c") - embedded_include_directories(PATH "${AN524_DIR}/cmsis_drivers" ABSOLUTE) - embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE) -endif() - -if (NOT DEFINED BUILD_FLASH) - message(FATAL_ERROR "Configuration variable BUILD_FLASH (true|false) is undefined!") -elseif(BUILD_FLASH) - list(APPEND ALL_SRC_C "${AN524_DIR}/cmsis_drivers/Driver_Flash.c") - # For AN524 currently BRAM is used for PS The Driver_Flash driver just emulates a flash - # interface and behaviour on top of the BRAM memory. - # As the PS area is going to be in RAM, it is required to set PS_CREATE_FLASH_LAYOUT - # to be sure the PS service knows that when it starts the PS area does not contain any - # valid PS flash layout and it needs to create one. The same for ITS. - set(PS_CREATE_FLASH_LAYOUT ON) - set(ITS_CREATE_FLASH_LAYOUT ON) - embedded_include_directories(PATH "${AN524_DIR}/cmsis_drivers" ABSOLUTE) - embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE) -endif() - -if (MCUBOOT_RAM_LOADING) - message (FATAL_ERROR "MCUBOOT_RAM_LOADING is not supported on " ${TARGET_PLATFORM}) -endif() diff --git a/platform/ext/target/mps3/an524/CMakeLists.txt b/platform/ext/target/mps3/an524/CMakeLists.txt new file mode 100644 index 0000000000..d24e29d1cf --- /dev/null +++ b/platform/ext/target/mps3/an524/CMakeLists.txt @@ -0,0 +1,159 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2020, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +#------------------------------------------------------------------------------- + +cmake_policy(SET CMP0076 NEW) +set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}) + +#========================= Platform region defs ===============================# + +target_include_directories(platform_region_defs + INTERFACE + partition +) + +#========================= Platform common defs ===============================# + +# Specify the location of platform specific build dependencies. +target_sources(tfm_s + PRIVATE + $<$<C_COMPILER_ID:ARMClang>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/armclang/startup_cmsdk_mps3_an524_s.s> + $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/gcc/startup_cmsdk_mps3_an524_s.S> + $<$<C_COMPILER_ID:IAR>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/iar/startup_cmsdk_mps3_an524_s.s> +) +target_add_scatter_file(tfm_s + $<$<C_COMPILER_ID:ARMClang>:${CMAKE_BINARY_DIR}/generated/platform/ext/common/armclang/tfm_common_s.sct> + $<$<C_COMPILER_ID:GNU>:${CMAKE_BINARY_DIR}/generated/platform/ext/common/gcc/tfm_common_s.ld> + $<$<C_COMPILER_ID:IAR>:${CMAKE_BINARY_DIR}/generated/platform/ext/common/iar/tfm_common_s.icf> +) + +if(NS) + target_sources(tfm_ns + PRIVATE + $<$<C_COMPILER_ID:ARMClang>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/armclang/startup_cmsdk_mps3_an524_ns.s> + $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/gcc/startup_cmsdk_mps3_an524_ns.S> + $<$<C_COMPILER_ID:IAR>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/iar/startup_cmsdk_mps3_an524_ns.s> + ) + target_add_scatter_file(tfm_ns + $<$<C_COMPILER_ID:ARMClang>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/armclang/mps3_an524_ns.sct> + $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/gcc/mps3_an524_ns.ld> + $<$<C_COMPILER_ID:IAR>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/iar/mps3_an524_ns.icf> + ) + target_link_libraries(tfm_ns + PRIVATE + $<$<C_COMPILER_ID:ARMClang>:${CMSIS_5_PATH}/RTOS2/RTX/Library/ARM/RTX_V8MBN.lib> + $<$<C_COMPILER_ID:GNU>:${CMSIS_5_PATH}/RTOS2/RTX/Library/GCC/libRTX_V8MBN.a> + $<$<C_COMPILER_ID:IAR>:${CMSIS_5_PATH}/RTOS2/RTX/Library/IAR/RTX_V8MBN.a> + # These libraries require linking to the veneers, so the veneers are + # marked again here as a link dependency to get the ordering right + tfm_s_veneers + ) +endif() + +if(BL2) + target_sources(bl2 + PRIVATE + $<$<C_COMPILER_ID:ARMClang>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/armclang/startup_cmsdk_mps3_an524_bl2.s> + $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/gcc/startup_cmsdk_mps3_an524_bl2.S> + $<$<C_COMPILER_ID:IAR>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/iar/startup_cmsdk_mps3_an524_bl2.s> + ) + target_add_scatter_file(bl2 + $<$<C_COMPILER_ID:ARMClang>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/armclang/mps3_an524_bl2.sct> + $<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/gcc/mps3_an524_bl2.ld> + $<$<C_COMPILER_ID:IAR>:${CMAKE_CURRENT_SOURCE_DIR}/device/source/iar/mps3_an524_bl2.icf> + ) +endif() + +#========================= Platform Secure ====================================# + +target_include_directories(platform_s + PUBLIC + . + ../common + cmsis_drivers + cmsis_drivers/config + native_drivers + partition + device/include + device/config + ${PLATFORM_DIR}/.. +) + +target_sources(platform_s + PRIVATE + device/source/system_core_init.c + device/source/device_definition.c + cmsis_drivers/Driver_Flash.c + cmsis_drivers/Driver_MPC.c + cmsis_drivers/Driver_PPC.c + cmsis_drivers/Driver_USART.c + native_drivers/mpc_sie200_drv.c + native_drivers/mpu_armv8m_drv.c + native_drivers/ppc_sse200_drv.c + native_drivers/uart_cmsdk_drv.c + spm_hal.c + target_cfg.c + native_drivers/ppc_sse200_drv.c + $<$<BOOL:TFM_PARTITION_PLATFORM>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> + $<$<BOOL:TFM_PARTITION_PLATFORM>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c> +) + +target_compile_options(platform_s + PUBLIC + ${COMPILER_CMSE_FLAG} +) + +target_compile_definitions(platform_s + PUBLIC + $<$<C_COMPILER_ID:GNU>:__STARTUP_CLEAR_BSS_MULTIPLE> + $<$<C_COMPILER_ID:GNU>:__STARTUP_COPY_MULTIPLE> +) + +#========================= Platform Non-Secure ================================# + +target_sources(platform_ns + PRIVATE + device/source/system_core_init.c + device/source/device_definition.c + native_drivers/uart_cmsdk_drv.c + cmsis_drivers/Driver_USART.c +) + +target_include_directories(platform_ns + PUBLIC + . + ${PLATFORM_DIR}/.. + device/include + device/config + native_drivers + cmsis_drivers/config +) + +#========================= Platform BL2 =======================================# + +if(BL2) + target_sources(platform_bl2 + PRIVATE + boot_hal.c + device/source/system_core_init.c + device/source/device_definition.c + cmsis_drivers/Driver_Flash.c + cmsis_drivers/Driver_USART.c + native_drivers/uart_cmsdk_drv.c + ) + + target_include_directories(platform_bl2 + PUBLIC + partition + device/include + device/config + cmsis_drivers/config + PRIVATE + . + ${PLATFORM_DIR}/.. + native_drivers + ) +endif() diff --git a/platform/ext/target/mps3/an524/config.cmake b/platform/ext/target/mps3/an524/config.cmake new file mode 100644 index 0000000000..06d4aa4518 --- /dev/null +++ b/platform/ext/target/mps3/an524/config.cmake @@ -0,0 +1,13 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2020, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +#------------------------------------------------------------------------------- + +set(MCUBOOT_IMAGE_NUMBER 1 CACHE STRING "Whether to combine S and NS into either 1 image, or sign each seperately" FORCE) +set(MCUBOOT_UPGRADE_STRATEGY "NO_SWAP" CACHE STRING "Upgrade strategy for images [OVERWRITE_ONLY, SWAP, NO_SWAP, RAM_LOADING]" FORCE) + +################################## Dependencies ################################ + +set(MBEDCRYPTO_BUILD_TYPE minsizerel CACHE STRING "Build type of Mbed Crypto library" FORCE) diff --git a/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_bl2.sct b/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_bl2.sct index cc40b2ea6b..5426db88e7 100644 --- a/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_bl2.sct +++ b/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_bl2.sct @@ -1,5 +1,3 @@ -#! armclang --target=arm-arm-none-eabi -march=armv8-m.main -E -xc - /* * Copyright (c) 2019-2020 Arm Limited. All rights reserved. * diff --git a/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_ns.sct b/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_ns.sct index e576462253..55d9774ca8 100644 --- a/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_ns.sct +++ b/platform/ext/target/mps3/an524/device/source/armclang/mps3_an524_ns.sct @@ -1,5 +1,3 @@ -#! armclang --target=arm-arm-none-eabi -march=armv8-m.main -E -xc - /* * Copyright (c) 2019-2020 Arm Limited. All rights reserved. * diff --git a/platform/ext/target/mps3/an524/preload.cmake b/platform/ext/target/mps3/an524/preload.cmake new file mode 100644 index 0000000000..db0a473903 --- /dev/null +++ b/platform/ext/target/mps3/an524/preload.cmake @@ -0,0 +1,19 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2020, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +#------------------------------------------------------------------------------- + +# preload.cmake is used to set things that related to the platform that are both +# immutable and global, which is to say they should apply to any kind of project +# that uses this platform. In practise this is normally compiler definitions and +# variables related to hardware. + +# Set architecture and CPU +set(TFM_SYSTEM_PROCESSOR cortex-m33) +set(TFM_SYSTEM_ARCHITECTURE armv8-m.main) +set(TFM_SYSTEM_DSP OFF) + +# Reload compiler to generate options from the CPU and architecture +_compiler_reload() |