blob: 2ca7186e6825bb64c1abd448468430a5d4e47b4e [file] [log] [blame]
Gabor Ambrusa84494a2023-08-14 23:04:48 +02001#-------------------------------------------------------------------------------
2# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
8
9# Set default platform.
10set(TS_PLATFORM "arm/fvp/fvp_base_revc-2xaemv8a" CACHE STRING "Target platform location.")
11
12
13include(../../../deployment.cmake REQUIRED)
14
15#-------------------------------------------------------------------------------
16# The CMakeLists.txt for building the logging deployment for opteesp
17#
18# Builds the logging service provider for running in an SEL0 secure
19# partition hosted by OPTEE in the role of SPM.
20#-------------------------------------------------------------------------------
21include(${TS_ROOT}/environments/opteesp/env.cmake)
22project(trusted-services LANGUAGES C ASM)
23add_executable(logging)
24target_include_directories(logging PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
25set(SP_BIN_UUID_CANON "da9dffbd-d590-40ed-975f-19c65a3d52d3")
26set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
27set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
Gabor Toth1b0c11a2024-04-05 11:43:55 +020028set(SP_BOOT_ORDER "0" CACHE STRING "Boot order of the SP")
Gabor Ambrusa84494a2023-08-14 23:04:48 +020029set(TRACE_PREFIX "LOGGING" CACHE STRING "Trace prefix")
30
31target_include_directories(logging PRIVATE
32 ${CMAKE_CURRENT_LIST_DIR}
33)
34
35#-------------------------------------------------------------------------------
36# Add components - this deployment uses an infrastructure that provides
37# ram backed storage for SFS.
38#
39#-------------------------------------------------------------------------------
40add_components(TARGET "logging"
41 BASE_DIR ${TS_ROOT}
42 COMPONENTS
43 environments/opteesp
44)
45
46include(../../env/commonsp/logging_sp.cmake REQUIRED)
47include(../../logging.cmake REQUIRED)
48
49#-------------------------------------------------------------------------------
50# Set target platform to provide drivers needed by the deployment
51#
52#-------------------------------------------------------------------------------
53add_platform(TARGET "logging")
54
55#-------------------------------------------------------------------------------
56# Deployment specific build options
57#
58#-------------------------------------------------------------------------------
59target_compile_definitions(logging PRIVATE
60 ARM64=1
61)
62
63if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
64 target_compile_options(logging PRIVATE
65 -std=c99
66 )
67
68endif()
69
70#-------------------------------------------------------------------------------
71# Deployment specific install options
72#
73#-------------------------------------------------------------------------------
74if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
75 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
76endif()
Gabor Ambrusa84494a2023-08-14 23:04:48 +020077
78install(TARGETS logging
Gabor Ambrusa84494a2023-08-14 23:04:48 +020079 RUNTIME DESTINATION ${TS_ENV}/bin
80 )
81
82include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake)
83export_sp(
84 SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
85 SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
86 SP_UUID_LE ${SP_UUID_LE}
Gabor Toth7e4babe2024-03-14 11:09:19 +010087 SP_BOOT_ORDER ${SP_BOOT_ORDER}
Gabor Ambrusa84494a2023-08-14 23:04:48 +020088 SP_NAME "logging"
89 MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
90 DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_logging.dts.in
91 JSON_IN ${TS_ROOT}/environments/opteesp/sp_pkg.json.in
92)