TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tfm_assert.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_ASSERT_H__
9 #define __TFM_ASSERT_H__
10 
11 #include "tfm_spm_log.h"
12 
13 /* Functions and macros in this file is for 'thread mode' usage. */
14 
15 #define TFM_ASSERT(cond) \
16  do { \
17  if (!(cond)) { \
18  SPMLOG_INFMSG("Assert:"); \
19  SPMLOG_INFMSG(__FUNCTION__); \
20  SPMLOG_INFMSGVAL(",", __LINE__); \
21  while (1) \
22  ; \
23  } \
24  } while (0)
25 
26 #endif /* __TFM_ASSERT_H__ */