1+ # ###############################################################################
2+ # LVGL port Support
3+ MICROPY_PORT = $(notdir $(CURDIR ) )
14
5+ ifeq ($(MICROPY_PORT ) ,unix)
26# ###############################################################################
37# LVGL unix optional libraries
48# Update CFLAGS_USERMOD and LDFLAGS_USERMOD for LVGL extenral library,
59# but do that only on the unix port, for unix specific dependencies
6- ifeq ($(notdir $(CURDIR ) ) ,unix)
710ifneq ($(UNAME_S ) ,Darwin)
811CFLAGS_USERMOD += -DMICROPY_FB=1
912endif
@@ -15,7 +18,7 @@ CFLAGS_USERMOD += $(SDL_CFLAGS_USERMOD) -DMICROPY_SDL=1
1518LDFLAGS_USERMOD += $(SDL_LDFLAGS_USERMOD )
1619endif
1720
18- # Avoid including unwanted local headers other than sdl2
21+ # Avoid including unwanted local headers other than sdl2
1922ifeq ($(UNAME_S ) ,Darwin)
2023CFLAGS_USERMOD: =$(filter-out -I/usr/local/include,$(CFLAGS_USERMOD ) )
2124endif
4346# LDFLAGS_USERMOD += $(FFMPEG_LDFLAGS_USERMOD)
4447# endif
4548
46- endif
49+ endif # unix support
50+
51+ ifeq ($(MICROPY_PORT ) ,mimxrt)
52+ CFLAGS_USERMOD += -DLV_USE_PXP=1 -DLV_USE_DRAW_PXP=1 -DLV_USE_GPU_NXP_PXP=1 -DLV_USE_GPU_NXP_PXP_AUTO_INIT=1
53+
54+ MOD_DIRNAME := $(notdir $(abspath $(USERMOD_DIR ) ) )
55+ $(BUILD ) /$(MOD_DIRNAME ) /lvgl/src/draw/nxp/pxp/lv_draw_pxp.o : CFLAGS_USERMOD += -Wno-error=unused-variable
56+ $(BUILD ) /$(MOD_DIRNAME ) /lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.o : CFLAGS_USERMOD += -Wno-error=float-conversion
57+
58+ endif # mimxrt support
59+
4760
4861# ###############################################################################
4962
@@ -76,7 +89,7 @@ CFLAGS_USERMOD += -DLV_CONF_PATH='"$(LV_CONF_PATH)"'
7689# CFLAGS DEBUG
7790$(info CFLAGS_USERMOD is $(CFLAGS_USERMOD))
7891
79- $(LVGL_MPY ) : $(ALL_LVGL_SRC ) $(LVGL_BINDING_DIR ) /gen/gen_mpy.py
92+ $(LVGL_MPY ) : $(ALL_LVGL_SRC ) $(LVGL_BINDING_DIR ) /gen/gen_mpy.py
8093 $(ECHO ) " LVGL-GEN $@ "
8194 $(Q ) mkdir -p $(dir $@ )
8295 $(Q )$(CPP ) $(CFLAGS_USERMOD ) -DPYCPARSER -x c -I $(LVGL_BINDING_DIR ) /pycparser/utils/fake_libc_include $(INC ) $(LVGL_DIR ) /lvgl.h > $(LVGL_PP )
0 commit comments