Skip to content

Commit

Permalink
got rid of personal path to executable
Browse files Browse the repository at this point in the history
  • Loading branch information
billmcspadden-riscv committed Aug 15, 2022
1 parent b8bfc0b commit aa9a220
Showing 1 changed file with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,13 @@
# --------------------------------------------------------------------------------------------
# USER MUST SET THESE TO A PROPER SETTING

#XLEN := 64
#TOOL_OPT := elf
XLEN := 32
TOOL_OPT := linux-gnu
#RISCV := /apps/vlsi/tools/riscv/gnu_toolchain/102020/standard/riscv64-unknown-elf
#RISCV := /opt/riscv
RISCV := /opt/riscv${XLEN}
#CONFIG_BASE := 0x70080
CONFIG_BASE := 0x80000000
MARCH := -march=rv32imc -mabi=ilp32
LD_FILE := ./riscv_test.ld
# TODO: Need to extract the path to the run tool. DO NOT HARDCODE THIS!!!!
RUN_TOOL := /home/billmc/riscv/sail-riscv_br_billmcspadden-riscv.git/c_emulator/riscv_sim_RV32
RUN_TOOL := ../../../c_emulator/riscv_sim_RV32

# USER MUST SET THESE TO A PROPER SETTING
# --------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -73,7 +67,6 @@ BIN := ${RISCV}/bin
CC := ${BIN}/riscv${XLEN}-unknown-${TOOL_OPT}-gcc
ASM := ${BIN}/riscv${XLEN}-unknown-${TOOL_OPT}-gcc
LD := ${BIN}/riscv${XLEN}-unknown-${TOOL_OPT}-ld
#LD := ${BIN}/riscv${XLEN}-unknown-${TOOL_OPT}-gcc
OBJDUMP := ${BIN}/riscv${XLEN}-unknown-${TOOL_OPT}-objdump

TARGET := test.elf
Expand All @@ -88,7 +81,6 @@ C_SRC := $(wildcard *.c)
C_OBJS := $(subst .c,.o,${C_SRC})
C_FLAGS := -DCONFIG_BASE=${CONFIG_BASE} ${MARCH}

#LD_FLAGS := -T ${LD_FILE} ${MARCH}
LD_FLAGS := -T ${LD_FILE}

OBJS := ${ASM_OBJS} ${C_OBJS}
Expand All @@ -110,27 +102,20 @@ $(info TARGET: ${TARGET})
$(info DUMP: ${DUMP})
$(info =================================================================)


all: ${TARGET} ${DUMP}




${TARGET} : ${OBJS} ${LD_FILE}
${LD} ${LD_FLAGS} -o $@ ${OBJS}

${DUMP} : ${TARGET}
${OBJDUMP} ${OBJDUMPFLAGS} ${TARGET} > $@


%.o : %.S
${ASM} -c ${ASM_FLAGS} -o $@ $<

%.o : %.c
${CC} -c ${C_FLAGS} -o $@ $<



build: ${TARGET} ${DUMP}

dump: ${DUMP}
Expand All @@ -140,17 +125,13 @@ install:
clean:
rm -f ${OBJS} ${TARGET} ${DUMP} ${OUT_FILE}


run: ${TARGET}
${RUN_TOOL} ${TARGET} -y rv32i_platform.yaml -u rv32i_isa.yaml 2>&1 | tee ${OUT_FILE}

# ${RUN_TOOL} ${TARGET} 2>&1 | tee ${OUT_FILE}

ddd: ${TARGET}
echo "${TARGET} -y rv32i_platform.yaml -u rv32i_isa.yaml" ;
ddd ${RUN_TOOL}


clean_all: clean


Expand Down

0 comments on commit aa9a220

Please sign in to comment.