diff options
author | Uros Majstorovic <majstor@majstor.org> | 2022-08-09 23:07:38 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2022-08-09 23:07:38 +0200 |
commit | b45c75151af9e31c2016fa30dc071f9695d6369c (patch) | |
tree | 590651bd3c37d0cb74a7414637b370d286368ff0 /fw/fe310/test/Makefile | |
parent | 76ed6228dc0b88840d01f99761ca09323bf11c51 (diff) |
fixed test
Diffstat (limited to 'fw/fe310/test/Makefile')
-rw-r--r-- | fw/fe310/test/Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/fw/fe310/test/Makefile b/fw/fe310/test/Makefile new file mode 100644 index 0000000..fedd417 --- /dev/null +++ b/fw/fe310/test/Makefile @@ -0,0 +1,33 @@ +include ../common.mk +DEPS = main.o mem.o cell_dev.o phone.o modem.o cam.o fs.o test.o + +lib_eos = eve eos eos-soc eos-dev eos-net eos-ext eos-bsp +lib_ecp = + +# DEPS += ecp.o ecp_init.o audio.o +# lib_ecp += ecp ecpcr ecptr ecptm ecpdir ecpvconn + +CFLAGS += -I$(bsp_dir)/include -I$(bsp_dir)/drivers -I$(ext_dir)/crypto -I$(ext_dir)/fsfat -I$(ecp_dir)/src -I$(ecp_dir)/src/platform/fe310 -I.. +LDFLAGS = app/*.o $(CFLAGS) -L.. -L$(ecp_dir)/build-fe310 -Wl,--gc-sections -nostartfiles -nostdlib -Wl,--start-group -lc -lm -lgcc $(LIBS_ECP) $(LIBS_EOS) -Wl,--end-group -T../bsp/default.lds +LDFLAGS = app/*.o $(CFLAGS) -L.. -L$(ecp_dir)/build-fe310 -Wl,--gc-sections -nostartfiles -nostdlib -Wl,--start-group -lc -lm -lgcc $(addprefix -l,$(lib_eos)) $(addprefix -l,$(lib_ecp)) -Wl,--end-group -T../bsp/default.lds +TARGET = phone + + +all: $(TARGET) + +app_: + (cd app && $(MAKE)) || exit; + +%.o: %.c + $(CC) $(CFLAGS) -c $< + +$(TARGET): app_ $(DEPS) + $(CC) $(DEPS) $(LDFLAGS) -o $@ + +clean: + (cd app && $(MAKE) clean) || exit; + 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 + |