lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
237 stars 156 forks source link

Use of mp_obj_type_t Incompatible with latest micropython? #258

Closed nord0296 closed 1 year ago

nord0296 commented 1 year ago

I have the lv_micropython building and running on a Pico W with Waveshare 2.8" ResTouch and realized the Pico W board was not in the lv_micropython fork as it was too old (I built for just Pico).

Rather than pulling in the board details to the lv_micropython fork, I tried to add the lv_binding_micropython submodule to a new clone of the latest micropython main repo.

I don't believe I have made any significant mistakes yet, but in trying to get it to build I'm seeing numerous errors that seem to imply the lv_bindings lib is not compatible with their allocation for mp_obj_type anymore.

The build errors helpfully (?) point to the wiki - https://github.com/micropython/micropython/wiki/Build-Troubleshooting and chasing it a little make it look like the code generated by gen_mpy.py is unaware of this change and using prior syntax (prior to https://github.com/micropython/micropython/pull/8813)

Please let me know if I am mistaken in my analysis. Maybe if I want build a fairly up to date PicoW build I need to take another approach?

amirgon commented 1 year ago

lv_micropython is aligned to latest Micropython release, which is 1.19, not to Micropython head on git. We are aware that Micropython recently changed some APIs and is not backward compatible. When a new Micropython version is released, we will fix lv_micropython accordingly.

Until then, you can try using https://github.com/lvgl/lv_binding_micropython/pull/242 which contains at least some of the fixes needed.