Skip to content

Commit

Permalink
add optional define DEBUG_MUTE
Browse files Browse the repository at this point in the history
This shaves roughly 60k from firmware builds by not including the Logging Ressource strings. Define in variant.h or architecture.h

Stats from T-ECHO compiles:
Before:
Flash: [========  ]  81.5% (used 664700 bytes from 815104 bytes)
After:
Flash: [=======   ]  74.5% (used 606924 bytes from 815104 bytes)
  • Loading branch information
caveman99 committed May 11, 2024
1 parent 69d7656 commit 86b1479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DebugConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define LOG_CRIT(...) SEGGER_RTT_printf(0, __VA_ARGS__)
#define LOG_TRACE(...) SEGGER_RTT_printf(0, __VA_ARGS__)
#else
#ifdef DEBUG_PORT
#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)
#define LOG_DEBUG(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_DEBUG, __VA_ARGS__)
#define LOG_INFO(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_INFO, __VA_ARGS__)
#define LOG_WARN(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_WARN, __VA_ARGS__)
Expand Down

0 comments on commit 86b1479

Please sign in to comment.