From bbf9dd849a61c1f3e2d53d0a54fc61012f0dae1e Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 19 Jun 2021 09:08:15 +1000 Subject: [PATCH] esp32/boards/sdkconfig.base: Disable MEMPROT_FEATURE to alloc from IRAM. Dynamically generate/loaded native code (eg from @micropython.native or native .mpy files) needs to be able allocate from IRAM, and the memory protection feature must be disabled for that to work. Disabling it is needed to get native code working on ESP32-S2 and -C3. Signed-off-by: Damien George --- ports/esp32/boards/sdkconfig.base | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/esp32/boards/sdkconfig.base b/ports/esp32/boards/sdkconfig.base index 4d9e38077..5ca3f6a1a 100644 --- a/ports/esp32/boards/sdkconfig.base +++ b/ports/esp32/boards/sdkconfig.base @@ -29,6 +29,10 @@ CONFIG_ESP32_XTAL_FREQ_AUTO=y # Power Management CONFIG_PM_ENABLE=y +# Memory protection +# This is required to allow allocating IRAM +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=n + # FreeRTOS CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=2 CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y