Skip to content

Commit

Permalink
esp32/boards/sdkconfig.base: Disable MEMPROT_FEATURE to alloc from IRAM.
Browse files Browse the repository at this point in the history
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 <damien@micropython.org>
  • Loading branch information
dpgeorge committed Jun 20, 2021
1 parent 259d9b6 commit bbf9dd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/esp32/boards/sdkconfig.base
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bbf9dd8

Please sign in to comment.