1#------------------------------------------------------------------------------- 2# Copyright (c) 2020, Arm Limited. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6#------------------------------------------------------------------------------- 7 8cmake_policy(SET CMP0076 NEW) 9 10set(NUCLEO_L552ZE_Q_DIR ${CMAKE_CURRENT_LIST_DIR}) 11set(STM_COMMON_DIR ${NUCLEO_L552ZE_Q_DIR}/../common) 12 13#def for stm32l5xx 14include(${STM_COMMON_DIR}/stm32l5xx/CMakeLists.txt) 15#========================= Platform defs ===============================# 16 17# Specify the location of platform specific build dependencies. 18target_sources(tfm_s 19 PRIVATE 20 ${STM_COMMON_DIR}/stm32l5xx/Device/Source/startup_stm32l5xx_s.c 21) 22# cpuarch.cmake is used to set things that related to the platform that are both 23install(FILES 24 ${TARGET_PLATFORM_PATH}/cpuarch.cmake 25 DESTINATION ${INSTALL_PLATFORM_NS_DIR} 26) 27 28install(FILES 29 ${STM_COMMON_DIR}/stm32l5xx/Device/Source/startup_stm32l5xx_ns.c 30 DESTINATION ${INSTALL_PLATFORM_NS_DIR}/Device/Source 31) 32 33install(DIRECTORY 34 ${TARGET_PLATFORM_PATH}/ns/ 35 DESTINATION ${INSTALL_PLATFORM_NS_DIR} 36) 37 38install(DIRECTORY 39 ${TARGET_PLATFORM_PATH}/include 40 DESTINATION ${INSTALL_PLATFORM_NS_DIR} 41) 42 43install(FILES 44 ${TARGET_PLATFORM_PATH}/accelerator/crypto_accelerator_config.h 45 DESTINATION ${INSTALL_PLATFORM_NS_DIR}/include 46) 47 48install(DIRECTORY 49 ${STM_COMMON_DIR}/hal/accelerator/ 50 DESTINATION ${INSTALL_PLATFORM_NS_DIR}/include 51 FILES_MATCHING PATTERN "*.h" 52) 53 54install(FILES 55 ${TARGET_PLATFORM_PATH}/partition/flash_layout.h 56 ${TARGET_PLATFORM_PATH}/partition/region_defs.h 57 DESTINATION ${INSTALL_PLATFORM_NS_DIR}/partition 58) 59 60if(BL2) 61 target_sources(bl2 62 PRIVATE 63 ${STM_COMMON_DIR}/stm32l5xx/Device/Source/startup_stm32l5xx_bl2.c 64 ) 65endif() 66 67install(FILES ${TARGET_PLATFORM_PATH}/partition/flash_layout.h 68 ${TARGET_PLATFORM_PATH}/partition/region_defs.h 69 DESTINATION ${CMAKE_INSTALL_PREFIX} ) 70set (BL2_FILE_TO_PREPROCESS ${CMAKE_CURRENT_BINARY_DIR}/image_macros_to_preprocess_bl2.c) 71file(WRITE ${BL2_FILE_TO_PREPROCESS} ${BL2_PREPROCESSING}) 72install(FILES ${BL2_FILE_TO_PREPROCESS} 73 DESTINATION ${CMAKE_INSTALL_PREFIX} ) 74