lvgl / lv_web_emscripten

LVGL ported to Emscripten to be converted to JavaScript
MIT License
80 stars 28 forks source link

Why does it build TFT drivers and not just SDL? #18

Closed sukesh-ak closed 1 year ago

sukesh-ak commented 1 year ago

Why does it build TFT drivers and not just SDL?


make: make -j4
[  1%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/ILI9341.c.o
[  1%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/R61581.c.o
[  1%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/GC9A01.c.o
[  1%] Building C object lvgl/CMakeFiles/lvgl.dir/src/core/lv_disp.c.o
shared:INFO: (Emscripten: Running sanity checks)
ports:INFO: retrieving port: sdl2 from https://github.com/libsdl-org/SDL/archive/release-2.24.2.zip
ports:INFO: unpacking port: sdl2
cache:INFO: generating port: sysroot/lib/wasm32-emscripten/libSDL2.a... (this will be cached in "/home/cuteghost/lvgl/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libSDL2.a" for subsequent builds)
system_libs:INFO: compiled 115 inputs
cache:INFO:  - ok
[  1%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/SHARP_MIP.c.o
[  2%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/SSD1963.c.o
[  2%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/ST7565.c.o
[  2%] Building C object lvgl/CMakeFiles/lvgl.dir/src/core/lv_event.c.o
[  2%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/UC1610.c.o
[  2%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/drm.c.o
[  3%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/fbdev.c.o
[  4%] Building C object lvgl/CMakeFiles/lvgl.dir/src/core/lv_group.c.o
[  4%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/display/monitor.c.o
[  4%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/gtkdrv/gtkdrv.c.o
[  4%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/indev/AD_touch.c.o
[  4%] Building C object lvgl/CMakeFiles/lvgl.dir/src/core/lv_indev.c.o
[  4%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/indev/FT5406EE8.c.o
[  4%] Building C object lvgl/CMakeFiles/lvgl.dir/src/core/lv_indev_scroll.c.o
[  5%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/indev/XPT2046.c.o

Side note, there is a warning as well

lv_web_emscripten/lvgl/demos/benchmark/lv_demo_benchmark.c:694:99: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
        lv_label_set_text_fmt(title, "%"LV_PRId32"/%d: %s%s", scene_act * 2 + (opa_mode ? 1 : 0), (sizeof(scenes) / sizeof(scene_dsc_t) * 2) - 2,  scenes[scene_act].name, opa_mode ? " + opa" : "");
                                                   ~~                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                   %lu
kisvegabor commented 1 year ago

Why does it build TFT drivers and not just SDL?

It build all the C files for the sake of simplicity however the content of the unrelated files are "disabled" with #if LV_USE_... statements.

Side note, there is a warning as well

I've fixed it here https://github.com/lvgl/lvgl/commit/1173dcba96621e20c9a7240c8572bd6573bce6a0

sukesh-ak commented 1 year ago

Why does it build TFT drivers and not just SDL?

It build all the C files for the sake of simplicity however the content of the unrelated files are "disabled" with #if LV_USE_... statements.

Side note, there is a warning as well

I've fixed it here lvgl/lvgl@1173dcb

Thank you.