toggle to disable logging resources stuff
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
#include "unit.h"
|
||||
#include "rsc_enum.h"
|
||||
|
||||
#if DEBUG_RSC
|
||||
#define rsc_dbg(fmt, ...) dbg("[RSC] "fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define rsc_dbg(fmt, ...)
|
||||
#endif
|
||||
|
||||
#define CHECK_SUC() do { if (!suc) return false; } while (0)
|
||||
|
||||
|
||||
@@ -71,25 +71,27 @@ ifeq '$(DISABLE_DEBUG)' '1'
|
||||
|
||||
GEX_CDEFS = $(GEX_CDEFS_BASE) \
|
||||
-DUSE_FULL_ASSERT=0 \
|
||||
-DVERBOSE_ASSERT=0 \
|
||||
-DASSERT_FILENAMES=0 \
|
||||
-DDEBUG_VFS=0 \
|
||||
-DDEBUG_FLASH_WRITE=0 \
|
||||
-DVERBOSE_HARDFAULT=0 \
|
||||
-DUSE_STACK_MONITOR=0 \
|
||||
-DUSE_DEBUG_UART=0 \
|
||||
-DDEBUG_MALLOC=0
|
||||
-DDEBUG_MALLOC=0 \
|
||||
-DDEBUG_RSC=0
|
||||
|
||||
else
|
||||
|
||||
GEX_CDEFS = $(GEX_CDEFS_BASE) \
|
||||
-DUSE_FULL_ASSERT=1 \
|
||||
-DVERBOSE_ASSERT=1 \
|
||||
-DASSERT_FILENAMES=1 \
|
||||
-DDEBUG_VFS=0 \
|
||||
-DDEBUG_FLASH_WRITE=0 \
|
||||
-DVERBOSE_HARDFAULT=1 \
|
||||
-DUSE_STACK_MONITOR=1 \
|
||||
-DUSE_DEBUG_UART=1 \
|
||||
-DDEBUG_MALLOC=0
|
||||
-DDEBUG_MALLOC=0 \
|
||||
-DDEBUG_RSC=0
|
||||
|
||||
endif
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ void warn_msg(const char *msg, const char *filename, uint32_t line);
|
||||
void __attribute__((noreturn)) assert_failed_(const char *file, uint32_t line);
|
||||
|
||||
#if USE_FULL_ASSERT
|
||||
#if VERBOSE_ASSERT
|
||||
#if ASSERT_FILENAMES
|
||||
// With the filename enabled.
|
||||
#define trap(msg) abort_msg(msg, __BASE_FILE__, __LINE__)
|
||||
#define assert_param(expression) do { if (!(expression)) assert_failed_(__BASE_FILE__, __LINE__); } while(0)
|
||||
|
||||
Reference in New Issue
Block a user