ESP32 + ili9488

Hello,

I’m trying to build esp32 port of lv_micropython master branch for a GENERIC_SPIRAM using https://github.com/lvgl/lv_micropython wiki guide, in the past i built this port for GENERIC_SPIRAM successfully, when the process ends up I get the error application overflows allocated space, I tried to build using esp-idf v4.1, 4.2, 4.3, I built vanilla micropython successfully so I think that the issue is related to lvgl fork

could you please help me?
Thank you

Hi @Ignazio_Abbate !

Latest lv_micropython builds with esp-idf 4.02 and 4.3.

You can see this on the automated tests that ran on the last commit:

The fork builds Micropython+LVGL so obviously it consumes more resources.
You can control flash allocation by editing partitions.csv

Thank you for your prompt reply,

I tried to build the non spiram version and I get almost the same numbers of automated tests
I have two more doubts:
- almost one month ago it was building, I cannot build because have been aded more things?
- I don’t understand why there is a difference between the two versions (SPIRAM and NOT SPIRAM)
of about 111 kB, is that normal?

I’ve just tried building latest lv_micropython with these arguments:

make -j4 -C ports/esp32 LV_CFLAGS="-DLV_COLOR_DEPTH=16 -DLV_COLOR_16_SWAP=1" BOARD=GENERIC_SPIRAM

It builds successfully:

|| bootloader  @0x001000    23216  (    5456 remaining)
|| partitions  @0x008000     3072  (    1024 remaining)
|| application @0x010000  2356944  (    2352 remaining)
|| total                  2422480

So I’m not sure why you are having difficurlties building it. In any way, I can’t reproduce the problem you are seeing so there must be something different on your side.

  • Did you change or add anything to lv_micropython or LVGL?
  • Did you make any changes in lv_config.h
  • Did you remember to run git submodule update --recursive?
  • Did you try to clean and rebuild?

You can see the difference in mpconfigboard.cmake between the GENERIC board and the SPIRAM board.
It looks like the difference is very small between them (a few configurations related to spi-ram, cache and frequency) so I wound’t expect any significant difference between them.
If you also see this on Micropython upstream (without LVGL), you can ask on the Micropython Forum.

Hello,

I tried to execute your same command on clean clone and I get this result:

bootloader  @0x001000    23600  (    5072 remaining)
partitions  @0x008000     3072  (    1024 remaining)
application @0x010000  2400848  (  -41552 remaining)
ERROR: application overflows allocated space of 2359296 bytes by 41552 bytes

my file sizes are slightly bigger than yours

this is what I do to receive the error:
git clone -b v4.3 --recursive https://github.com/espressif/esp-idf.git
then I run install and source export
after that I clone lv_micropython with git clone --recurse-submodules https://github.com/lvgl/lv_micropython.git
then i run make -C mpy-cross and (to test your same command) make -C ports/esp32 LV_CFLAGS="-DLV_COLOR_DEPTH=16 -DLV_COLOR_16_SWAP=1" BOARD=GENERIC_SPIRAM

I built micropython successfully, maybe there are some version conflicts?

I’m not sure why your sizes are larger.

I tried again with esp-idf v4.3.2, (install, export, etc.) and this is what I get:

|| bootloader  @0x001000    24384  (    4288 remaining)
|| partitions  @0x008000     3072  (    1024 remaining)
|| application @0x010000  2351920  (    7376 remaining)
|| total                  2417456

I’m not sure what you mean by “version conflicts”.

I really don’t know what makes the difference on your side.
But you can still fix that by editing partitions.csv! Just increase factory size and reduce vfs size by the same amount. This would provide more space for the program at the expense of the file system on the flash memory. Then rebuild lv_micropython.
Don’t forget to run make erase after changing the file system size!

(In fact, I needed to update partitions.csv from time to time to accommodate Micropython+LVGL on the same image. Here is an historic example)