fix: improve boot fault visibility and defer watchdog start

This commit is contained in:
2026-04-20 08:12:06 +08:00
parent 77da670f5c
commit c8f27e21f1
7 changed files with 54 additions and 9 deletions
+13
View File
@@ -75,6 +75,19 @@ void debug_log_fault(const char *tag)
debug_log_printf("[FAULT] %s\r\n", (tag != NULL) ? tag : "(null)");
}
void debug_log_fault_context(const char *tag, const char *file, int line)
{
debug_log_printf("[FAULT] %s file=%s line=%d free=%lu min=%lu seq=%lu drop=%lu last_drop=%lu\r\n",
(tag != NULL) ? tag : "(null)",
(file != NULL) ? file : "(null)",
line,
(unsigned long)xPortGetFreeHeapSize(),
(unsigned long)xPortGetMinimumEverFreeHeapSize(),
(unsigned long)g_rtt_log_seq,
(unsigned long)g_rtt_log_drop_count,
(unsigned long)g_rtt_log_last_drop_seq);
}
void debug_log_runtime_snapshot(void)
{
UBaseType_t default_hwm;