Add trace support for posix environments
In preparation for deploying the FWU update agent in the
linux-pc environment, trace support is added to allow
trace messages to be output to stdout.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: If2adb3e90fdbc39251ed3b95c22fae2cbf52ccbf
diff --git a/environments/posix/component.cmake b/environments/posix/component.cmake
new file mode 100644
index 0000000..1cf17dd
--- /dev/null
+++ b/environments/posix/component.cmake
@@ -0,0 +1,13 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+if (NOT DEFINED TGT)
+ message(FATAL_ERROR "mandatory parameter TGT is not defined.")
+endif()
+
+target_sources(${TGT} PRIVATE
+ "${CMAKE_CURRENT_LIST_DIR}/posix_trace.c"
+ )