mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
commit
4057fe14db
2
.gitignore
vendored
2
.gitignore
vendored
@ -112,3 +112,5 @@ sim/results-error/
|
|||||||
sim/test1.rep
|
sim/test1.rep
|
||||||
sim/vsim.log
|
sim/vsim.log
|
||||||
tests/coverage/*.S
|
tests/coverage/*.S
|
||||||
|
tests/coverage/*.elf
|
||||||
|
*.elf.memfile
|
@ -1,13 +1,27 @@
|
|||||||
SRCS = $(wildcard *.S)
|
CEXT := c
|
||||||
PROGS = $(patsubst %.S,%,$(SRCS))
|
CPPEXT := cpp
|
||||||
|
AEXT := s
|
||||||
|
SEXT := S
|
||||||
|
SRCEXT := \([$(CEXT)$(AEXT)$(SEXT)]\|$(CPPEXT)\)
|
||||||
|
#SRCS = $(wildcard *.S)
|
||||||
|
#PROGS = $(patsubst %.S,%,$(SRCS))
|
||||||
|
SRCDIR = .
|
||||||
|
SRCEXT = S
|
||||||
|
SOURCES ?= $(shell find $(SRCDIR) -type f -regex ".*\.$(SRCEXT)" | sort)
|
||||||
|
OBJEXT = elf
|
||||||
|
OBJECTS := $(SOURCES:.$(SEXT)=.$(OBJEXT))
|
||||||
|
|
||||||
all: $(PROGS)
|
all: $(OBJECTS)
|
||||||
|
|
||||||
%: %.S WALLY-init-lib.h Makefile
|
%.elf.objdump: %.elf
|
||||||
|
|
||||||
|
%.elf: $(SRCDIR)/%.$(SEXT) WALLY-init-lib.h Makefile
|
||||||
echo $@
|
echo $@
|
||||||
riscv64-unknown-elf-gcc -g -o $@.elf -march=rv64gc -mabi=lp64 -mcmodel=medany \
|
riscv64-unknown-elf-gcc -g -o $@ -march=rv64gc -mabi=lp64 -mcmodel=medany \
|
||||||
-nostartfiles -T../../examples/link/link.ld $@.S
|
-nostartfiles -T../../examples/link/link.ld $<
|
||||||
riscv64-unknown-elf-objdump -D $@.elf > $@.objdump
|
riscv64-unknown-elf-objdump -D $@ > $@.objdump
|
||||||
|
riscv64-unknown-elf-elf2hex --bit-width $(if $(findstring rv64,$*),64,32) --input $@ --output $@.memfile
|
||||||
|
extractFunctionRadix.sh $@.objdump
|
||||||
|
|
||||||
sim: %.elf
|
sim: %.elf
|
||||||
spike +signature=%.signature.output +signature-granularity=8 %.elf
|
spike +signature=%.signature.output +signature-granularity=8 %.elf
|
||||||
|
@ -33,16 +33,4 @@ main:
|
|||||||
.word 0x00000000 // illegal instruction
|
.word 0x00000000 // illegal instruction
|
||||||
|
|
||||||
j done
|
j done
|
||||||
/*
|
|
||||||
main:
|
|
||||||
# Change to user mode
|
|
||||||
li a0, 0 # a0 = 0: argument to enter user mode
|
|
||||||
ecall # System call to enter user mode
|
|
||||||
|
|
||||||
# Wait for timer interrupts
|
|
||||||
li t0, 0x1000 # loop counter start value
|
|
||||||
loop:
|
|
||||||
addi t0, t0, -1 # decrement counter
|
|
||||||
bne t0, zero, loop # and repeat until zero
|
|
||||||
|
|
||||||
*/
|
|
Loading…
Reference in New Issue
Block a user