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
6 changes: 6 additions & 0 deletions micropython.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

# This file is to be given as "make USER_C_MODULES=..." when building Micropython port

if(ECHO_SUBMODULES)
list(APPEND GIT_SUBMODULES ${CMAKE_CURRENT_LIST_DIR}/lvgl ${CMAKE_CURRENT_LIST_DIR}/pycparser)
elseif(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/lvgl/README.md)
message(FATAL_ERROR " lvgl not initialized.\n Run 'make BOARD=${MICROPY_BOARD} submodules'")
endif()

# Include LVGL component, ignore KCONFIG
separate_arguments(LV_CFLAGS_ENV UNIX_COMMAND $ENV{LV_CFLAGS})

Expand Down
9 changes: 9 additions & 0 deletions micropython.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,12 @@ SRC_USERMOD_LIB_C += $(shell find $(LVGL_DIR)/examples -type f -name "*.c")
endif

SRC_USERMOD_C += $(LVGL_MPY)

# include lvgl submodule check in the micropython submodules rule.
LVGL_SUBMODULES = lvgl pycparser
submodules: lvgl_submodule
lvgl_submodule:
$(ECHO) "Updating submodules: $(LVGL_SUBMODULES)"
$(Q)cd $(LVGL_BINDING_DIR) && git submodule sync $(LVGL_SUBMODULES)
$(Q)cd $(LVGL_BINDING_DIR) && git submodule update --init $(LVGL_SUBMODULES)
.PHONY: lvgl_submodule
Loading