T113上 使用Tina-linux ,移植百问网lvgl 2048小游戏,可以通过编译,但是运行报错
-
LV_2048文件夹下的Makefileinclude $(TOPDIR)/rules.mk include $(BUILD_DIR)/package.mk include ../sunxifb.mk PKG_NAME:=lv_2048 PKG_VERSION:=8.1.0 PKG_RELEASE:=1 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) define Package/$(PKG_NAME) SECTION:=gui SUBMENU:=Littlevgl CATEGORY:=Gui DEPENDS:=+LVGL8_USE_SUNXIFB_G2D:libuapi +LVGL8_USE_SUNXIFB_G2D:kmod-sunxi-g2d \ +LVGL8_USE_FREETYPE:libfreetype TITLE:=lvgl 2048 endef PKG_CONFIG_DEPENDS := \ CONFIG_LVGL8_USE_SUNXIFB_DOUBLE_BUFFER \ CONFIG_LVGL8_USE_SUNXIFB_CACHE \ CONFIG_LVGL8_USE_SUNXIFB_G2D \ CONFIG_LVGL8_USE_SUNXIFB_G2D_ROTATE define Package/$(PKG_NAME)/config endef define Package/$(PKG_NAME)/Default endef define Package/$(PKG_NAME)/description a lvgl 2048 v8.1.0 endef define Build/Prepare $(INSTALL_DIR) $(PKG_BUILD_DIR)/ $(CP) ./src $(PKG_BUILD_DIR)/ $(CP) ./../lvgl $(PKG_BUILD_DIR)/src/ $(CP) ./../lv_drivers $(PKG_BUILD_DIR)/src/ endef define Build/Configure endef TARGET_CFLAGS+=-I$(PKG_BUILD_DIR)/src ifeq ($(CONFIG_LVGL8_USE_SUNXIFB_G2D),y) TARGET_CFLAGS+=-DLV_USE_SUNXIFB_G2D_FILL \ -DLV_USE_SUNXIFB_G2D_BLEND \ -DLV_USE_SUNXIFB_G2D_BLIT \ -DLV_USE_SUNXIFB_G2D_SCALE endif define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/src\ ARCH="$(TARGET_ARCH)" \ AR="$(TARGET_AR)" \ CC="$(TARGET_CC)" \ CXX="$(TARGET_CXX)" \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ all endef define Package/$(PKG_NAME)/install $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ endef $(eval $(call BuildPackage,$(PKG_NAME)))
LV_2048/src 文件夹下的Makefile
# # Makefile # CC ?= gcc LVGL_DIR_NAME ?= lvgl LVGL_DIR ?= ${shell pwd} CFLAGS ?= -O3 -g0 -I$(LVGL_DIR)/ -Wall -Wshadow -Wundef -Wmissing-prototypes -Wno-discarded-qualifiers -Wall -Wextra -Wno-unused-function -Wno-error=strict-prototypes -Wpointer-arith -fno-strict-aliasing -Wno-error=cpp -Wuninitialized -Wmaybe-uninitialized -Wno-unused-parameter -Wno-missing-field-initializers -Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral -Wno-cast-qual -Wunreachable-code -Wno-switch-default -Wreturn-type -Wmultichar -Wformat-security -Wno-ignored-qualifiers -Wno-error=pedantic -Wno-sign-compare -Wno-error=missing-prototypes -Wdouble-promotion -Wclobbered -Wdeprecated -Wempty-body -Wtype-limits -Wshift-negative-value -Wstack-usage=2048 -Wno-unused-value -Wno-unused-parameter -Wno-missing-field-initializers -Wuninitialized -Wmaybe-uninitialized -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wtype-limits -Wsizeof-pointer-memaccess -Wno-format-nonliteral -Wpointer-arith -Wno-cast-qual -Wmissing-prototypes -Wunreachable-code -Wno-switch-default -Wreturn-type -Wmultichar -Wno-discarded-qualifiers -Wformat-security -Wno-ignored-qualifiers -Wno-sign-compare LDFLAGS ?= -lm BIN = lv_2048 #Collect the files to compile SRCDIRS = $(shell find . -maxdepth 1 -type d) MAINSRC = $(foreach dir,$(SRCDIRS),$(wildcard $(dir)/*.c)) include $(LVGL_DIR)/lvgl/lvgl.mk include $(LVGL_DIR)/lv_drivers/lv_drivers.mk include ./lv_lib_100ask/lv_lib_100ask.mk OBJEXT ?= .o AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) OBJS = $(AOBJS) $(COBJS) ## MAINOBJ -> OBJFILES all: default %.o: %.c @$(CC) $(CFLAGS) -c $< -o $@ @echo "CC $<" default: $(AOBJS) $(COBJS) $(MAINOBJ) $(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS) clean: rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
-
@huerli
运行了一下lv_g2d_test也报错
-
@huerli 大佬解决了吗 我也遇到这个问题
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号