Replies: 5 comments 1 reply
-
I'm not sure if you're running into https://github.com/orgs/micropython/discussions/12294 But perhaps more likely the issue is that you should be using If you have octal spiram though, you also need to configure that, using |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
This is probably due to the new way of allocating the MP heap, which was introduced by the
and in the main.c
The initial MP heap size is 64MB and will grow automatically, read lines 265 to 284 of micropython/py/gc.c For firmware with camera support, I will probably disable this feature and set a fixed MP heap size in ports/esp32/main.c and to leave enough PSRAM for the camera frame buffer and system use. I am sure others will find this feature very useful. Thank you, the core MP developers and maintainers have done a great job implementing this. |
Beta Was this translation helpful? Give feedback.
-
Thanks to both of you and particularly @jimmo for the excellent explication. |
Beta Was this translation helpful? Give feedback.
-
The following is a short report comparing the differences between two firmware versions for the ESP32-S2FN4R2 (4MB Flash, 2MB PSRAM, 320KB SRAM). Firmware-A enables the new dynamic MP heap allocation feature. Firmware-B disables this feature and the MP heap is fixed and set to the largest allocation block (PSRAM block of course). Firmware-A with dynamic MP heap run log:
Firmware-B with a fixed size MP heap run log:
Immediately after rebooting, the largest block of memory that Firmware-A can provide is 1940000 bytes. While Firmware-B can provide 2010000 bytes. The next largest block of memory accessible for Firmware-A is 131072 bytes, which is the largest block of SRAM available! With Firmware-B there are only 4144 bytes left. Firmware-A can access both PSRAM and SRAM. Firmware-B can only access PSRAM. In total, Firmware-A can access more than Firmware-B. In Firmware-B, SRAM can only be accessed by esp-idf tasks, system and user C modules. In Firmware-A, the MP code can initially take up too much memory. This can lead to memory allocation failures for system tasks at a later stage. In Firmware-B, the MP heap size is fixed and the MP code cannot access SRAM. These only apply to ESP32 boards with PSRAM. The dynamic MP heap will work better than the fixed heap on ESP32 boards without PSRAM. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to first simply build micropython with
make board=ESP32_GENERIC_S3
but this creates a build directory build-ESP32_GENERIC (I expected build-ESP32_GENERIC _S3) and it seems to compile for the ESP32 and not the S3.
A fatal error occurred: This chip is ESP32-S3 not ESP32. Wrong --chip argument? when I try to deploy.
How do I build for the ESP32S3 with oct PSRAM?
Beta Was this translation helpful? Give feedback.
All reactions