toggle to disable logging resources stuff

sipo
Ondřej Hruška 6 years ago
parent ace2bd6357
commit 7df577f9b1
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      framework/resources.h
  2. 10
      gex.mk
  3. 2
      stm32_assert.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)

@ -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

@ -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)

Loading…
Cancel
Save