From 0369aa35c7ce7f989ca9d92470e5f82ebad28780 Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Wed, 24 May 2023 12:33:05 +0800 Subject: [PATCH] bsp,abstract-machine: add main() to call entry() * this flow is similar with qemu-riscv-virt64 * there is still a lot of linking error --- bsp/abstract-machine/Makefile | 2 +- bsp/abstract-machine/src/init.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 bsp/abstract-machine/src/init.c diff --git a/bsp/abstract-machine/Makefile b/bsp/abstract-machine/Makefile index 8ecdb37..9818028 100644 --- a/bsp/abstract-machine/Makefile +++ b/bsp/abstract-machine/Makefile @@ -4,7 +4,7 @@ FILE_TMP = .tmp.$(FILE_MK) RTCONFIG_H = rtconfig.h NAME = rtthread -SRCS = +SRCS = $(shell find src -name "*.c") CFLAGS += -DHAVE_CCONFIG_H -D__RTTHREAD__ -include $(FILE_MK) include $(AM_HOME)/Makefile diff --git a/bsp/abstract-machine/src/init.c b/bsp/abstract-machine/src/init.c new file mode 100644 index 0000000..7742a96 --- /dev/null +++ b/bsp/abstract-machine/src/init.c @@ -0,0 +1,5 @@ +int main() { + extern int entry(void); + entry(); + return 0; +}