Skip to content

Commit

Permalink
added interrupt_test and reset custom/he/hello_world
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Bettati committed Dec 19, 2019
1 parent 290a4b6 commit 3062088
Show file tree
Hide file tree
Showing 42 changed files with 4,962 additions and 18,506 deletions.
32 changes: 32 additions & 0 deletions tb/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,38 @@ custom-veri-run: verilate custom/hello_world.hex
./testbench_verilator $(VERI_FLAGS) \
"+firmware=custom/hello_world.hex"

# compile and run interrupt_test
interrupt_test/interrupt_test.elf: interrupt_test/interrupt_test.c
$(RISCV_EXE_PREFIX)gcc -march=rv32imc -o $@ -w -Os -g -nostdlib \
-T interrupt_test/link.ld \
-static \
interrupt_test/crt0.S \
$^ interrupt_test/syscalls.c custom/vectors.S \
-I $(RISCV)/riscv32-unknown-elf/include \
-L $(RISCV)/riscv32-unknown-elf/lib \
-lc -lm -lgcc
interrupt-clean:
rm -rf interrupt_test/interrupt_test.elf interrupt_test/interrupt_test.hex

.PHONY: interrupt-vsim-run
interrupt-vsim-run: vsim-all interrupt_test/interrupt_test.hex
interrupt-vsim-run: ALL_VSIM_FLAGS += "+firmware=interrupt_test/interrupt_test.hex"
interrupt-vsim-run: vsim-run

.PHONY: interrupt-vsim-run-gui
# abet: added this to generate disassembly for hello_world.c

interrupt-vsim-run-gui: vsim-all interrupt_test/interrupt_test.hex
interrupt-vsim-run-gui: ALL_VSIM_FLAGS += "+firmware=interrupt_test/interrupt_test.hex"
interrupt-vsim-run-gui: vsim-run-gui
interrupt-vsim-run-gui: $(RISCV)/riscv32-unknown-elf/bin/objdump -d interrupt_test/interrupt_test.elf > interrupt_test/interrupt_test_dump.txt


.PHONY: interrupt-veri-run
interrupt-veri-run: verilate interrupt_test/interrupt_test.hex
./testbench_verilator $(VERI_FLAGS) \
"+firmware=interrupt_test/interrupt_test.hex"

# compile and dump picorv firmware
firmware/firmware.elf: $(FIRMWARE_OBJS) $(FIRMWARE_TEST_OBJS) $(COMPLIANCE_TEST_OBJS) \
firmware/link.ld
Expand Down
Loading

0 comments on commit 3062088

Please sign in to comment.