Lv_micropython build problems

Hello everyone, I’m new to this area, I’m having big problems with building lv_micropython, the problem itself is that there is no up-to-date information about what version this or that Git submodule supports.

What do I have:

  • esp32-s3-whroom-1
  • display st7789
  • esp-idf
  • lv_micropython
  • python 3.12 and 3.9

The problem itself is that initially I tried to build with esp-idf v5.4, the current version for today, I also downloaded the lv_micropython master branch (GitHub - lvgl/lv_micropython: Micropython bindings to LVGL for Embedded devices, Unix and JavaScript) and did not change anything in it, while building there are problems typical (as I understand) version transition errors, for example esp_adc_cal, then read the documentation specifically for the esp32 port (lv_micropython/ports/esp32/README.md at master · lvgl/lv_micropython · GitHub) I saw that esp-idf v4.4 is used (specifically for esp32s3) switched to version 4.4 but during installation I get python errors like:

Collecting gevent<2.0,>=1.2.2 (from gdbgui==0.13.2.0->-r /home/user/esp/esp-idf/requirements.txt (line 22))
  Using cached gevent-1.5.0.tar.gz (5.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [319 lines of output]
      Compiling src/gevent/resolver/cares.pyx because it changed.
      [1/1] Cythonizing src/gevent/resolver/cares.pyx
      performance hint: src/gevent/libev/corecext.pyx:1291:5: Exception check on '_syserr_cb' will always require the GIL to be acquired.
      Possible solutions:

Switched to python version 3.9 and the environment was installed.
After which I went to the lv_micropython directory and did everything according to the instructions:

  1. I activate the esp-idf environment
~/esp-idf/export.sh
Setting IDF_PATH to '/home/user/esp/esp-idf'
Detecting the Python interpreter
Checking "python" ...
Python 3.9.0
"python" has been detected
Adding ESP-IDF tools to PATH...
Using Python interpreter in /home/user/.espressif/python_env/idf4.4_py3.9_env/bin/python

...
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

  idf.py build
  1. Then in the lv_micropython directory
cd lv_micropython
git submodule update --init --recursive lib/lv_bindings

make -C mpy-cross
...
CC ../shared/runtime/gchelper_generic.c
LINK build/mpy-cross
   text	   data	    bss	    dec	    hex	filename
 324740	  13888	    856	 339484	  52e1c	build/mpy-cross
make: выход из каталога «/home/user/work/lv_micropython/mpy-cross»
  1. Switch to the esp32 port
cd ports/esp32
make submodules
make BOARD=GENERIC_S3
  1. And I get a huge error output like
Building C object esp-idf/mai...lv_bindings/driver/esp32/modrtch.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/home/user/work/lv_micropython/lib/lv_bindings/driver/esp32/modrtch.c.oBuilding C object esp-idf/mai.../lv_bindings/driver/esp32/espidf.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/home/user/work/lv_micropython/lib/lv_bindings/driver/esp32/espidf.c.obj bj 
Building C object esp-idf/mai...s/__idf_main.dir/__/__/lv_espidf.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/__/__/lv_espidf.c.obj 
...
/home/user/work/lv_micropython/ports/esp32/build-GENERIC_S3/lv_espidf.c:6526:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     .mp_obj_type = &mp_lv_SH2LIB_DATA_FLAG_type_base,
                    ^
/home/user/work/lv_micropython/ports/esp32/build-GENERIC_S3/lv_espidf.c:6569:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
discarded-qualifiers]
     .mp_obj_type = &mp_lv_SH2LIB_DATA_RECV_type_base,
                    ^
cc1: some warnings being treated as errors
[1418/1733] Building C object esp-idf/...Files/__idf_main.dir/__/__/lv_mp.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [Makefile:52: all] Ошибка 1

I’ve been struggling with this for two weeks now and I can’t put it together, no matter what I tried (and tried to use legacy export, but for some reason it doesn’t export normally).

Moreover, if you assemble it simply like make, it assembles normally, but you can’t flash it, I would like to compile it specifically for esp32s3

The main problems are that the documentation does not indicate anywhere which current version of this or that software to use for assembly and I do not understand how to assemble correctly.

the “official” binding does not support the ESP32-S3 series of MCU’s. There is an unofficial binding that does which can be downloaded from here

2 Likes

Thank you very much for your answer! Could you please tell me where to find up-to-date information about the payments used and the versions of micropython and lvgl to collect all the official repositories cloned?