Problem using "demos" with ESP32


I use ESP-IDF 4.3.2 without any IDE and with ESP32 and/or ESP32-S2 as hardware.

I’m trying to “connect” lvgl-8.3.0-dev with lvgl_esp32_drivers for the first time at all. After small changes in some files it works so far.

That’s why I tried to use the demos from the subdirectory “components/lvgl/demos”. I configured everything correctly according to the requirement (in the “sdkconfig” file there are entries “CONFIG_LV_BUILD_EXAMPLES=y”, “CONFIG_LV_USE_DEMO_WIDGETS=y” and “CONFIG_LV_DEMO_WIDGETS_SLIDESHOW=y”).

But when compiling with the command “ build”, the subdirectories “components/lvgl/demos” and “components/lvgl/examples” are not included.

My knowledge of cmake is very modest. However, I checked all the CMake files and can’t figure out why the demos and examples don’t compile.

Can someone help me please?

Thanks in advance.

A small addition: the file “lv_conf.h” exists, is active and is also correctly configured.

I have same question like you, and I figure it out. Because the “demos” directory won’t be compiled and included under esp platform. You can see “lvgl/env_support/cmake/esp.cmake” and you will understand. I also wonder why lvgl don’t compile it.

As usual, I solved this problem myself. As always, the motto here is: Help yourself, otherwise nobody will help you!
The solution is very simple, even with my very modest cmake knowledge!
Now the additional package “lv_demos” is not required anymore, the standard demos will be compiled.

I only have problems allocating memory for objects, although there is enough memory available.
This is terribly annoying, since neither the Eclipse nor the VS Code plugins for ESP-IDF work properly! So I have to tediously debug with “ESP_LOGx” calls… Oh how annoying that is!!!