Add fwu update agent deployment for linux-pc/posix
The fwu update agent can be deployed in different
execution environments to suite platform requirements.
This commit adds a deployment where the fwu update
agent runs within a command-line app for Posix
environments where the firmware image file is accessible
via standard file io. Can be built to run in a native PC
environment to enable a disk image file to be inspected.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I3a652c7ab201c5b7059f8dd1bb6b590e6d8c4c37
diff --git a/environments/posix/component.cmake b/environments/posix/component.cmake
index 1cf17dd..bcdb6ad 100644
--- a/environments/posix/component.cmake
+++ b/environments/posix/component.cmake
@@ -8,6 +8,18 @@
message(FATAL_ERROR "mandatory parameter TGT is not defined.")
endif()
+if (NOT DEFINED TRACE_PREFIX)
+ message(FATAL_ERROR "mandatory parameter TRACE_PREFIX is not defined.")
+endif()
+
+# Default to trace output disabled
+set(TRACE_LEVEL "TRACE_LEVEL_NONE" CACHE STRING "Trace level")
+
+target_compile_definitions(${TGT} PRIVATE
+ TRACE_LEVEL=${TRACE_LEVEL}
+ TRACE_PREFIX="${TRACE_PREFIX}"
+)
+
target_sources(${TGT} PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/posix_trace.c"
)