diff --git a/tests/riscof/Makefile b/tests/riscof/Makefile index 7b2405a70..131d724c4 100644 --- a/tests/riscof/Makefile +++ b/tests/riscof/Makefile @@ -25,7 +25,7 @@ config%.ini: config.ini # Generate riscv-arch-test targets arch%: config$$*.ini | $(work_dir) $(arch_workdir) riscof run --work-dir=$(work_dir)/$@ --config=$< --suite=$(arch_dir)/riscv-test-suite/ --env=$(arch_dir)/riscv-test-suite/env --no-browser - $(MAKE) -f makefile-memfile WORKDIR=$(work_dir)/$@ + $(MAKE) -f makefile-memfile WORKDIR=$(work_dir)/$@ BITWIDTH=$(patsubst %32e,%32,$*) rsync -a $(work_dir)/$@/rv*/* $(arch_workdir)/rv$(patsubst %64,%64i,$(patsubst %32,%32i,$*))_m || echo "error suppressed" # Generate wally-riscv-arch-test targets diff --git a/tests/riscof/makefile-memfile b/tests/riscof/makefile-memfile index 3fabb3b90..6ccdca37c 100644 --- a/tests/riscof/makefile-memfile +++ b/tests/riscof/makefile-memfile @@ -16,8 +16,9 @@ wally-sim-files: $(MEMFILES) $(ADDRFILES) # because elf2hex requires a bit width we use findstring to figure out if the compiled directory # is XLEN=64 or 32. This is hacky and will likely break in the future. # the .addr is a separate target so make can split into more jobs and more parallism. +%.elf.memfile: BITWIDTH ?= $(if $(findstring rv64,$*),64,32) %.elf.memfile: %.elf - riscv64-unknown-elf-elf2hex --bit-width $(if $(findstring rv64,$*),64,32) --input $< --output $@ + riscv64-unknown-elf-elf2hex --bit-width $(BITWIDTH) --input $< --output $@ %.elf.objdump.addr: %.elf.objdump extractFunctionRadix.sh $<