summaryrefslogtreecommitdiff
path: root/fw/fe310/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/test/Makefile')
-rw-r--r--fw/fe310/test/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/fw/fe310/test/Makefile b/fw/fe310/test/Makefile
new file mode 100644
index 0000000..8476db8
--- /dev/null
+++ b/fw/fe310/test/Makefile
@@ -0,0 +1,24 @@
+include ../common.mk
+
+CRYPTO_DIR = ../../../crypto
+
+CFLAGS += -I.. -I../eos -I../bsp/include -I../bsp/drivers -I$(CRYPTO_DIR)
+LDFLAGS = $(CFLAGS) -L.. -Wl,--gc-sections -nostartfiles -nostdlib -Wl,--start-group -lc -lm -lgcc -leos -Wl,--end-group -T../bsp/default.lds
+
+DEPS = main.o status.o cell_dev.o cell_pdp.o phone.o modem.o wifi.o cam.o fs.o test.o
+TARGET = phone
+
+all: $(TARGET)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+$(TARGET): $(DEPS)
+ $(CC) $(DEPS) $(LDFLAGS) -o $@
+
+clean:
+ rm -f *.o *.a $(TARGET)
+
+upload: $(TARGET)
+ ../bsp/upload --elf ./$(TARGET) --openocd $(RISCV_OPENOCD_HOME)/bin/openocd --gdb $(RISCV_HOME)/bin/riscv64-unknown-elf-gdb --openocd-config ../bsp/openocd.cfg
+