1# 2# Arm SCP/MCP Software 3# Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. 4# 5# SPDX-License-Identifier: BSD-3-Clause 6# 7 8# 9# Create the firmware target. 10# 11 12add_executable(n1sdp-bl2) 13 14target_include_directories( 15 n1sdp-bl2 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include" 16 "${CMAKE_CURRENT_SOURCE_DIR}") 17 18# cmake-lint: disable=E1122 19 20target_sources( 21 n1sdp-bl2 22 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/config_system_power.c" 23 "${CMAKE_CURRENT_SOURCE_DIR}/../src/n1sdp_core.c" 24 "${CMAKE_CURRENT_SOURCE_DIR}/config_armv7m_mpu.c" 25 "${CMAKE_CURRENT_SOURCE_DIR}/config_ssc.c" 26 "${CMAKE_CURRENT_SOURCE_DIR}/config_system_info.c" 27 "${CMAKE_CURRENT_SOURCE_DIR}/config_power_domain.c" 28 "${CMAKE_CURRENT_SOURCE_DIR}/config_ppu_v0.c" 29 "${CMAKE_CURRENT_SOURCE_DIR}/config_ppu_v1.c" 30 "${CMAKE_CURRENT_SOURCE_DIR}/config_cdns_i2c.c" 31 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_dmc620.c" 32 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_ddr_phy.c" 33 "${CMAKE_CURRENT_SOURCE_DIR}/config_mhu.c" 34 "${CMAKE_CURRENT_SOURCE_DIR}/config_transport.c" 35 "${CMAKE_CURRENT_SOURCE_DIR}/config_scmi.c" 36 "${CMAKE_CURRENT_SOURCE_DIR}/config_sds.c" 37 "${CMAKE_CURRENT_SOURCE_DIR}/config_timer.c" 38 "${CMAKE_CURRENT_SOURCE_DIR}/config_cmn600.c" 39 "${CMAKE_CURRENT_SOURCE_DIR}/config_scmi_system_power.c" 40 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_pll.c" 41 "${CMAKE_CURRENT_SOURCE_DIR}/config_pik_clock.c" 42 "${CMAKE_CURRENT_SOURCE_DIR}/config_css_clock.c" 43 "${CMAKE_CURRENT_SOURCE_DIR}/config_clock.c" 44 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_pcie.c" 45 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_scp2pcc.c" 46 "${CMAKE_CURRENT_SOURCE_DIR}/config_sensor.c" 47 "${CMAKE_CURRENT_SOURCE_DIR}/config_apcontext.c" 48 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_c2c_i2c.c" 49 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_remote_pd.c" 50 "${CMAKE_CURRENT_SOURCE_DIR}/config_n1sdp_timer_sync.c" 51 "${CMAKE_CURRENT_SOURCE_DIR}/config_scmi_power_domain.c" 52 "${CMAKE_CURRENT_SOURCE_DIR}/config_pl011.c" 53 "${CMAKE_CURRENT_SOURCE_DIR}/config_fip.c") 54 55if(SCP_ENABLE_DEBUGGER) 56 target_compile_definitions(n1sdp-bl2 PRIVATE BUILD_HAS_DEBUGGER) 57 target_sources(n1sdp-bl2 PRIVATE "config_debugger_cli.c") 58endif() 59 60# 61# Some of our firmware includes require CMSIS. 62# 63 64target_link_libraries(n1sdp-bl2 PUBLIC cmsis::core-m) 65 66# 67# We explicitly add the CMSIS include directories to our interfaceinclude 68# directories. Each module target adds these include directories totheir own, 69# allowing them to include any firmware includes we expose. 70# 71 72target_include_directories(n1sdp-bl2 73 PUBLIC $<TARGET_PROPERTY:cmsis::core-m,INTERFACE_INCLUDE_DIRECTORIES>) 74 75if(SCP_ENABLE_DEBUGGER) 76 list(APPEND SCP_MODULES "debugger-cli") 77endif() 78 79set(SCP_MODULES ${SCP_MODULES} PARENT_SCOPE) 80set(SCP_MODULE_PATHS ${SCP_MODULE_PATHS} PARENT_SCOPE) 81