Open andreyk72 opened 3 months ago
Well,
it looks I found the solution. The problem was in wrong arguments compiling micropython, as a result it does not see the PSRAM. The right arguments are the following:
make \
BOARD=ESP32_GENERIC_S3 \
BOARD_VARIANT=SPIRAM_OCT \
USER_C_MODULES=../../../../s3lcd/src/micropython.cmake \
FROZEN_MANIFEST=../../../../s3lcd/manifest.py \
clean submodules all
Hi, I have a project Micropython 1.23/esp-idf-v5.2 /s3lcd where I randomly get the following error on calling init() for s3lcd.ESPLCD object. The configuration I use (tft_config.py) is the recommended one for the LilyGo T-Display S3 device.
MemoryError: memory allocation failed, allocating 108800 bytes
After some investigation with esp32.idf_heap_info() i found that the heap size initially is 256k and to the moment of starting main.py only the 147k bytes free left. So when i start relatively basic program that uses s3lcd, aioble, and couple of asyncio extensions i'm basically already in a short of RAM.
What is strange for me that the TTGO S3 device has 8MB PSRAM on board and in theory if this RAM is used somehow by micropython or s3lcd however I don't see it is available by analysing by esp32.idf_heap_info() call.
Is there any way to enable more memory for micropython in the heap? Or maybe compile s3lcd a way it does require less memory with possibly shot down of some features I don't use?