From 6ba8aa63c123730664b270a2ea401c1b89f601c8 Mon Sep 17 00:00:00 2001 From: Shubham Kulkarni <57181281+shubhamkulkarni97@users.noreply.github.com> Date: Fri, 13 Aug 2021 06:16:25 +0530 Subject: [PATCH] Xtensa_ESP32: Fix build issues when external SPIRAM is enabled (#381) Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> --- 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 6d9280bc3..32a7959af 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 f2a4e19d3..e6ac1354e 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 )