1 /*******************************************************************************
\r
2 * (c) Copyright 2009-2013 Microsemi SoC Products Group. All rights reserved.
\r
4 * Assertion implementation.
\r
6 * This file provides the implementation of the ASSERT macro. This file can be
\r
7 * modified to cater for project specific requirements regarding the way
\r
8 * assertions are handled.
\r
10 * SVN $Revision: 5279 $
\r
11 * SVN $Date: 2013-03-22 20:48:38 +0000 (Fri, 22 Mar 2013) $
\r
13 #ifndef __MSS_ASSERT_H_
\r
14 #define __MSS_ASSERT_H_
\r
18 #if defined ( __GNUC__ )
\r
22 #define ASSERT(CHECK)
\r
26 * SoftConsole assertion handling
\r
28 #define ASSERT(CHECK) \
\r
32 __asm volatile ("BKPT\n\t"); \
\r
38 #elif defined ( __ICCARM__ )
\r
40 * IAR Embedded Workbench assertion handling.
\r
41 * Call C library assert function which should result in error message
\r
42 * displayed in debugger.
\r
44 #define ASSERT(X) assert(X)
\r
48 * Keil assertion handling.
\r
49 * Call C library assert function which should result in error message
\r
50 * displayed in debugger.
\r
54 #define ASSERT(X) assert(X)
\r
61 #endif /* __MSS_ASSERT_H_ */
\r