Revert last 5 patches related to logging as they are still unstable
Revert "Log: Restore an interface target for logging header"
This reverts commit 2e796c5a813054de97f20492382a428894fdbacc.
Revert "Log: Add __assert_func and __assert_puts"
This reverts commit 6bceab814be8a968e74735dd45fe440bf6ea79b4.
Revert "LIB: Move TEST_LOG to use tfm_log"
This reverts commit 9798351a12f881a1cca66b60f4ad72167916847d.
Revert "LIB: Move NS test apps to use printf"
This reverts commit ebf5261a57d2a1ed91fc334a53fada7b59255ae4.
Revert "LIB: Move tfm_log.h to tfm_tests_log_msg.h"
This reverts commit 290b88f90c0d2a5dc275a1748690047f374ef6f1.
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
Change-Id: Icd0dabddb5c191728e18c81611648ce2eb81680c
diff --git a/lib/log/tfm_log_raw.h b/lib/log/tfm_log_raw.h
new file mode 100644
index 0000000..7a5a942
--- /dev/null
+++ b/lib/log/tfm_log_raw.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TFM_LOG_RAW_H__
+#define __TFM_LOG_RAW_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * \brief Prints log messages
+ *
+ * \param[in] fmt Formatted string
+ * \param[in] ... Viriable length argument
+ *
+ * \return Number of chars printed
+ *
+ * \note This function has the similar input argument format as
+ * the 'printf' function. But it supports only some basic
+ * formats like 'sdicpuxX' and '%'. It will output
+ * "[Unsupported Tag]" when none of the above formats match
+ *
+ * \details The following output formats are supported.
+ * %s - string
+ * %d - decimal signed integer (same for %i)
+ * %u - decimal unsigned integer
+ * %x - hex in lowercase
+ * %X - hex in uppercase
+ * %p - hex address of a pointer in lowercase
+ * %c - character
+ * %% - the '%' symbol
+ */
+int tfm_log_printf(const char *fmt, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TFM_LOG_RAW_H__ */