lvgl 9.1.0 with latest esp-idf (5.2)

e-music
Posts: 15
Joined: Thu Jan 17, 2019 5:52 pm

lvgl 9.1.0 with latest esp-idf (5.2)

Postby e-music » Wed May 01, 2024 9:09 pm

Since lvgl 9.1.0 is now natively supported as a component in the ESP32 registry, I have added it using the suggested method:

Code: Select all

idf.py add-dependency "lvgl/lvgl^9.1.0"
And I'm using the following to configure/build the project:

Code: Select all

idf.py menuconfig
idf.py build
So far so good, project compiles without any problems. However, as soon as I try to add components to lvgl, like LCD/Touch, problems arise and the build fails with bunch of errors, missing headers, etc..

I tried to manually add the following: https://github.com/lvgl/lvgl_esp32_drivers

I was able to see all of its options added in the menuconfig, however, I wasn't able to compile the project. The build failed also with bunch of missing dependencies like LEDC.

I was wondering if there's any suggested roadmap when working with latest lvgl + esp-idf.

uC_Jon
Posts: 18
Joined: Fri Jan 05, 2024 7:03 pm

Re: lvgl 9.1.0 with latest esp-idf (5.2)

Postby uC_Jon » Thu May 02, 2024 7:00 pm

I've found that the esp_lvgl_port component makes things much easier with regards "linking" the physical devices (in my case I2C touch and SPI lcd display) to the lvgl 9.1.0 graphics component.

Code: Select all

dependencies:
  idf: ">=5.3"
  lvgl/lvgl: "^9.1"
  espressif/esp_lvgl_port: "^2.0.0"
If you've done work with the lvgl V8+ component(s) be warned: a lot of the code will require re-working due to major breaking changes in the API and widgets available from the fundamental device types - lv_display_t* & lv_indev_t* - to things like the lv_meter being replaced by the lv_scale (which doesn't quite work in the same way).

I have to say that the changes are worth it (and I think the next point release should bring it up to a par with the current 8 version, polished wise) even if I'm having to learn a new way of doing something I only just learned a few months back. But then I'm a hobiest so I can afford to live on the bleeding edge all the time. If I was doing this as a day job I would stick with the 8 versions; especially as they are still getting full support and enhancements.

e-music
Posts: 15
Joined: Thu Jan 17, 2019 5:52 pm

Re: lvgl 9.1.0 with latest esp-idf (5.2)

Postby e-music » Sat May 04, 2024 11:00 pm

In fact, I'm coming from another architecture/framework, and I didn't use lvgl before, so I presume I have no problem to start from scratch with any API version. However, it seems lvgl API has witnessed a lot of major changes that makes portability across them really painful. 7.9, or 8.0, or 9.1.0.

Regarding esp_lvgl_port, you're right. IT would've been probably the best and easiest approach, but as far as I remember, I had issues compiling it. I don't know, I think I did a bunch of changes to the esp-idf itself and to the environment (Linux Ubuntu 20.04)

If esp_lvgl_port is the way to go, do you recommend any specific esp-idf version? Can I compile and build project with the latest esp-idf?

Who is online

Users browsing this forum: Baidu [Spider] and 67 guests