Need help understanding ESP32 Memory allocation error

I’m using GitHub - lvgl-micropython/lvgl_micropython: LVGL module for MicroPython to build and deploy MP to my esp32, because it has out of the box support for the st7796. I’ve also had this error using standard lvgl micropython install as well. Here’s the file I’m attempting to run:
main.py (1.2 KB)

The device I’m attempting to use is a Lilygo T-relay board.

The issue I’m up against is that I’m getting memory allocation errors like the following

Traceback (most recent call last):
  File "<stdin>", line 45, in <module>
  File "display_driver_framework.py", line 106, in __init__
MemoryError: memory allocation failed, allocating 1074957852 bytes

Or this one

Traceback (most recent call last):
  File "<stdin>", line 45, in <module>
  File "display_driver_framework.py", line 187, in __init__
MemoryError: memory allocation failed, allocating 1065360840 bytes

Before you tell me that a 320x480 screen could be an issue there are two factors that make me wonder if it might not be the screen or resolution directly.

  1. The out of memory error shows that it’s trying to use more than 1gb of memory. Which is quite a lot higher than a 320x480 image displayed on the screen.
  2. I was able to use the screen without issue via the TFT_Espi library.

As I’m sure you’ve no doubt noticed, I’m a complete newcommer to micropython, the esp32, as well as LVGL. So there’s a high likelihood I’ve missed something. What am I doing wrong?

OK I can say this for sure. You are using an old version of the binding or the display_driver_framework.py files has been modified. The referenced line numbers in the traceback do not point to any place where any memory is being allocated.