ERROR lv_bindings/driver/generic/modlvindev.c

I started by forking lv_micropython (GitHub - fstengel/lv_micropython: Micropython bindings to LittlevGL for Embedded devices, Unix and JavaScript), followign the usual method (git clone-recurse-submodules xxx etc.) and then followed what is exposed in the post linked below

ESP32 Micropython build errors... LOTS - #22 by embeddedt

If you’d like to update lv_micropython manually, you should be able to clone it and then run the following commands:

git remote add micropython https://github.com/micropython/micropython.git
git fetch micropython
git merge micropython/master

It’s quite possible you’ll have to resolve some merge conflicts but that will give you all of the latest changes in Micropython.

I modified the offending files and pushed the whole lot to my repo. You can start with this repo. But your work is not finished.

Now, there are 5 files that are part of the lv_bindings submodule. I can modify them, but I do not know how to push them (and I dare not messing up the lv_bindings repo…) the files are (the root is lv_bindings):

  • gen/gen_mpy.py
  • driver/generic/modlvindev.c
  • driver/esp32/modILI9341.c
  • driver/esp32/modrtch.c
  • driver/esp32/modxpt2046.c

In those files I had to:

  1. search for mp_obj_new_exception_msg (there are two variations) and place a (mp_rom_error_text_t) before the string that appears as a second argument
  2. in gen_mpy.py search for mp_instance_cast_to_native_base and replace it with mp_obj_cast_to_native_base.

As far as I can tell that is all I had to do in order to be able to compile lvgl with micropython/master and esp-idf V4.