diff --git a/lib/Logging/Logging.cpp b/lib/Logging/Logging.cpp index 22c14db9..d7f83606 100644 --- a/lib/Logging/Logging.cpp +++ b/lib/Logging/Logging.cpp @@ -20,9 +20,6 @@ void addToLogRingBuffer(const char* message) { // This logPrintf prepend the timestamp, level and origin to the user-provided message, so that the user only needs to // provide the format string for the message itself. void logPrintf(const char* level, const char* origin, const char* format, ...) { - if (!logSerial) { - return; // Serial not initialized, skip logging - } va_list args; va_start(args, format); char buf[MAX_ENTRY_LEN]; diff --git a/lib/hal/HalSystem.cpp b/lib/hal/HalSystem.cpp index 4e17d5bd..606bf80d 100644 --- a/lib/hal/HalSystem.cpp +++ b/lib/hal/HalSystem.cpp @@ -17,6 +17,9 @@ RTC_NOINIT_ATTR HalSystem::StackFrame panicStack[MAX_PANIC_STACK_DEPTH]; extern "C" { +void __real_panic_abort(const char* message); +void __real_panic_print_backtrace(const void* frame, int core); + static DRAM_ATTR const char PANIC_REASON_UNKNOWN[] = "(unknown panic reason)"; void IRAM_ATTR __wrap_panic_abort(const char* message) { if (!message) message = PANIC_REASON_UNKNOWN; diff --git a/lib/hal/HalSystem.h b/lib/hal/HalSystem.h index 93275082..e9df1b9d 100644 --- a/lib/hal/HalSystem.h +++ b/lib/hal/HalSystem.h @@ -3,15 +3,6 @@ #include #include -extern "C" { - -void __real_panic_abort(const char* message); -void __wrap_panic_abort(const char* message); - -void __real_panic_print_backtrace(const void* frame, int core); -void __wrap_panic_print_backtrace(const void* frame, int core); -} - namespace HalSystem { struct StackFrame { uint32_t sp; diff --git a/platformio.ini b/platformio.ini index 8e45ab77..4ba1c750 100644 --- a/platformio.ini +++ b/platformio.ini @@ -78,7 +78,7 @@ build_flags = ${base.build_flags} -DCROSSPOINT_VERSION=\"${crosspoint.version}\" -DENABLE_SERIAL_LOG - -DLOG_LEVEL=0 ; Set log level to error for release builds + -DLOG_LEVEL=1 ; Set log level to info for release builds [env:gh_release_rc] extends = base