blob: b283b797302f450280963b0ce2fcf1a3262ebcfc [file] [log] [blame]
Balint Dobszay72c3f042020-11-23 18:23:57 +01001#-------------------------------------------------------------------------------
Gyorgy Szing8a1e7f42023-07-26 18:26:48 +02002# Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
Balint Dobszay72c3f042020-11-23 18:23:57 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
Balint Dobszay047aea82022-05-16 14:20:53 +02007cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
Balint Dobszay72c3f042020-11-23 18:23:57 +01008include(../../deployment.cmake REQUIRED)
9
10#-------------------------------------------------------------------------------
11# The CMakeLists.txt for building the sfs-demo deployment for opteesp
12#
13# Used for building a demo sp that acts as a client of the secure storage
14# service, deployed in another sp.
15#-------------------------------------------------------------------------------
16include(${TS_ROOT}/environments/opteesp/env.cmake)
17project(trusted-services LANGUAGES C ASM)
18add_executable(sfs-demo)
Jelle Sels4960c412023-02-01 09:43:24 +010019set(SP_BIN_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
20set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
21
Imre Kiseeee9642021-12-17 13:59:46 +010022set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
Imre Kis2ccd8e82021-10-08 11:21:14 +020023set(TRACE_PREFIX "SFSDEMO" CACHE STRING "Trace prefix")
Balint Dobszay72c3f042020-11-23 18:23:57 +010024
Balint Dobszay72c3f042020-11-23 18:23:57 +010025add_components(TARGET "sfs-demo"
26 BASE_DIR ${TS_ROOT}
27 COMPONENTS
Balint Dobszay72c3f042020-11-23 18:23:57 +010028 environments/opteesp
29)
30
Imre Kisd0ed5c22021-12-15 17:05:47 +010031include(../sfs-demo.cmake REQUIRED)
Balint Dobszay72c3f042020-11-23 18:23:57 +010032
33target_compile_definitions(sfs-demo PRIVATE
34 ARM64=1
35)
36
37target_include_directories(sfs-demo PRIVATE
Balint Dobszay72c3f042020-11-23 18:23:57 +010038 ${TS_ROOT}/deployments/sfs-demo/opteesp
39)
40
41if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
42 target_compile_options(sfs-demo PRIVATE
Andrew Beggs97a00d42021-06-15 15:45:46 +000043 -std=c99
Balint Dobszay72c3f042020-11-23 18:23:57 +010044 )
45
Balint Dobszay72c3f042020-11-23 18:23:57 +010046endif()
47
Balint Dobszay72c3f042020-11-23 18:23:57 +010048######################################## install
49if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
50 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
51endif()
Imre Kis5a35dda2022-03-03 11:38:12 +010052install(TARGETS sfs-demo
53 PUBLIC_HEADER DESTINATION ${TS_ENV}/include
54 RUNTIME DESTINATION ${TS_ENV}/bin
55 )
Imre Kis5a35dda2022-03-03 11:38:12 +010056
57include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake)
58export_sp(
Jelle Sels4960c412023-02-01 09:43:24 +010059 SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
60 SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
Imre Kis5a35dda2022-03-03 11:38:12 +010061 SP_NAME "sfs-demo"
62 MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
63 DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_sfs-demo.dts.in
64 JSON_IN ${TS_ROOT}/environments/opteesp/sp_pkg.json.in
65)