Core: Refine 'logging' and 'assert' symbols
* Define a generic (non-core) TFM_ASSERT.
* Define core dedicated TFM_CORE_ASSERT.
* Remove redundant LOG_MSG defination in 'tfm_integ_test.h'.
Change-Id: I05437550844b29b2bc660a70566b48ccc3d5bca4
Signed-off-by: Ken Liu <ken.liu@arm.com>
diff --git a/interface/include/log/tfm_assert.h b/interface/include/log/tfm_assert.h
new file mode 100644
index 0000000..67d114d
--- /dev/null
+++ b/interface/include/log/tfm_assert.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TFM_ASSERT_H__
+#define __TFM_ASSERT_H__
+
+#include "tfm_log_raw.h"
+
+/* Functions and macros in this file is for 'thread mode' usage. */
+
+#define TFM_ASSERT(cond) \
+ do { \
+ if (!(cond)) { \
+ tfm_log_printf("Assert:%s:%d", __FUNCTION__, __LINE__); \
+ while (1) \
+ ; \
+ } \
+ } while (0)
+
+#endif /* __TFM_ASSERT_H__ */