diff --git a/tasmota/tasmota_support/support_esp32.ino b/tasmota/tasmota_support/support_esp32.ino index 8ba7f1eb6..7c530320d 100644 --- a/tasmota/tasmota_support/support_esp32.ino +++ b/tasmota/tasmota_support/support_esp32.ino @@ -84,7 +84,6 @@ extern "C" { #define ESP_FLASH_IMAGE_BASE 0x0000 // Esp32h2 is located at 0x0000 #elif CONFIG_IDF_TARGET_ESP32P4 #define ESP32_ARCH "esp32p4" - #include #include "esp32p4/rom/rtc.h" #include "esp32p4/rom/spi_flash.h" #define ESP_FLASH_IMAGE_BASE 0x2000 // Esp32p4 is located at 0x2000 @@ -93,6 +92,10 @@ extern "C" { #error Target CONFIG_IDF_TARGET is not supported #endif +#ifndef CONFIG_IDF_TARGET_ESP32P4 +#include +#endif + // Set the Stacksize for Arduino core. Default is 8192, some builds may need a bigger one size_t getArduinoLoopTaskStackSize(void) { return SET_ESP32_STACK_SIZE;