diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h index 6d9280bc36..32a7959af8 100644 --- a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h +++ b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h @@ -89,6 +89,9 @@ #include #include "soc/soc_memory_layout.h" +#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0)) + #include "soc/compare_set.h" +#endif /* ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) */ /*#include "xtensa_context.h" */ diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/port.c b/portable/ThirdParty/GCC/Xtensa_ESP32/port.c index f2a4e19d30..e6ac1354e3 100644 --- a/portable/ThirdParty/GCC/Xtensa_ESP32/port.c +++ b/portable/ThirdParty/GCC/Xtensa_ESP32/port.c @@ -484,6 +484,8 @@ void vPortSetStackWatchpoint( void * pxStackStart ) esp_set_watchpoint( 1, ( char * ) addr, 32, ESP_WATCHPOINT_STORE ); } +#if (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0)) + #if defined( CONFIG_SPIRAM_SUPPORT ) /* @@ -522,6 +524,7 @@ void vPortSetStackWatchpoint( void * pxStackStart ) } #endif //defined(CONFIG_SPIRAM_SUPPORT) +#endif /* ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0) */ uint32_t xPortGetTickRateHz( void )