Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@
#define LV_DRAW_BUF_STRIDE_ALIGN 1

/** Align start address of draw_buf addresses to this bytes*/
#ifndef LV_DRAW_BUF_ALIGN
#define LV_DRAW_BUF_ALIGN 4
#endif

/** Using matrix for transformations.
* Requirements:
Expand Down Expand Up @@ -249,14 +251,20 @@
#endif

/** Use NXP's PXP on iMX RTxxx platforms. */
#ifndef LV_USE_PXP
#define LV_USE_PXP 0
#endif

#if LV_USE_PXP
/** Use PXP for drawing.*/
#ifndef LV_USE_DRAW_PXP
#define LV_USE_DRAW_PXP 1
#endif

/** Use PXP to rotate display.*/
#ifndef LV_USE_ROTATE_PXP
#define LV_USE_ROTATE_PXP 0
#endif

#if LV_USE_DRAW_PXP && LV_USE_OS
/** Use additional draw thread for PXP processing.*/
Expand Down
22 changes: 20 additions & 2 deletions micropython.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@

################################################################################
# LVGL port Support
MICROPY_PORT = $(notdir $(CURDIR))

ifeq ($(MICROPY_PORT),unix)
################################################################################
# LVGL unix optional libraries
# Update CFLAGS_USERMOD and LDFLAGS_USERMOD for LVGL extenral library,
# but do that only on the unix port, for unix specific dependencies
ifeq ($(notdir $(CURDIR)),unix)
ifneq ($(UNAME_S),Darwin)
CFLAGS_USERMOD += -DMICROPY_FB=1
endif
Expand Down Expand Up @@ -43,7 +47,21 @@ endif
# LDFLAGS_USERMOD += $(FFMPEG_LDFLAGS_USERMOD)
# endif

endif
endif # unix support

ifeq ($(MICROPY_PORT),mimxrt)
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

# Depending on how the USER_C_MODULE is declared the object files inside build can be based on
# absolute or relative paths under this directory.
MOD_ABSPATH := $(abspath $(USERMOD_DIR))
MOD_DIRNAME := $(notdir $(MOD_ABSPATH))
$(BUILD)/$(MOD_ABSPATH)/lvgl/src/draw/nxp/pxp/lv_draw_pxp.o: CFLAGS_USERMOD += -Wno-error=unused-variable
$(BUILD)/$(MOD_DIRNAME)/lvgl/src/draw/nxp/pxp/lv_draw_pxp.o: CFLAGS_USERMOD += -Wno-error=unused-variable
$(BUILD)/$(MOD_ABSPATH)/lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.o: CFLAGS_USERMOD += -Wno-error=float-conversion
$(BUILD)/$(MOD_DIRNAME)/lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.o: CFLAGS_USERMOD += -Wno-error=float-conversion

endif # mimxrt support

################################################################################

Expand Down
Loading