From 8dcd5b3551de29beadf87b556db06b5dcdc0767d Mon Sep 17 00:00:00 2001 From: Vincenzo Maisto Date: Tue, 12 Sep 2023 17:40:53 +0200 Subject: [PATCH] Extended sw build for Linux * Added LINUX switch, default LINUX=1 --- apps/.gitignore | 2 + apps/Makefile | 29 +++++-- apps/common/linux.mk | 47 +++++++++++ apps/common/printf.h | 6 ++ apps/common/runtime.h | 28 ++++--- apps/common/runtime.mk | 14 ++-- apps/riscv-tests/benchmarks/Makefile | 12 +-- apps/riscv-tests/benchmarks/common/syscalls.c | 84 ++++++++++--------- apps/riscv-tests/mt/Makefile | 6 +- 9 files changed, 155 insertions(+), 73 deletions(-) create mode 100644 apps/common/linux.mk diff --git a/apps/.gitignore b/apps/.gitignore index ef412f9ba..9bf00c4f9 100644 --- a/apps/.gitignore +++ b/apps/.gitignore @@ -1,2 +1,4 @@ bin common/link.ld +*.o* +data.S* \ No newline at end of file diff --git a/apps/Makefile b/apps/Makefile index 6bb74f304..a98d68525 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -21,6 +21,12 @@ APPS_DIR := $(ROOT_DIR) COMMON_DIR := $(ROOT_DIR)/common TESTS_DIR := $(ROOT_DIR)/riscv-tests/isa +# Build environment for Linux +LINUX ?= 1 +ifeq ($(LINUX), 1) +include $(COMMON_DIR)/linux.mk +endif + # This will overwrite the ROOT_DIR variable from the included makefile include $(COMMON_DIR)/runtime.mk include $(COMMON_DIR)/riscv_tests.mk @@ -33,9 +39,9 @@ BINARIES := $(filter-out bin/benchmarks, $(addprefix bin/,$(APPS))) CVA6_EXTENSIONS := rv64ui rv64uc rv64um rv64uf rv64ud rv64si # Atomics are messy, since there is currently no memory region capable of handling them # CVA6_EXTENSIONS := rv64ua -CVA6_BINARIES := $(addprefix bin/, $(cva6_tests)) +CVA6_BINARIES := $(addsuffix $(IS_LINUX_EXTENSION), $(addprefix bin/, $(cva6_tests))) ARA_EXTENSIONS := rv64uv -ARA_BINARIES := $(addprefix bin/, $(ara_tests)) +ARA_BINARIES := $(addsuffix $(IS_LINUX_EXTENSION), $(addprefix bin/, $(ara_tests))) # FFT requires special treatment because of its header files ifeq ($(ENV_DEFINES),) @@ -95,14 +101,18 @@ endef $(foreach app,$(APPS),$(eval $(call app_compile_template_spike,$(app)))) define app_compile_template -bin/$1: $1/data.S.o $(addsuffix .o, $(shell find $(1) -name "*.c" -o -name "*.S")) $(RUNTIME_LLVM) linker_script +bin/$1: $1/data.S.o$$(IS_LINUX_EXTENSION) $(addsuffix .o$$(IS_LINUX_EXTENSION), $(shell find $(1) -name "*.c" -o -name "*.S")) $(RUNTIME_LLVM) linker_script mkdir -p bin/ - $$(RISCV_CC) -Iinclude $(RISCV_CCFLAGS) -o $$@ $$(addsuffix .o, $$(shell find $(1) -name "*.c" -o -name "*.S")) $(RUNTIME_LLVM) $$(RISCV_LDFLAGS) -T$$(CURDIR)/common/link.ld - $$(RISCV_OBJDUMP) $$(RISCV_OBJDUMP_FLAGS) -D $$@ > $$@.dump - $$(RISCV_STRIP) $$@ -S --strip-unneeded + $$(RISCV_CC) $(RISCV_CCFLAGS) -o $$@$$(IS_LINUX_EXTENSION) $$(addsuffix .o$$(IS_LINUX_EXTENSION), $$(shell find $(1) -name "*.c" -o -name "*.S")) $(RUNTIME_LLVM) $$(RISCV_LDFLAGS) $$(LD_FLAGS) + $$(RISCV_OBJDUMP) $$(RISCV_OBJDUMP_FLAGS) -D $$@$$(IS_LINUX_EXTENSION) > $$@$$(IS_LINUX_EXTENSION).dump + # Don't strip symbols for Linux build since need them for debug + if [ "$$(IS_LINUX_EXTENSION)" == "" ]; then \ + $$(RISCV_STRIP) $$@$$(IS_LINUX_EXTENSION) -S --strip-unneeded; \ + fi endef $(foreach app,$(APPS),$(eval $(call app_compile_template,$(app)))) + # Make the RISC-V tests riscv_tests: $(CVA6_BINARIES) $(ARA_BINARIES) @@ -111,7 +121,7 @@ TESTS_$(1) := $(addprefix bin/, $($(addsuffix _ara_tests, $1))) bin/$(1)-ara-%: $(TESTS_DIR)/$(1)/%.$(2) $(RUNTIME_GCC) linker_script mkdir -p bin/ - $$(RISCV_CC_GCC) -Iinclude -I$$(TESTS_DIR)/macros/scalar -I$$(TESTS_DIR)/macros/vector $$(RISCV_CCFLAGS_GCC) $$(RISCV_LDFLAGS_GCC) -o $$@ $$< $(RUNTIME_GCC) -T$$(CURDIR)/common/link.ld + $$(RISCV_CC_GCC) -Iinclude -I$$(TESTS_DIR)/macros/scalar -I$$(TESTS_DIR)/macros/vector $$(RISCV_CCFLAGS_GCC) $$(RISCV_LDFLAGS_GCC) -o $$@ $$< $(RUNTIME_GCC) $$(LD_FLAGS) $$(RISCV_OBJDUMP) $$(RISCV_OBJDUMP_FLAGS) -D $$@ > $$@.dump $$(RISCV_STRIP) $$@ -S --strip-unneeded endef @@ -121,7 +131,7 @@ TESTS_$(1) := $(addprefix bin/, $($(addsuffix _ara_tests, $1))) bin/$(1)-ara-%: $(TESTS_DIR)/$(1)/%.$(2) $(RUNTIME_LLVM) linker_script mkdir -p bin/ - $$(RISCV_CC) -Iinclude -I$$(TESTS_DIR)/macros/scalar -I$$(TESTS_DIR)/macros/vector $$(RISCV_CCFLAGS) $$(RISCV_LDFLAGS) -o $$@ $$< $(RUNTIME_LLVM) -T$$(CURDIR)/common/link.ld + $$(RISCV_CC) -Iinclude -I$$(TESTS_DIR)/macros/scalar -I$$(TESTS_DIR)/macros/vector $$(RISCV_CCFLAGS) $$(RISCV_LDFLAGS) -o $$@ $$< $(RUNTIME_LLVM) $$(LD_FLAGS) $$(RISCV_OBJDUMP) $$(RISCV_OBJDUMP_FLAGS) -D $$@ > $$@.dump $$(RISCV_STRIP) $$@ -S --strip-unneeded endef @@ -169,13 +179,14 @@ benchmarks_clean: .PHONY: clean clean: riscv_tests_spike_clean benchmarks_clean + rm -vf bin/* rm -vf $(BINARIES) rm -vf $(CVA6_BINARIES) rm -vf $(ARA_BINARIES) rm -vf $(addsuffix .dump,$(BINARIES)) rm -vf $(addsuffix .dump,$(CVA6_BINARIES)) rm -vf $(addsuffix .dump,$(ARA_BINARIES)) - rm -vf $(addsuffix /main.c.o,$(APPS)) + rm -vf $(addsuffix /main.c.o$(IS_LINUX_EXTENSION),$(APPS)) rm -vf $(RUNTIME_GCC) rm -vf $(RUNTIME_LLVM) rm -vf $(RUNTIME_SPIKE) diff --git a/apps/common/linux.mk b/apps/common/linux.mk new file mode 100644 index 000000000..65daa016e --- /dev/null +++ b/apps/common/linux.mk @@ -0,0 +1,47 @@ +IS_LINUX_EXTENSION := .linux + +CVA6_SDK ?= /usr/scratch/fenga3/vmaisto/cva6-sdk_fork_backup +ROOTFS_DEST ?= $(CVA6_SDK)/rootfs/ara/apps/bin +cp_to_rootfs: + mkdir -p $(ROOTFS_DEST) + @echo "[Copying binaries to rootfs directory $(ROOTFS_DEST)]" + cp -v bin/*.linux $(ROOTFS_DEST) + +# Set the runtime variables to empty, the Linux libs will takcare of that +LD_FLAGS := +RUNTIME_GCC ?= common/util-gcc.c.o +RUNTIME_LLVM ?= common/util-llvm.c.o + + +# Override +INSTALL_DIR ?= $(ARA_DIR)/install +GCC_INSTALL_DIR ?= $(CVA6_SDK)/buildroot/output/host/ +LLVM_INSTALL_DIR ?= $(INSTALL_DIR)/riscv-llvm + +RISCV_XLEN ?= 64 +RISCV_ARCH ?= rv$(RISCV_XLEN)gcv +RISCV_ABI ?= lp64d +RISCV_TARGET ?= riscv$(RISCV_XLEN)-buildroot-linux-gnu- + +# Don't use LLVM +RISCV_PREFIX ?= $(GCC_INSTALL_DIR)/bin/$(RISCV_TARGET) +RISCV_CC ?= $(RISCV_PREFIX)gcc +RISCV_CXX ?= $(RISCV_PREFIX)g++ +RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump +RISCV_OBJCOPY ?= $(RISCV_PREFIX)objcopy +RISCV_AS ?= $(RISCV_PREFIX)as +RISCV_AR ?= $(RISCV_PREFIX)ar +RISCV_LD ?= $(RISCV_PREFIX)ld +RISCV_STRIP ?= $(RISCV_PREFIX)strip + +# Override flags +# LLVM_FLAGS ?= -march=rv64gcv_zfh_zvfh0p1 -mabi=$(RISCV_ABI) -mno-relax -fuse-ld=lld +LLVM_FLAGS ?= -march=rv64gcv -mabi=$(RISCV_ABI) +LLVM_V_FLAGS ?= #+no-optimized-zero-stride-load +# RISCV_FLAGS ?= $(LLVM_FLAGS) $(LLVM_V_FLAGS) -mcmodel=medany -I$(CURDIR)/common -std=gnu99 -O3 -ffast-math -fno-common -fno-builtin-printf $(DEFINES) $(RISCV_WARNINGS) +RISCV_FLAGS ?= -g $(LLVM_FLAGS) $(LLVM_V_FLAGS) -I$(CURDIR)/common -std=gnu99 -O0 $(DEFINES) $(RISCV_WARNINGS) +RISCV_CCFLAGS ?= $(RISCV_FLAGS) #-ffunction-sections -fdata-sections +RISCV_CXXFLAGS ?= $(RISCV_FLAGS) -ffunction-sections -fdata-sections +RISCV_LDFLAGS ?= #-static -nostartfiles -lm -Wl,--gc-sections + +RISCV_OBJDUMP_FLAGS ?= -S diff --git a/apps/common/printf.h b/apps/common/printf.h index dd8d0d514..53bdc952c 100644 --- a/apps/common/printf.h +++ b/apps/common/printf.h @@ -29,6 +29,11 @@ // /////////////////////////////////////////////////////////////////////////////// + +#ifdef __linux__ + #include +#else // ! __linux__ + #ifndef _PRINTF_H_ #define _PRINTF_H_ @@ -100,4 +105,5 @@ int fctprintf(void (*out)(char character, void *arg), void *arg, } #endif +#endif // __linux__ #endif // _PRINTF_H_ diff --git a/apps/common/runtime.h b/apps/common/runtime.h index 4e8dbb44d..e61d5fda8 100644 --- a/apps/common/runtime.h +++ b/apps/common/runtime.h @@ -7,13 +7,19 @@ asm volatile( \ "csrs mstatus, %[bits];" ::[bits] "r"(0x00000600 & (0x00000600 >> 1))) -extern int64_t event_trigger; -extern int64_t timer; -// SoC-level CSR -extern uint64_t hw_cnt_en_reg; +// SoC-level CSR, put in memory for Linux build +#ifdef __linux__ + int64_t event_trigger; + int64_t timer; + uint64_t hw_cnt_en_reg; +#else // ! __linux__ + extern int64_t event_trigger; + extern int64_t timer; + extern uint64_t hw_cnt_en_reg; +#endif // __linux__ // Return the current value of the cycle counter -inline int64_t get_cycle_count() { +int64_t get_cycle_count() { int64_t cycle_count; // The fence is needed to be sure that Ara is idle, and it is not performing // the last vector stores when we read mcycle with stop_timer() @@ -31,26 +37,26 @@ inline int64_t get_cycle_count() { #define HW_CNT_READY hw_cnt_en_reg = 1; #define HW_CNT_NOT_READY hw_cnt_en_reg = 0; // Start and stop the counter -inline void start_timer() { timer = -get_cycle_count(); } -inline void stop_timer() { timer += get_cycle_count(); } +void start_timer() { timer = -get_cycle_count(); } +void stop_timer() { timer += get_cycle_count(); } // Get the value of the timer -inline int64_t get_timer() { return timer; } +int64_t get_timer() { return timer; } #else #define HW_CNT_READY ; #define HW_CNT_NOT_READY ; // Start and stop the counter -inline void start_timer() { +void start_timer() { while (0) ; } -inline void stop_timer() { +void stop_timer() { while (0) ; } // Get the value of the timer -inline int64_t get_timer() { return 0; } +int64_t get_timer() { return 0; } #endif #endif // _RUNTIME_H_ diff --git a/apps/common/runtime.mk b/apps/common/runtime.mk index 66b05f660..7cd273f82 100644 --- a/apps/common/runtime.mk +++ b/apps/common/runtime.mk @@ -33,7 +33,7 @@ endif # Include configuration include $(ARA_DIR)/config/$(config).mk -INSTALL_DIR ?= $(ARA_DIR)/install +INSTALL_DIR ?= /usr/scratch/fenga3/vmaisto/ara/install GCC_INSTALL_DIR ?= $(INSTALL_DIR)/riscv-gcc LLVM_INSTALL_DIR ?= $(INSTALL_DIR)/riscv-llvm ISA_SIM_INSTALL_DIR ?= $(INSTALL_DIR)/riscv-isa-sim @@ -42,7 +42,7 @@ ISA_SIM_MOD_INSTALL_DIR ?= $(INSTALL_DIR)/riscv-isa-sim-mod RISCV_XLEN ?= 64 RISCV_ARCH ?= rv$(RISCV_XLEN)gcv RISCV_ABI ?= lp64d -RISCV_TARGET ?= riscv$(RISCV_XLEN)-unknown-elf +RISCV_TARGET ?= riscv$(RISCV_XLEN)-unknown-elf- # Use LLVM RISCV_PREFIX ?= $(LLVM_INSTALL_DIR)/bin/ @@ -56,7 +56,9 @@ RISCV_LD ?= $(RISCV_PREFIX)ld.lld RISCV_STRIP ?= $(RISCV_PREFIX)llvm-strip # Use gcc to compile scalar riscv-tests -RISCV_CC_GCC ?= $(GCC_INSTALL_DIR)/bin/$(RISCV_TARGET)-gcc +RISCV_CC_GCC ?= $(GCC_INSTALL_DIR)/bin/$(RISCV_TARGET)gcc +RISCV_OBJCOPY_GCC ?= $(GCC_INSTALL_DIR)/bin/$(RISCV_TARGET)objcopy +RISCV_OBJDUMP_GCC ?= $(GCC_INSTALL_DIR)/bin/$(RISCV_TARGET)objdump # Benchmark with spike spike_env_dir ?= $(ARA_DIR)/apps/riscv-tests @@ -109,6 +111,8 @@ RUNTIME_GCC ?= common/crt0-gcc.S.o common/printf-gcc.c.o common/string-gcc.c.o RUNTIME_LLVM ?= common/crt0-llvm.S.o common/printf-llvm.c.o common/string-llvm.c.o common/serial-llvm.c.o common/util-llvm.c.o RUNTIME_SPIKE ?= $(spike_env_dir)/benchmarks/common/crt.S.o.spike $(spike_env_dir)/benchmarks/common/syscalls.c.o.spike common/util.c.o.spike +LD_FLAGS ?= -T$(CURDIR)/common/link.ld + .INTERMEDIATE: $(RUNTIME_GCC) $(RUNTIME_LLVM) %-gcc.S.o: %.S @@ -123,10 +127,10 @@ RUNTIME_SPIKE ?= $(spike_env_dir)/benchmarks/common/crt.S.o.spike $(spike_env_di %-llvm.c.o: %.c $(RISCV_CC) $(RISCV_CCFLAGS) -c $< -o $@ -%.S.o: %.S +%.S.o$(IS_LINUX_EXTENSION): %.S $(RISCV_CC) $(RISCV_CCFLAGS) -c $< -o $@ -%.c.o: %.c +%.c.o$(IS_LINUX_EXTENSION): %.c $(RISCV_CC) $(RISCV_CCFLAGS) -c $< -o $@ %.S.o.spike: %.S patch-spike-crt0 diff --git a/apps/riscv-tests/benchmarks/Makefile b/apps/riscv-tests/benchmarks/Makefile index cc327145a..43df648b8 100644 --- a/apps/riscv-tests/benchmarks/Makefile +++ b/apps/riscv-tests/benchmarks/Makefile @@ -35,12 +35,12 @@ bmarks = \ # Build rules #-------------------------------------------------------------------- -RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- +RISCV_PREFIX ?= /usr/scratch/fenga3/vmaisto/cva6-sdk_fork/buildroot/output/host/bin/riscv64-buildroot-linux-gnu- RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_GCC_OPTS ?= -DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common -fno-builtin-printf -RISCV_LINK ?= $(RISCV_GCC) -T $(src_dir)/common/test.ld $(incs) -RISCV_LINK_OPTS ?= -static -nostdlib -nostartfiles -lm -lgcc -T $(src_dir)/common/test.ld -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data +RISCV_GCC_OPTS ?= -DPREALLOCATE=1 -mcmodel=medany -std=gnu99 -O2 -ffast-math -fPIC +RISCV_LINK ?= $(RISCV_GCC) $(incs) +RISCV_LINK_OPTS ?= +RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes -S RISCV_SIM ?= spike --isa=rv$(XLEN)gc incs += -I$(src_dir)/../env -I$(src_dir)/common $(addprefix -I$(src_dir)/, $(bmarks)) @@ -48,7 +48,7 @@ objs := define compile_template $(1).riscv: $(wildcard $(src_dir)/$(1)/*) $(wildcard $(src_dir)/common/*) - $$(RISCV_GCC) $$(incs) $$(RISCV_GCC_OPTS) -o $$@ $(wildcard $(src_dir)/$(1)/*.c) $(wildcard $(src_dir)/common/*.c) $(wildcard $(src_dir)/common/*.S) $$(RISCV_LINK_OPTS) + $$(RISCV_GCC) $$(incs) $$(RISCV_GCC_OPTS) -o $$@ $(wildcard $(src_dir)/$(1)/*.c) $(wildcard $(src_dir)/common/*.c) $$(RISCV_LINK_OPTS) endef $(foreach bmark,$(bmarks),$(eval $(call compile_template,$(bmark)))) diff --git a/apps/riscv-tests/benchmarks/common/syscalls.c b/apps/riscv-tests/benchmarks/common/syscalls.c index 4d20be9e4..b9d33c368 100644 --- a/apps/riscv-tests/benchmarks/common/syscalls.c +++ b/apps/riscv-tests/benchmarks/common/syscalls.c @@ -8,6 +8,36 @@ #include #include "util.h" +#define NUM_COUNTERS 2 +static uintptr_t counters[NUM_COUNTERS]; +static char* counter_names[NUM_COUNTERS]; + +void setStats(int enable) +{ + int i = 0; +#define READ_CTR(name) do { \ + while (i >= NUM_COUNTERS) ; \ + uintptr_t csr = read_csr(name); \ + if (!enable) { csr -= counters[i]; counter_names[i] = #name; } \ + counters[i++] = csr; \ + } while (0) + + // Read from user CSRs + READ_CTR(cycle); + READ_CTR(instret); + +#undef READ_CTR +} + +int __attribute__((weak)) main(int argc, char** argv) +{ + // single-threaded programs override this function. + printstr("Implement main(), foo!\n"); + return -1; +} + +#ifndef __linux__ + #define SYS_write 64 #undef strcmp @@ -33,26 +63,6 @@ static uintptr_t syscall(uintptr_t which, uint64_t arg0, uint64_t arg1, uint64_t return magic_mem[0]; } -#define NUM_COUNTERS 2 -static uintptr_t counters[NUM_COUNTERS]; -static char* counter_names[NUM_COUNTERS]; - -void setStats(int enable) -{ - int i = 0; -#define READ_CTR(name) do { \ - while (i >= NUM_COUNTERS) ; \ - uintptr_t csr = read_csr(name); \ - if (!enable) { csr -= counters[i]; counter_names[i] = #name; } \ - counters[i++] = csr; \ - } while (0) - - READ_CTR(mcycle); - READ_CTR(minstret); - -#undef READ_CTR -} - void __attribute__((noreturn)) tohost_exit(uintptr_t code) { tohost = (code << 1) | 1; @@ -86,19 +96,13 @@ void __attribute__((weak)) thread_entry(int cid, int nc) while (cid != 0); } -int __attribute__((weak)) main(int argc, char** argv) -{ - // single-threaded programs override this function. - printstr("Implement main(), foo!\n"); - return -1; -} - static void init_tls() { register void* thread_pointer asm("tp"); - extern char _tdata_begin, _tdata_end, _tbss_end; + extern char _tls_data; + extern __thread char _tdata_begin, _tdata_end, _tbss_end; size_t tdata_size = &_tdata_end - &_tdata_begin; - memcpy(thread_pointer, &_tdata_begin, tdata_size); + memcpy(thread_pointer, &_tls_data, tdata_size); size_t tbss_size = &_tbss_end - &_tdata_end; memset(thread_pointer + tdata_size, 0, tbss_size); } @@ -115,7 +119,7 @@ void _init(int cid, int nc) char* pbuf = buf; for (int i = 0; i < NUM_COUNTERS; i++) if (counters[i]) - pbuf += sprintf(pbuf, "%s = %ld\n", counter_names[i], counters[i]); + pbuf += sprintf(pbuf, "%s = %d\n", counter_names[i], counters[i]); if (pbuf != buf) printstr(buf); @@ -226,7 +230,7 @@ static void vprintfmt(void (*putch)(int, void**), void **putdat, const char *fmt case '-': padc = '-'; goto reswitch; - + // flag to pad with 0's instead of spaces case '0': padc = '0'; @@ -335,7 +339,7 @@ static void vprintfmt(void (*putch)(int, void**), void **putdat, const char *fmt case '%': putch(ch, putdat); break; - + // unrecognized escape sequence - just print it literally default: putch('%', putdat); @@ -356,19 +360,19 @@ int printf(const char* fmt, ...) return 0; // incorrect return value, but who cares, anyway? } -void sprintf_putch(int ch, void** data) -{ - char** pstr = (char**)data; - **pstr = ch; - (*pstr)++; -} - int sprintf(char* str, const char* fmt, ...) { va_list ap; char* str0 = str; va_start(ap, fmt); + void sprintf_putch(int ch, void** data) + { + char** pstr = (char**)data; + **pstr = ch; + (*pstr)++; + } + vprintfmt(sprintf_putch, (void**)&str, fmt, ap); *str = 0; @@ -467,3 +471,5 @@ long atol(const char* str) return sign ? -res : res; } + +#endif // __linux__ diff --git a/apps/riscv-tests/mt/Makefile b/apps/riscv-tests/mt/Makefile index b45e55182..81052bafc 100644 --- a/apps/riscv-tests/mt/Makefile +++ b/apps/riscv-tests/mt/Makefile @@ -75,12 +75,12 @@ bmarks = $(bmarks_vvadd) $(bmarks_matmul) # Build rules #-------------------------------------------------------------------- -RISCV_PREFIX=riscv$(XLEN)-unknown-elf- +RISCV_PREFIX := /scratch/vmaisto/cva6-sdk_fork/buildroot/output/host/bin/riscv64-buildroot-linux-gnu- RISCV_GCC = $(RISCV_PREFIX)gcc RISCV_GCC_OPTS = -std=gnu99 -O2 -ffast-math -RISCV_LINK = $(RISCV_GCC) -T $(common)/test.ld $(incs) +RISCV_LINK = $(RISCV_GCC) $(incs) RISCV_LINK_OPTS = -nostdlib -nostartfiles -ffast-math -lc -RISCV_OBJDUMP = $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data +RISCV_OBJDUMP = $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes -S RISCV_SIM = spike -p2 VPATH += $(common) $(common)/../mt-matmul $(common)/../mt-vvadd