Skip to content

Commit efefc49

Browse files
Xtensa_ESP32: Fix build issues when external SPIRAM is enabled
1 parent b97bb48 commit efefc49

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

portable/ThirdParty/GCC/Xtensa_ESP32/include/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
#include <esp_heap_caps.h>
9191
#include "soc/soc_memory_layout.h"
92+
#include "soc/compare_set.h"
9293

9394
/*#include "xtensa_context.h" */
9495

portable/ThirdParty/GCC/Xtensa_ESP32/port.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -484,46 +484,6 @@ void vPortSetStackWatchpoint( void * pxStackStart )
484484
esp_set_watchpoint( 1, ( char * ) addr, 32, ESP_WATCHPOINT_STORE );
485485
}
486486

487-
#if defined( CONFIG_SPIRAM_SUPPORT )
488-
489-
/*
490-
* Compare & set (S32C1) does not work in external RAM. Instead, this routine uses a mux (in internal memory) to fake it.
491-
*/
492-
static portMUX_TYPE extram_mux = portMUX_INITIALIZER_UNLOCKED;
493-
494-
void uxPortCompareSetExtram( volatile uint32_t * addr,
495-
uint32_t compare,
496-
uint32_t * set )
497-
{
498-
uint32_t prev;
499-
500-
uint32_t oldlevel = portENTER_CRITICAL_NESTED();
501-
502-
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
503-
vPortCPUAcquireMutexIntsDisabled( &extram_mux, portMUX_NO_TIMEOUT, __FUNCTION__, __LINE__ );
504-
#else
505-
vPortCPUAcquireMutexIntsDisabled( &extram_mux, portMUX_NO_TIMEOUT );
506-
#endif
507-
prev = *addr;
508-
509-
if( prev == compare )
510-
{
511-
*addr = *set;
512-
}
513-
514-
*set = prev;
515-
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
516-
vPortCPUReleaseMutexIntsDisabled( &extram_mux, __FUNCTION__, __LINE__ );
517-
#else
518-
vPortCPUReleaseMutexIntsDisabled( &extram_mux );
519-
#endif
520-
521-
portEXIT_CRITICAL_NESTED(oldlevel);
522-
}
523-
#endif //defined(CONFIG_SPIRAM_SUPPORT)
524-
525-
526-
527487
uint32_t xPortGetTickRateHz( void )
528488
{
529489
return ( uint32_t ) configTICK_RATE_HZ;

0 commit comments

Comments
 (0)