Add program hex support in uriscv.
This commit is contained in:
parent
c2e4068c8a
commit
cca9d908ef
|
@ -30,6 +30,7 @@ all: clean verilator
|
|||
|
||||
clean:
|
||||
rm -rf build obj_dir
|
||||
mkdir -p build
|
||||
|
||||
##################### Verilog Builds #####################################
|
||||
top.v:
|
||||
|
@ -47,7 +48,7 @@ verilator-build: top.v
|
|||
|
||||
##################### Simulation Runs #####################################
|
||||
|
||||
verilator: program.hex verilator-build bin
|
||||
verilator: program verilator-build bin
|
||||
cd build && ../obj_dir/Vsoc_sim ${DEBUG_PLUS}
|
||||
|
||||
sim:
|
||||
|
@ -55,7 +56,7 @@ sim:
|
|||
|
||||
##################### Test hex Build #####################################
|
||||
|
||||
program.hex: $(TEST).o $(LINK)
|
||||
program: $(TEST).o $(LINK)
|
||||
@echo Building $(TEST)
|
||||
$(GCC_PREFIX)-gcc $(ABI) -Wl,-Map=$(BUILD_DIR)/$(TEST).map -lgcc -T$(LINKPRO) -o $(BUILD_DIR)/$(TEST).bin $(BUILD_DIR)/$(TEST).o -nostartfiles $(TEST_LIBS)
|
||||
$(GCC_PREFIX)-objcopy -O verilog $(BUILD_DIR)/$(TEST).bin $(BUILD_DIR)/program.hex
|
||||
|
@ -63,6 +64,9 @@ program.hex: $(TEST).o $(LINK)
|
|||
$(GCC_PREFIX)-objdump -S $(BUILD_DIR)/$(TEST).bin > $(BUILD_DIR)/$(TEST).dis
|
||||
@echo Completed building $(TEST)
|
||||
|
||||
# program:
|
||||
# cp ${DEMODIR}/program.hex ./build/
|
||||
|
||||
%.o : %.s
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
$(GCC_PREFIX)-cpp -g $< > $(BUILD_DIR)/$*.cpp.s
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue