Interface: TF-M specific log API

Provide a TF-M specific log API. Put the source in 'interface' folder
since this file are referenced by multiple components, such as bl2,
non-secure application and secure firmware. The sources are included
into SPRTL building and as part of SPRTL.
The fundamental API is 'tfm_log_printf' which supports basic formats
like 'sdicpuxX' and '%' as the format leading and escape.

Change-Id: I6d0f89ab16c3e00f8e71129a06f89dc206733733
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/platform/ext/common/uart_stdout.c b/platform/ext/common/uart_stdout.c
index 5a68697..ea892d6 100644
--- a/platform/ext/common/uart_stdout.c
+++ b/platform/ext/common/uart_stdout.c
@@ -28,7 +28,7 @@
 /* Imports USART driver */
 extern ARM_DRIVER_USART TFM_DRIVER_STDIO;
 
-static int uart_send_string(const unsigned char *str, uint32_t len)
+int stdio_output_string(const unsigned char *str, uint32_t len)
 {
     int32_t ret;
 
@@ -54,7 +54,7 @@
     (void)f;
 
     /* Send byte to USART */
-    (void)uart_send_string((const unsigned char *)&ch, 1);
+    (void)stdio_output_string((const unsigned char *)&ch, 1);
 
     /* Return character written */
     return ch;
@@ -66,13 +66,13 @@
     (void)fd;
 
     /* Send string and return the number of characters written */
-    return uart_send_string((const unsigned char *)str, (uint32_t)len);
+    return stdio_output_string((const unsigned char *)str, (uint32_t)len);
 }
 #elif defined(__ICCARM__)
 int putchar(int ch)
 {
     /* Send byte to USART */
-    (void)uart_send_string((const unsigned char *)&ch, 1);
+    (void)stdio_output_string((const unsigned char *)&ch, 1);
 
     /* Return character written */
     return ch;
@@ -104,4 +104,3 @@
     ret = TFM_DRIVER_STDIO.Uninitialize();
     ASSERT_HIGH(ret);
 }
-
diff --git a/platform/ext/common/uart_stdout.h b/platform/ext/common/uart_stdout.h
index 8feff31..d967c7c 100644
--- a/platform/ext/common/uart_stdout.h
+++ b/platform/ext/common/uart_stdout.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 ARM Limited
+ * Copyright (c) 2017-2019 ARM Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -40,4 +40,9 @@
  */
 void stdio_uninit(void);
 
+/**
+ * \brief Output buffer by STDIO.
+ */
+int stdio_output_string(const unsigned char *str, uint32_t len);
+
 #endif /* __UART_STDOUT_H__ */