Remove OP-TEE dependency on trace functions
Introducing a custom trace component which replaces the one that comes
from the SP dev kit. The new component provides the same DMSG, IMSG,
EMSG macros for printing trace messages with different levels.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I5f9466c5a32fefeb9ef350b179dc22ee33324f7e
diff --git a/environments/opteesp/component.cmake b/environments/opteesp/component.cmake
index f7e391f..bd6e036 100644
--- a/environments/opteesp/component.cmake
+++ b/environments/opteesp/component.cmake
@@ -11,9 +11,23 @@
target_sources(${TGT} PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/libsp_entry.c"
+ "${CMAKE_CURRENT_LIST_DIR}/sp_trace.c"
)
target_include_directories(${TGT}
- PUBLIC
- "${CMAKE_CURRENT_LIST_DIR}/include"
- )
+ PUBLIC
+ "${CMAKE_CURRENT_LIST_DIR}/include"
+ )
+
+if (NOT DEFINED TRACE_PREFIX)
+ set(TRACE_PREFIX "SP" CACHE STRING "Trace prefix")
+endif()
+
+if (NOT DEFINED TRACE_LEVEL)
+ set(TRACE_LEVEL "TRACE_LEVEL_ERROR" CACHE STRING "Trace level")
+endif()
+
+target_compile_definitions(${TGT} PRIVATE
+ TRACE_LEVEL=${TRACE_LEVEL}
+ TRACE_PREFIX="${TRACE_PREFIX}"
+)