aboutsummaryrefslogtreecommitdiff
path: root/debug/Makefile
blob: 3efdea83c271af1fd569ed248d7339eea606181a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
RISCV_SIM ?= spike
XLEN ?= 64

src_dir ?= .
GDBSERVER_PY = $(src_dir)/gdbserver.py
TESTS = $(shell $(GDBSERVER_PY) --list-tests $(src_dir)/targets/RISC-V/spike32.py)

default: spike$(XLEN) spike$(XLEN)-2

all-tests: spike32 spike32-2 spike32-2-rtos spike32-2-hwthread \
	spike64 spike64-2 spike64-2-rtos spike64-2-hwthread

all:	pylint all-tests

run.%:
	echo $@
	$(GDBSERVER_PY) \
		$(src_dir)/targets/RISC-V/$(word 2, $(subst ., ,$@)).py \
		$(word 3, $(subst ., ,$@)) \
		--isolate \
		--print-failures \
		--sim_cmd $(RISCV)/bin/$(RISCV_SIM) \
		--server_cmd $(RISCV)/bin/openocd

# Target to check all the multicore options.
multi-tests: spike32-2 spike64-2-rtos spike32-2-hwthread

pylint:
	pylint --rcfile=pylint.rc `git ls-files '*.py'`

spike%:	$(foreach test, $(TESTS), run.spike%.$(test))
	echo Finished $@

clean:
	rm -f *.pyc