In what way are you trying “v1.19.1”?
Did you checkout the v1.19.1 tag of lv_micropython? If you did, it’s very obvious why lvgl module is not found. lv_micropython tags are superset of upstream micropython tags, so checking out v1.19.1 yields pure micropython without LVGL integration.
You should check out either the “master” branch of lv_micropython for LVGL v9 (still under development), or “release/v8” branch for stable version.
By the way, the master branch is based on upstream v1.19 and adds LVGL integration on top of it.
I’ve built ESP32-SPIRAM successfully today, here is my script.
git clone -b v4.4.4 --recursive https://github.com/espressif/esp-idf.git esp-idf-v4.4.4
cd esp-idf-v4.4.4
./install.sh
source export.sh
cd …
git clone https://github.com/lvgl/lv_micropython.git
cd lv_micropython
git submodule update --init --recursive lib/lv_bindings
make -C mpy-cross
cd ./ports/esp32
make submodules
make LV_CFLAGS=“-DLV_COLOR_DEPTH=16” BOARD=GENERIC_SPIRAM
I did that and it’s building but after some tests, my screen need this parameters:
LV_CFLAGS=“-DLV_COLOR_DEPTH=16 -DLV_COLOR_16_SWAP=1” BOARD=GENERIC_SPIRAM
Could you build with COLOR_16_SWAP=1 param ? in my side the build crash.
Regards
Ps i used the branch release/v8. If i have time today i will build master
On the release/v8 i cannot use the SWAP param without crash the build
Of course the stack trace. It is better to understand
What i did:
Same as you example with clone release/v8
cd ./ports/esp32
make submodules
make LV_CFLAGS=“-DLV_COLOR_DEPTH=16 -DLV_COLOR_16_SWAP=1” BOARD=GENERIC_SPIRAM
[ 72%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/home/acam/project/lilypi-micropython/lv_micro/extmod/moduos.c.obj
[ 72%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/home/acam/project/lilypi-micropython/lv_micro/extmod/moduplatform.c.obj
[ 72%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/home/acam/project/lilypi-micropython/lv_micro/shared/runtime/pyexec.c.obj
[ 72%] Generating ../../frozen_content.c
[ 72%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/__/__/frozen_content.c.obj
/home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/frozen_content.c:507:5: error: redeclaration of enumerator 'MP_QSTR_green_h'
MP_QSTR_green_h,
^~~~~~~~~~~~~~~
In file included from /home/acam/project/lilypi-micropython/lv_micro/py/obj.h:33,
from /home/acam/project/lilypi-micropython/lv_micro/py/objint.h:30,
from /home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/frozen_content.c:16:
/home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/genhdr/qstrdefs.generated.h:3735:7: note: previous definition of 'MP_QSTR_green_h' was here
QDEF1(MP_QSTR_green_h, 46121, 7, "green_h")
^~~~~~~~~~~~~~~
/home/acam/project/lilypi-micropython/lv_micro/py/qstr.h:51:35: note: in definition of macro 'QDEF1'
#define QDEF1(id, hash, len, str) id,
^~
/home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/frozen_content.c:508:5: error: redeclaration of enumerator 'MP_QSTR_green_l'
MP_QSTR_green_l,
^~~~~~~~~~~~~~~
In file included from /home/acam/project/lilypi-micropython/lv_micro/py/obj.h:33,
from /home/acam/project/lilypi-micropython/lv_micro/py/objint.h:30,
from /home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/frozen_content.c:16:
/home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/genhdr/qstrdefs.generated.h:3736:7: note: previous definition of 'MP_QSTR_green_l' was here
QDEF1(MP_QSTR_green_l, 46125, 7, "green_l")
^~~~~~~~~~~~~~~
/home/acam/project/lilypi-micropython/lv_micro/py/qstr.h:51:35: note: in definition of macro 'QDEF1'
#define QDEF1(id, hash, len, str) id,
^~
make[3]: *** [esp-idf/main/CMakeFiles/__idf_main.dir/build.make:7675: esp-idf/main/CMakeFiles/__idf_main.dir/__/__/frozen_content.c.obj] Error 1
make[3] : on quitte le répertoire « /home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM »
make[2]: *** [CMakeFiles/Makefile2:4820: esp-idf/main/CMakeFiles/__idf_main.dir/all] Error 2
make[2] : on quitte le répertoire « /home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM »
make[1]: *** [Makefile:136: all] Error 2
/home/acam/project/lilypi-micropython/lv_micro/ports/esp32/build-GENERIC_SPIRAM/frozen_content.c (is it generated?)
The latest version of lv_micropython does not have MP_QSTR_green_h, but release/v8 does. what about build the latest version, you could still use color_swap option with display driver.
The files about release/v8 lv_conf.h (26.4 KB) => modified LV_COLOR to 16 and swap=1 because parameters are not take into account mpconfigport.h (9.3 KB) ili9XXX.py.h (34.3 KB)
For the master branch i have issue during build mpy-cross …
Thanks for your anwser. after attempt and attempt …i built a LV_COLOR_16 Version it working without SWAP_FLAG=1
But it seem CFLAGS parameter is not taking into account … (so strange)
I’m not sure what is the source of the problem you are seeing, I just want to point out that the automated tests on GitHub builds the ESP32 port of lv_micropython without any errors.
For example:
Perhaps you could try to find out the differences between your case vs. the automated test.
Possibly some differences in environment, packages, tooling etc.