Hey everyone,
I have an existing project built using Platform IO that I want to use LVGL in. I have an IL9341 display hooked up to a custom ESP32 based board. I’ve cloned the lv_port_esp32 repository, have converted it to a Platform IO project using the instructions provided at this link and have managed to get the demo programs working well - however I’ve hit a bit of a road block when trying to get my existing project to just build with LVGL.
I’ve tried to following:
- Add lvgl and lvgl_esp32_drivers as git submodules - I get build errors referring to not finding “main” (my main.cpp file is located in src rather than main).
- Add lvgl as a lib_deps and lvgl_esp32_drivers as a git submodule - I get errors saying lvgl_conf.h doesn’t exist and menuconfig doesn’t show any LVGL component to configure. As I understand it I shouldn’t need lvgl_conf.h because of the KConfig files included? (not 100% sure on that one).
I personally prefer to work inside the Platform IO domain in terms of managing dependencies etc. as it makes working across different developers a lot easier. I’ve been trawling the forums and previously closed issues as there’s a wealth of information but a lot of the examples that use Platform IO use the Arduino framework rather than the IDF.
Any help would be greatly appreciated!
UPDATE
So I managed to deal with some of the issues above. I ended up adding lvgl and lvgl_esp32_drivers to my platform.ini
file like so:
lib_deps = lvgl@7.11.0
lvgl_esp32_drivers=https://github.com/lvgl/lvgl_esp32_drivers
I changed my source directory folder to main
and added src_dir = main
to my platform.ini
file. I also suspect that CMake doesn’t know to look in the libdeps folder for components and so I added it as an additional component directory in my root CMakeLists.txt
file:
list(APPEND EXTRA_COMPONENT_DIRS .pio/libdeps/esp32dev)
I’m now getting errors when trying to build the EVE_commands
file in lvgl_tft
. I don’t think the file is the issue and it’s more my build config that’s causing the problem. Again, any insight into this would be really helpful.