Debug-header. More...
Debug-header.
If ENABLE_DEBUG is defined inside an implementation file, all calls to DEBUG will work the same as printf and output the given information to stdout. If ENABLE_DEBUG is not defined, all calls to DEBUG will be ignored.
Definition in file debug.h.
Go to the source code of this file.
Macros | |
#define | DEBUG_EXTRA_STACKSIZE THREAD_EXTRA_STACKSIZE_PRINTF |
Extra stacksize needed when ENABLE_DEBUG==1. | |
#define | DEBUG_PRINT(...) |
Print debug information if the calling thread stack is large enough. More... | |
Debugging defines | |
#define | ENABLE_DEBUG 0 |
This macro can be defined as 0 or other on a file-based level. More... | |
#define | DEBUG_FUNC "" |
Contains the function name if given compiler supports it. Otherwise it is an empty string. | |
#define | DEBUG(...) if (ENABLE_DEBUG) { DEBUG_PRINT(__VA_ARGS__); } |
Print debug information to stdout. More... | |
#define | DEBUG_PUTS(str) if (ENABLE_DEBUG) { puts(str); } |
Print debug information to stdout using puts(), so no stack size restrictions do apply. | |
#define DEBUG | ( | ... | ) | if (ENABLE_DEBUG) { DEBUG_PRINT(__VA_ARGS__); } |
Print debug information to stdout.
#define DEBUG_PRINT | ( | ... | ) |
Print debug information if the calling thread stack is large enough.
Use this macro the same as printf
. When DEVELHELP
is defined inside an implementation file, all usages of DEBUG_PRINT will print the given information to stdout after verifying the stack is big enough. If DEVELHELP
is not set, this check is not performed. (CPU exception may occur)