Micropython with lv build problem

Hi,

I tried to include lv_bindings in my own ESP32 port micropython project but I have an error when I try to build it.
Before including the lv_bindings lib, build of micropython was ok.
I try to follow step by step the instructions (copy the lib and modify Makefile + mpconfigport.h). Then I execute the “make” command but I have this error :
Building with ESP IDF v3
make: *** No rule to make target ‘/gen/gen_mpy.py’, needed by ‘build-GENERIC/espidfmod/mp_espidf.c’. Stop.

Thanks if you can help me.

Hi @Patoche5150!
Your reference should be lv_micropython.
lv_micropython is a Micropython v1.12 fork with lvgl bindings which we maintain.
You can either use it directly or compare it to your Micropython fork to see what is missing.

The instructions on the README may not be up to date. After you successfully build your Micropython fork, feel free to send a PR to update the README.

Look at this post ERROR lv_bindings/driver/generic/modlvindev.c for a way to have lv_mycroptyhon with an up to date microPython. Most of the merge conflcts are trivial. One thing though : I used V4 of the idf.

One can even have an up-to date lvgl, by following the same method as for microPython. lvgl is in buried in the lib folder.

Hi @fstengel and @amirgon,
Thank you so much for your answers and I apologize for leaving all this time since our last exchanges.
Following your advice, I did some tests.
First, I used IDF-V4 on all my projects, it’s OK.
Then I tried to update micropython parts from lv_micropython as explain by @fstengel and it’s OK. I have now to merge my owns libraries.

However, I would like to successfully build the adding of LVGL library on original micropython source and it’s almost good. With Beyond Compare software, I checked all the differences, modify the 5 files as explain on the previous method and build with IDF-V4. The building is ok but I don’t know why, micropython REPL access doesn’t work.
If I succeed in doing so, I’ll share my process.

Thank you

Hi @Patoche5150 did you manage to add the lv_binding to your project? I already tried comparing with lv_micropython and successfully compiled without any error. However, when I try to import lvgl in the shell it doesn’t recognize.

Perhaps you have same experience?
Thanks!