From b4b77c17b551e103e45bcfe55df819c636b8617c Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 11 Dec 2023 12:01:09 +1100 Subject: [PATCH] esp32/mpconfigport: Keep some funcs out of IRAM for ESP32-SPIRAM builds. To make sure the build fits. Signed-off-by: Damien George --- ports/esp32/mpconfigport.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index fbed7706b9..91ee3188ca 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -214,7 +214,11 @@ void *esp_native_code_commit(void *, size_t, void *); #endif // Functions that should go in IRAM +// For ESP32 with SPIRAM workaround, firmware is larger and uses more static IRAM, +// so in that configuration don't put too many functions in IRAM. +#if !(CONFIG_IDF_TARGET_ESP32 && CONFIG_SPIRAM && CONFIG_SPIRAM_CACHE_WORKAROUND) #define MICROPY_WRAP_MP_BINARY_OP(f) IRAM_ATTR f +#endif #define MICROPY_WRAP_MP_EXECUTE_BYTECODE(f) IRAM_ATTR f #define MICROPY_WRAP_MP_LOAD_GLOBAL(f) IRAM_ATTR f #define MICROPY_WRAP_MP_LOAD_NAME(f) IRAM_ATTR f