Description
I’ve run the simulator via CMake from this example GitHub - lvgl/lv_port_pc_eclipse: PC simulator project for LVGL embedded GUI Library. Recommended on Linux and Mac. and it looks great!
When using a release version in my project:
FetchContent_Declare(
lvgl
GIT_REPOSITORY https://github.com/lvgl/lvgl.git
GIT_TAG v8.2.0
)
I’ve noted that I don’t seems to have a src/dev
folder. Indeed, if I select the 8.2 branch on GitHub it also does not contain this folder.
I tried the main branch, but some prototypes have changed and I’m not certain I want to find out how deep the rabbit hole goes. Besides, it feels bad to use a different version of LVGL in the simulator vs actual product.
So, I’m curious how to get the simulator dependencies at tag v8.2.0.
What MCU/Processor/Board and compiler are you using?
NRF52840 Zephyr 3.2.0 Zephyr GNU (all working perfectly, the question is in regards to the SDL2 simulator, so native build.)
What LVGL version are you using?
v8.2.0
What do you want to achieve?
Simulator
What have you tried so far?
I am compiling v8.2.0 library just fine. My issue is related to missing includes like
#include "src/dev/sdl/lv_sdl_window.h"
#include "src/dev/sdl/lv_sdl_mouse.h"
#include "src/dev/sdl/lv_sdl_mousewheel.h"
#include "src/dev/sdl/lv_sdl_keyboard.h"
And therefore missing functions like lv_sdl_window_create
Code to reproduce
Clone this repo: GitHub - lvgl/lv_port_pc_eclipse: PC simulator project for LVGL embedded GUI Library. Recommended on Linux and Mac.
Verify that it works as expected:
cmake -B build -G Ninja && cmake --build build && ./bin/main
Modify .gitmodules of this repo to checkout v8.2:
[submodule "lvgl"]
path = lvgl
url = https://github.com/lvgl/lvgl.git
branch = release/v8.2
Update the dependency:
git submodule update --remote
Verify that your lvgl
folder is now missing src/dev
(I’m not saying it’s not intentional, just trying to understand!)
Verify build failure for simulator on release branch:
cmake -B build -G Ninja && cmake --build build --clean-first && ./bin/main
[7/399] Building C object CMakeFiles/main.dir/mouse_cursor_icon.c.o
FAILED: CMakeFiles/main.dir/mouse_cursor_icon.c.o
/usr/bin/cc -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -I/home/jp/repos/lv_port_pc_eclipse -I/usr/include/SDL2 -isystem /home/jp/repos/lv_port_pc_eclipse/lvgl -isystem /home/jp/repos/lv_port_pc_eclipse/lvgl/examples -isystem /home/jp/repos/lv_port_pc_eclipse/lvgl/demos -std=gnu11 -MD -MT CMakeFiles/main.dir/mouse_cursor_icon.c.o -MF CMakeFiles/main.dir/mouse_cursor_icon.c.o.d -o CMakeFiles/main.dir/mouse_cursor_icon.c.o -c /home/jp/repos/lv_port_pc_eclipse/mouse_cursor_icon.c
/home/jp/repos/lv_port_pc_eclipse/mouse_cursor_icon.c:49:16: error: ‘LV_COLOR_FORMAT_ARGB8888’ undeclared here (not in a function)
49 | .header.cf = LV_COLOR_FORMAT_ARGB8888,
| ^~~~~~~~~~~~~~~~~~~~~~~~
[24/399] Building C object CMakeFiles/main.dir/main.c.o
FAILED: CMakeFiles/main.dir/main.c.o
/usr/bin/cc -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -I/home/jp/repos/lv_port_pc_eclipse -I/usr/include/SDL2 -isystem /home/jp/repos/lv_port_pc_eclipse/lvgl -isystem /home/jp/repos/lv_port_pc_eclipse/lvgl/examples -isystem /home/jp/repos/lv_port_pc_eclipse/lvgl/demos -std=gnu11 -MD -MT CMakeFiles/main.dir/main.c.o -MF CMakeFiles/main.dir/main.c.o.d -o CMakeFiles/main.dir/main.c.o -c /home/jp/repos/lv_port_pc_eclipse/main.c
/home/jp/repos/lv_port_pc_eclipse/main.c:17:10: fatal error: lvgl/src/dev/sdl/lv_sdl_window.h: No such file or directory
17 | #include "lvgl/src/dev/sdl/lv_sdl_window.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.