From eb93102f34d27955abffc88e2578e9c70b8b2c94 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Mon, 29 Jan 2024 11:15:14 -0800 Subject: [PATCH] Support BINARIES_DIR make flag --- variables.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/variables.mk b/variables.mk index fc2fc127..63519983 100644 --- a/variables.mk +++ b/variables.mk @@ -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 #########################################################################################