I read the section about Zephyr in the online documentation, and it seems like LVGL is already integrated with Zephyr.
However, in practice, when I was writing the CMake build project, I found that the CMake for Zephyr in LVGL couldn’t run.
At least in the path within modules\lvgl\env_support\cmake\zephyr.cmake (${ZEPHYR_BASE}/lib/gui/lvgl), it has already been removed from Zephyr.
This was in the commit titled “lvgl: move the lvgl glue out of the zephyr tree.”
Does this mean I need to manually write the CMake for LVGL to build the Zephyr project?
LVGL already integrated in Zephyr. If you need to use it in your own project you should configure LVGL as needed (use CONFIG_LV_…). As an example of using LVGL you can see lvgl-demo-sample located zephyr\samples\modules\lvgl\demos
. You can examine prj.conf
and how to build user-application in main.c
.
UPD: also I will recomend to read Zephyr’s Getting Started Guide & Application Development which describe how to create user application in Zephyr.
In short, you don’t need to create cmake prj. Zephyr project should have structure where should be: CMakeLists.txt
(to describe user files and cmake configuration), prj.conf
(to configure system - kernel, peripheral, used libs, etc), and user application files. After that use west
command to build (flash) you application.
Thank you very much. Due to compatibility issues with the existing project, I may not be able to use the standard method of integrating lvgl directly. However, the cmake in the demo and module related to lvgl is very helpful.