mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 10:08:40 +00:00
[esp32] Fix hal.cpp include order: defines.h before crash_handler.h
crash_handler.h is itself guarded by #ifdef USE_ESP32_CRASH_HANDLER, so when hal.cpp included it before defines.h, the namespace block was empty at parse time and arch_init()'s USE_ESP32_CRASH_HANDLER branch failed with: error: 'crash_handler_read_and_clear' is not a member of 'esphome::esp32' Pull defines.h first so USE_ESP32_CRASH_HANDLER is defined before crash_handler.h is parsed.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#ifdef USE_ESP32
|
||||
|
||||
#include "crash_handler.h"
|
||||
// defines.h must come before crash_handler.h so USE_ESP32_CRASH_HANDLER is set
|
||||
// before crash_handler.h's #ifdef-guarded namespace block is parsed.
|
||||
#include "esphome/core/defines.h"
|
||||
#include "crash_handler.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
#include <esp_clk_tree.h>
|
||||
|
||||
Reference in New Issue
Block a user