2 * @brief General purpose macros.
12 #define DEBUG(fmt, ...) do { printf("*** %25s(): line %-4d *** " fmt, __func__, __LINE__, ##__VA_ARGS__); } while (0)
13 #define DBG() DEBUG("\n")
14 #define DBG_ENABLED() (1)
16 #define DEBUG(fmt, ...)
18 #define DBG_ENABLED() (0)
21 void assert_hook(void);
24 #define ASSERT(expr) \
27 fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
29 model_print_summary(); \
35 #define ASSERT(expr) \
37 #endif /* CONFIG_ASSERT */
39 #define error_msg(...) fprintf(stderr, "Error: " __VA_ARGS__)
41 void print_trace(void);
42 void model_print_summary(void);
43 #endif /* __COMMON_H__ */