From 04f62f3c8de300ce3a8ac32c3893aa28bba124d1 Mon Sep 17 00:00:00 2001 From: Shubham Kulkarni Date: Tue, 10 Aug 2021 18:21:25 +0530 Subject: [PATCH] Xtensa_ESP32: Fix build issues when external SPIRAM is enabled --- portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h | 3 +++ portable/ThirdParty/GCC/Xtensa_ESP32/port.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h b/portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h index 6d9280bc36f..32a7959af80 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 f2a4e19d301..e6ac1354e34 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 )