Fix demo compilation

This commit is contained in:
Michal Sieron 2021-08-17 11:24:57 +02:00
parent befd9c0e4c
commit 72e7eac0ef
4 changed files with 10 additions and 9 deletions

View File

@ -3,7 +3,7 @@ BUILD_DIR?=../build/
include $(BUILD_DIR)/software/include/generated/variables.mak include $(BUILD_DIR)/software/include/generated/variables.mak
include $(SOC_DIRECTORY)/software/common.mak include $(SOC_DIRECTORY)/software/common.mak
OBJECTS = isr.o donut.o helloc.o main.o OBJECTS = isr.o donut.o helloc.o main.o crt0.o
ifdef WITH_CXX ifdef WITH_CXX
OBJECTS += hellocpp.o OBJECTS += hellocpp.o
endif endif
@ -21,16 +21,17 @@ demo.elf: $(OBJECTS)
$(CC) $(LDFLAGS) \ $(CC) $(LDFLAGS) \
-T linker.ld \ -T linker.ld \
-N -o $@ \ -N -o $@ \
$(BUILD_DIR)/software/libbase/crt0.o \
$(OBJECTS) \ $(OBJECTS) \
-L$(BUILD_DIR)/software/libbase \ $(PACKAGES:%=-L$(BUILD_DIR)/software/%) \
-L$(BUILD_DIR)/software/libcompiler_rt \ $(LIBS:lib%=-l%)
-lbase -lcompiler_rt
chmod -x $@ chmod -x $@
main.o: main.c main.o: main.c
$(compile) $(compile)
crt0.o: $(CPU_DIRECTORY)/crt0.S
$(assemble)
donut.o: CFLAGS += -w donut.o: CFLAGS += -w
helloc.o: CFLAGS += -w helloc.o: CFLAGS += -w

View File

@ -9,7 +9,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <console.h> #include <libutils/console.h>
#define R(mul,shift,x,y) \ #define R(mul,shift,x,y) \
_=x; \ _=x; \

View File

@ -4,7 +4,7 @@
#include <generated/csr.h> #include <generated/csr.h>
#include <generated/soc.h> #include <generated/soc.h>
#include <irq.h> #include <irq.h>
#include <uart.h> #include <libcomm/uart.h>
void isr(void); void isr(void);

View File

@ -6,8 +6,8 @@
#include <string.h> #include <string.h>
#include <irq.h> #include <irq.h>
#include <uart.h> #include <libcomm/uart.h>
#include <console.h> #include <libutils/console.h>
#include <generated/csr.h> #include <generated/csr.h>
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/