Skip to content

Commit 1ad458c

Browse files
committed
test: generate binary format of compiled tests
1 parent 8bcac6b commit 1ad458c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/sw/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ TEST_SRCS_O := $(patsubst $(SRC_DIR)/%,$(OUT_DIR)/tests/%,$(TEST_SRCS_C:.c=.o) $
3636
TEST_ELFS := $(patsubst $(SRC_DIR)/%,$(OUT_DIR)/%,$(TEST_SRCS_C:.c=.elf) $(TEST_SRCS_S:.S=.elf))
3737
TEST_DUMPS := $(TEST_ELFS:.elf=.dump)
3838
TEST_HEXES := $(TEST_ELFS:.elf=.hex)
39+
TEST_BINS := $(TEST_ELFS:.elf=.bin)
3940

4041
.PRECIOUS: $(OUT_DIR)/%.elf $(OUT_DIR)/tests/%.o
4142

@@ -73,7 +74,7 @@ deps: $(DEPS_DIR)/printf
7374
lib: $(OUT_DIR)/libcva6.a
7475

7576
.PHONY: all
76-
all: $(DEPS_DIR)/printf $(TEST_DUMPS) $(TEST_HEXES)
77+
all: $(DEPS_DIR)/printf $(TEST_DUMPS) $(TEST_HEXES) $(TEST_BINS)
7778

7879
.PHONY: clean
7980
clean:
@@ -110,3 +111,6 @@ $(OUT_DIR)/%.dump: $(OUT_DIR)/%.elf
110111

111112
$(OUT_DIR)/%.hex: $(OUT_DIR)/%.elf
112113
$(RV_OBJCOPY) -O verilog $< $@
114+
115+
$(OUT_DIR)/%.bin: $(OUT_DIR)/%.elf
116+
$(RV_OBJCOPY) -O binary $< $@

0 commit comments

Comments
 (0)