“Include lvgl.h in ui.h in a more flexible way” worries me as my code no longer compiles now I have switched to 1.0.4
I now get:
In file included from ui/ui.h:14,
from ui/ui.c:6:
/home/pi/oven2/lvgl.h:25:10: fatal error: src/misc/lv_log.h: No such file or directory
25 | #include “src/misc/lv_log.h”
| ^~~~~~~~~~~~~~~~~~~
I have to say that I hate the way includes are used in lvgl.h I have had nightmares getting LVGL to build and play happy with my own code. I now have a working source tree and am dreading having to upgrade to a newer version of LVGL when it is required by a new release of SLS
I think this discussion should really be in its own thread but for now I need to understand the directory structure required by LVGL.
In the root of my source directory I have the lvgl directory and the lv_drivers directory.
In my makefile I set LVGL_DIR ?= ${shell pwd} which seems wrong as this is not the lvgl directory but the root directory.
I include the lvgl makefiles into my makefile thus:
include $(LVGL_DIR)/lvgl/lvgl.mk
include $(LVGL_DIR)/lv_drivers/lv_drivers.mk
This gives me the error:
In file included from ui/ui_helpers.h:10,
from ui/ui_helpers.c:6:
/home/pi/oven/lvgl.h:25:10: fatal error: src/misc/lv_log.h: No such file or directory
25 | #include “src/misc/lv_log.h”
| ^~~~~~~~~~~~~~~~~~~
If I change LVGL_DIR to LVGL_DIR ?= ${shell pwd}/lvgl and change the includes:
include $(LVGL_DIR)/lvgl.mk
include lv_drivers/lv_drivers.mk
I then get:
/home/pi/oven/lvgl/lvgl.mk:8: /home/pi/oven/lvgl/lvgl/src/widgets/lv_widgets.mk: No such file or directory
make: *** No rule to make target ‘/home/pi/oven/lvgl/lvgl/src/widgets/lv_widgets.mk’. Stop.
This seems to be related to how the lvgl makefile is defined:
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra/extra.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core/lv_core.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/lv_draw.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font/lv_font.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/gpu/lv_gpu.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/hal/lv_hal.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/misc/lv_misc.mk
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/widgets/lv_widgets.mk
I think it was because I have having problems with code not being able to find lvgl.h and I could only make it work if I moved lvgl.h into that top level directory
Font manager issue. Try to create a custom font with the parameters like in the pic. attached. SLS generate error if the ‘Symbols’ field have the leading ‘-’ character.