Skip to content

Commit b4b77c1

Browse files
committed
esp32/mpconfigport: Keep some funcs out of IRAM for ESP32-SPIRAM builds.
To make sure the build fits. Signed-off-by: Damien George <[email protected]>
1 parent 3069fee commit b4b77c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ports/esp32/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ void *esp_native_code_commit(void *, size_t, void *);
214214
#endif
215215

216216
// Functions that should go in IRAM
217+
// For ESP32 with SPIRAM workaround, firmware is larger and uses more static IRAM,
218+
// so in that configuration don't put too many functions in IRAM.
219+
#if !(CONFIG_IDF_TARGET_ESP32 && CONFIG_SPIRAM && CONFIG_SPIRAM_CACHE_WORKAROUND)
217220
#define MICROPY_WRAP_MP_BINARY_OP(f) IRAM_ATTR f
221+
#endif
218222
#define MICROPY_WRAP_MP_EXECUTE_BYTECODE(f) IRAM_ATTR f
219223
#define MICROPY_WRAP_MP_LOAD_GLOBAL(f) IRAM_ATTR f
220224
#define MICROPY_WRAP_MP_LOAD_NAME(f) IRAM_ATTR f

0 commit comments

Comments
 (0)