Is it just me, or is LVGL challenging to get running on Arduino IDE for ESP32S3 1.28" display?

Hi, newby here. I’m working through this demo: https://www.youtube.com/watch?v=5LuIpnN7eks

…trying to get LVGL working with an ESP32S3 1.28" display.

Is it just me, or do a lot of people have issues just getting the LVGL samples to compile in the Arduino IDE? So far I’ve had about five compile issues, ranging from:
error: ‘lv_indev_drv_t’ does not name a type; did you mean ‘lv_indev_data_t’ (a gazillion of these)
to
error: ‘lv_indev_drv_register’ was not declared in this scope
to
error: variable or field ‘my_disp_flush’ declared void
to
error: ‘my_touchpad_read’ was not declared in this scope
…and many, many more.

Is the code on the github (GitHub - lvgl/lvgl: Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.) the right code to use, and is any regression testing performed prior to publishing to detect conflicts with prior versions, or are new versions just randomly deployed which cause errors in examples/code written in past versions because a variable or function name was changed?

Not trying to ruffle feathers or offend, just trying to understand why nothing with LVGL seems to compile without errors, even with following the ‘copy demos from lvgl directory to src directory’ (are we still doing that?) kind of oddities.

Thanks in advance for guidance.

Hi @jobo722

No offense, but I’m not sure what kind of newbie you are—whether it’s with the LVGL framework or C compilation in general. If you’re just starting with embedded development and want to create some cool UIs using LVGL but run into compilation errors, I suggest taking some time to understand what these errors mean and how compilation works. This knowledge will be really helpful later when you work on other frameworks or projects. Otherwise, even if you manage to bypass this compilation error by following a guide online, you’ll likely run into another one soon.

If you’re already experienced in embedded development but aren’t sure how to integrate LVGL with your project, I understand your struggle. To be honest, I’m not a fan of IDEs like Arduino because they hide what’s happening behind the scenes, and when issues arise, it’s hard to know where to start debugging. I’ve never used Arduino myself, and questions like yours can be tough for others to answer clearly.

Just this afternoon, I tried integrating the latest version of LVGL into my Pico RP2040 project as a fun exercise using CMake. For me, it wasn’t too difficult, as long as you understand some compilation concepts. I believe LVGL also provides a way to integrate via Makefile, though I haven’t tried that yet.

Recently, I also try with my home stm32f4 board, it also quite easy. You can have a look at here

Happy learning !!!

dchithinh, thanks for the reply…I appreciate it. While I’m not an Arduino/ESP32 expert by any means, I’ve worked in a hobby sense with both for around 10 years, so I’m familiar w/ the fundamental structure. My question is specifically about LVGL regarding the version incompatibility. One example is the Wondershare ESP32-S3 1.28" display sample code (from their wiki) notes that it will only work with LVGL v8.3.10, which I’ve found to be true. I’m using this as an example, because the easy answer would be ‘well, Wondershare needs to upgrade their configuration to support LVGL latest 9.3.0’…but the issue isn’t isolated to Wondershare. It’s almost like, as stated above that LVGL haphazardly deploys new versions, deprecating old functions, renaming objects which render any samples generated in prior versions useless. This also means that I need to turn my Arduino IDE ‘auto-update library’ functions off, as if it is on auto-updating the LVGL library will, again, render prior code obsolete, generating tons of compilation errors. Maybe changing from Arduino IDE to another platform would help with the debugging…but the bigger question I’m asking is…why are there so many compilation errors in the first place that have to be debugged in order for some pretty basic examples and code to be used…wondering if there is any regression testing going on with LVGL at all, or is it more of a ‘deploy and hope for the best…they’ll figure out what changed’ approach. I’ve read a lot on this forum and see frequent ‘tried it for two weeks, moving on to XX’ responses, hoping that I’m missing something with respect to the cause of extensive cases where newer versions of LVGL render a ton of online examples case studies in debugging compilaiton errors.

Yeah, Understandable.
One of my colleagues used LVGL for a hobby project, and he told me it’s a great UI library to experiment with. The only drawback, according to him, is that the versions change so quickly — which he doesn’t really like. Haha.

At the end of the day, it’s just our hobby, so no need to stress. We’ll mess around, break things, fix them, and pick up some cool skills along the way.

Happy learning!!!
Even though I didn’t help much in your case

I don’t have any guidance for you, but yes, it’s been very challenging for me too. I have a Waveshare ESP32-C6-Touch-LCD-1.47. I’ve been trying off and on for months using the Squareline Studio app to make anything just compile. I’ve resorted to asking ChatGPT for help. At times it’s been very helpful, and other times it got me spinning in circles with false information, screwing everything up. That’s what happens when you give up your mind to AI. I’m trying to think for myself more again.
I can download and run, ready-to-run examples provided by Waveshare, so I know the board and display work fine. My problem is when I try to compile my .ino file with include statements like:
#include <lvgl.h> and #include “src/ui/ui.h” for the lvgl I get tons of error messages because the compiler can’t find the files. An experienced programmer would probably be disgusted with my inability to figure these error messages out, but I’ve tried, and I get pretty confused. Not to blame others, but some documentation says to create the folder structures one way, and other docs say to create it another way. And then there was the hard lesson when I exported the code from Squareline Studio; it just deletes everything in the folder, including your .ino file. I had it saved elsewhere, but it scared me. Actually, since then I’ve learned to change the directory structure and change my Squareline export destination to prevent this. Despite all this, I still get compile errors. Most if not all errors at this point have been all about paths. I’ve read that the Arduino IDE compiler has different rules for finding files at compile time than other apps apparently.
I know your post was from months ago, but if you read this and you’re still pursuing this, I wouldn’t mind corresponding with you a bit.

“Challenging” to say the least… I’ve spent a week learning it, enough to get going. And two weeks beating my head against the wall.
I’m going to try Sqareline and see if I have better luck. Initially, I got a screen with an arc with the pointer like I wanted, took about 60 seconds. Don’t know if it’ll load or not… plus I have the front end and more learning to do.
('ve had luck with more basic stuff, but stuff that “should work” isn’t, and there’s no clues… So, depends on what you’re trying to do. I know I’m trying to dive in further than I should at first, but the stuff I’m doing really isn’t all “that” hard (image on an arc).
Always good to learn new stuff though, you should always learn at least one new thing a day. i live for those “Eureka!” moments. But dang, getting there sometimes…

Hi @jobo722

LVGL uses semantic versioning https://semver.org/ meaning that between two major version 8.X.Y → 9.X.Y there will be differences and that is to be expected

If you’re following a guide for v8.3, you need to use the v8.3 version of the library or you’ll just encounter issues like the ones describing

Just use a compatible version with the guide you’re following and you shouldn’t have any issues

In addition to the conversation, quite a few examples from Waveshare are based on LVGL v8 so there is some migration work to do with their examples when trying to run LVGL v9 on Waveshare displays.

I have a round display from Waveshare and had to made some changes to the example so it would be compatible with LVGL v9.

You can check it here: GitHub - giobauermeister/waveshare-round-esp32-lvgl: Template project for Waveshare 2.1 round display with support for LVGL v9 and ESP-IDF v5

I wish I could use the ver 9.x documentation as to me it’s a lot better than ver 8.x, but I’m locked into 8.x.
8.3.11 is the LVGL version that comes up when you select Board Group: “Arduino”, Board: “Arduino with TFT_eSPI” in Squareline Studio, which is what the Waveshare board requires.

I’ve read that some of the issues come from the fact that the Arduino IDE compiler can’t follow relative paths to include files, etc. So I need to work through explicitly specifying paths I guess. But I can’t blame the docs for not being able to decode the error messages. I just have to learn that.

EDIT: I went through the 14 files used in the project, and pasted in full explicit paths to more than 60 #include directives. There must be a way to make everything work with relative paths, but I don’t know how, and this has cleared up the compile errors. Now I can actually try some lvgl code in my .ino file.

I’m not sure I have the time for that. I hope they can get some of this working better with Arduino. I’m backing out to the ArduinoGFX library and building with that instead. I’ll spend more time fixing paths for any use that LVGL provides, it seems.

I’m sorry about your experience, but i’m really not sure about what the problem is unless you provide some more information about your setup

I just tried to see how compatible LVGL is with arduino as someone who doesn’t use Arduino.

I added LVGL v9.4.0 as a library in the library manager, followed the steps in the official LVGL documentation: Arduino - LVGL 9.5 documentation and compiled the example for the ESP32S3, it compiled without any issues

I’m sure someone in the community can help you further if you provide more detailed logs about what went wrong