[esp32] Add crash handler to capture and report backtrace across reboots (#14709)

This commit is contained in:
J. Nick Koston
2026-03-12 14:00:20 +13:00
committed by GitHub
parent ddc40f44fa
commit 8daa946afa
10 changed files with 451 additions and 0 deletions
+6
View File
@@ -14,6 +14,9 @@
#include "api_server.h"
#include "esphome/core/application.h"
#include "esphome/core/component.h"
#ifdef USE_ESP32_CRASH_HANDLER
#include "esphome/components/esp32/crash_handler.h"
#endif
#include "esphome/core/entity_base.h"
#include "esphome/core/string_ref.h"
@@ -235,6 +238,9 @@ class APIConnection final : public APIServerConnectionBase {
this->flags_.log_subscription = msg.level;
if (msg.dump_config)
App.schedule_dump_config();
#ifdef USE_ESP32_CRASH_HANDLER
esp32::crash_handler_log();
#endif
}
#ifdef USE_API_HOMEASSISTANT_SERVICES
void on_subscribe_homeassistant_services_request() override { this->flags_.service_call_subscription = true; }