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/posix_trace.c b/environments/posix/posix_trace.c
new file mode 100644
index 0000000..a0df51b
--- /dev/null
+++ b/environments/posix/posix_trace.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <trace.h>
+
+#if TRACE_LEVEL >= TRACE_LEVEL_ERROR
+
+void trace_puts(const char *str)
+{
+ puts(str);
+}
+
+#endif /* TRACE_LEVEL >= TRACE_LEVEL_ERROR */