diff --git a/framework/resources.h b/framework/resources.h index f2b91c9..3e3e5b5 100644 --- a/framework/resources.h +++ b/framework/resources.h @@ -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) diff --git a/gex.mk b/gex.mk index 2d48208..2989aae 100644 --- a/gex.mk +++ b/gex.mk @@ -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 diff --git a/stm32_assert.h b/stm32_assert.h index 4de2d02..231fab1 100644 --- a/stm32_assert.h +++ b/stm32_assert.h @@ -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)