File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
src/test/run-make/thumb-none-qemu Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ -include ../../run-make-fulldeps/tools.mk
2+
3+ # How to run this
4+ # $ ./x.py clean
5+ # $ ./x.py test --target thumbv7m-none-eabi src/test/run-make
6+
7+ ifeq ($(TARGET ) ,thumbv7m-none-eabi))
8+
9+ # For cargo setting
10+ RUSTC := $(RUSTC_ORIGINAL )
11+ LD_LIBRARY_PATH := $(HOST_RPATH_DIR )
12+ # We need to be outside of 'src' dir in order to run cargo
13+ WORK_DIR := $(TMPDIR )
14+
15+ HERE := $(shell pwd)
16+
17+ CRATE := lm3s6965evb
18+ CRATE_URL := https://github.com/japaric/lm3s6965evb
19+ CRATE_SHA1 := 9eeea58826438e84d89e9691a1bb0f85b03d377c
20+ QEMU_CPU := cortex-m3
21+ QEMU_MACHINE := lm3s6965evb
22+
23+ all :
24+ env
25+ mkdir -p $(WORK_DIR )
26+ -cd $(WORK_DIR ) && rm -rf $(CRATE )
27+ cd $(WORK_DIR ) && bash -x $(HERE ) /../git_clone_sha1.sh $(CRATE ) $(CRATE_URL ) $(CRATE_SHA1 )
28+ cd $(WORK_DIR ) /$(CRATE ) && $(CARGO ) build --target $(TARGET ) -v
29+ cd $(WORK_DIR ) /$(CRATE ) && qemu-system-arm \
30+ -cpu $(QEMU_CPU) \
31+ -machine $(QEMU_MACHINE) \
32+ -semihosting-config enable=on,target=native \
33+ -nographic \
34+ -kernel target/$(TARGET)/debug/$(CRATE) > out.txt
35+ cd $(WORK_DIR)/$(CRATE) && grep "x = 42" out.txt
36+ else
37+
38+ all :
39+
40+ endif
You can’t perform that action at this time.
0 commit comments