Skip to content

Commit

Permalink
toggle to disable logging resources stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MightyPork committed Jan 13, 2018
1 parent ace2bd6 commit 7df577f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions framework/resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 6 additions & 4 deletions gex.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion stm32_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7df577f

Please sign in to comment.