add sample program of lvgl over PEG for 5gen brain

This commit is contained in:
2026-09-21 17:19:29 +09:00
parent d48949419e
commit 5f97124e9d
13 changed files with 2666 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
include lvgl/lvgl.mk
CROSS_COMPILE:=arm-none-eabi-
AS:=$(CROSS_COMPILE)as
CC:=$(CROSS_COMPILE)gcc
STRIP:=$(CROSS_COMPILE)strip
OBJCOPY:=$(CROSS_COMPILE)objcopy
CFLAGS = -static -fno-pic -fno-pie -no-pie -marm -mcpu=cortex-a7 -O0 -I. -U__linux__ -fno-builtin-free
LDFLAGS = -nostdlib -marm -Llibbrain -lbrain -lgcc
LDFLAGS += -T linker.ld
SRCS = main.c
SRCS += $(CSRCS)
OBJS = $(SRCS:.c=.o)
OBJS := $(OBJS:.S=.o)
TARGET = AppMain.bin
LIBBRAIN = libbrain/libbrain.a
all: $(TARGET)
%.o: %.S
$(CC) $(CFLAGS) -c $< -o $@
$(LIBBRAIN):
$(MAKE) -C libbrain
$(TARGET): $(OBJS) $(LIBBRAIN)
@$(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) -o AppMain.elf
@$(OBJCOPY) -O binary AppMain.elf $(TARGET)
clean:
rm -f $(OBJS) $(TARGET) AppMain.elf
$(MAKE) -C libbrain clean