LIB: Move NS test apps to use printf
There is no reason why the NS test apps need to use a custom logging
library and it makes it much less complicated for them to use printf
provided with the compiler.
Change-Id: Id16a84da2357b08bc6eb4fa9e30e04ad7125d2a1
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
diff --git a/app_broker/CMakeLists.txt b/app_broker/CMakeLists.txt
index caad0cf..cfa0079 100644
--- a/app_broker/CMakeLists.txt
+++ b/app_broker/CMakeLists.txt
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
+# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -124,29 +124,6 @@
)
endif()
-# TF-M NS logging
-add_library(tfm_ns_log STATIC EXCLUDE_FROM_ALL)
-
-target_sources(tfm_ns_log
- PRIVATE
- ${APP_LIB_DIR}/log/tfm_log_raw.c
-)
-
-target_include_directories(tfm_ns_log
- PUBLIC
- ${APP_LIB_DIR}/log/
-)
-
-target_compile_definitions(tfm_ns_log
- INTERFACE
- $<$<NOT:$<BOOL:${TFM_NS_LOG_DISABLE}>>:TFM_NS_LOG>
-)
-
-target_link_libraries(tfm_ns_log
- PRIVATE
- platform_ns
-)
-
################## Update plaform_ns with NS settings #################
target_include_directories(platform_ns
@@ -192,6 +169,7 @@
target_include_directories(tfm_test_broker
PUBLIC
.
+ ${APP_LIB_DIR}/log/
)
target_link_libraries(tfm_test_broker
@@ -201,7 +179,6 @@
PUBLIC
RTX_OS
tfm_api_ns
- tfm_ns_log
$<$<BOOL:${TFM_NS_MAILBOX_API}>:ns_multi_core>
)
diff --git a/lib/log/tfm_tests_log_msg.h b/lib/log/tfm_tests_log_msg.h
index fbbe7bc..deee64f 100644
--- a/lib/log/tfm_tests_log_msg.h
+++ b/lib/log/tfm_tests_log_msg.h
@@ -8,12 +8,12 @@
#ifndef __TFM_LOG_H__
#define __TFM_LOG_H__
-#include "tfm_log_raw.h"
+#include <stdio.h>
/* Functions and macros in this file is for 'thread mode' usage. */
#ifdef TFM_NS_LOG
-#define LOG_MSG(...) tfm_log_printf(__VA_ARGS__)
+#define LOG_MSG(...) printf(__VA_ARGS__)
#else
#define LOG_MSG(...)
#endif