Support BINARIES_DIR make flag

This commit is contained in:
Jerry Zhao
2024-01-29 11:15:14 -08:00
parent 69a00c4501
commit eb93102f34

View File

@@ -26,6 +26,7 @@ HELP_PROJECT_VARIABLES = \
HELP_SIMULATION_VARIABLES = \
" BINARY = riscv elf binary that the simulator will run when using the run-binary* targets" \
" BINARIES = list of riscv elf binary that the simulator will run when using the run-binaries* targets" \
" BINARIES_DIR = directory of riscv elf binaries that the simulator will run when using the run-binaries* targets" \
" LOADMEM = riscv elf binary that should be loaded directly into simulated DRAM. LOADMEM=1 will load the BINARY elf" \
" LOADARCH = path to a architectural checkpoint directory that should end in .loadarch/, for restoring from a checkpoint" \
" VERBOSE_FLAGS = flags used when doing verbose simulation [$(VERBOSE_FLAGS)]" \
@@ -288,6 +289,10 @@ override get_out_name = $(shell basename $(dir $(1)))
override LOADMEM = 1
endif
ifneq ($(BINARIES_DIR),)
override BINARIES = $(shell find -L $(BINARIES_DIR) -type f -print 2> /dev/null)
endif
#########################################################################################
# build output directory for compilation
#########################################################################################