-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
81 lines (69 loc) · 2.51 KB
/
Makefile.toml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#***********************************************************************************************************************
# cargo make tasks to build the example for the Raspberry Pi
#***********************************************************************************************************************
[env.development]
CC = "aarch64-none-elf-gcc"
AR = "aarch64-none-elf-ar"
OCOPY = "aarch64-none-elf-objcopy"
CFLAGS = "-march=armv8-a -Wall -O3 -nostdlib -nostartfiles -ffreestanding -mtune=cortex-a53"
RUSTFLAGS = "-C target-cpu=cortex-a53 -C target-feature=+strict-align,+a53,+fp-armv8,+neon -C link-arg=-T./link64.ld"
QEMUMACHINE = "raspi3"
QEMUCMD = "qemu-system-aarch64"
[env.travis]
CC = "aarch64-linux-gnu-gcc"
AR = "aarch64-linux-gnu-ar"
OCOPY = "aarch64-linux-gnu-objcopy"
CFLAGS = "-march=armv8-a -Wall -O3 -nostdlib -nostartfiles -ffreestanding -mtune=cortex-a53"
RUSTFLAGS = "-C target-cpu=cortex-a53 -C target-feature=+strict-align,+a53,+fp-armv8,+neon -C link-arg=-T./link64.ld"
QEMUMACHINE = "raspi3b"
QEMUCMD = "./qemu/bin/qemu-system-aarch64"
[tasks.build]
command = "cargo"
args = ["build", "--release", "--features", "${FEATURES}"]
[tasks.clippy]
env = { FEATURES = "ruspiro_pi3" }
command = "cargo"
args = ["clippy", "--features", "${FEATURES}"]
[tasks.doc]
env = { FEATURES = "ruspiro_pi3" }
command = "cargo"
args = ["doc", "--features", "${FEATURES}", "--open"]
[tasks.kernel]
command = "aarch64-none-elf-objcopy"
args = ["-O", "binary", "./target/aarch64-ruspiro/release/kernel", "./target/kernel8.img"]
dependencies = [
"build"
]
[tasks.pi3]
env = { FEATURES = "ruspiro_pi3" }
run_task = "kernel"
[tasks.qemu]
command = "qemu-system-aarch64"
args = ["-M", "${QEMUMACHINE}", "-kernel", "./target/kernel8.img", "-nographic", "-serial", "null", "-serial", "mon:stdio", "-d", "int,mmu", "-D", "qemu.log"]
dependencies = [
"pi3"
]
[tasks.deploy]
command = "cargo"
args = ["ruspiro-push", "-k", "./target/kernel8.img", "-p", "COM3"]
dependencies = [
"pi3"
]
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.unittest]
env = { FEATURES = "ruspiro_pi3" }
command = "cargo"
args = ["test", "--tests", "--features", "${FEATURES}"]
[tasks.qemu-test-objcopy]
command = "${OCOPY}"
args = ["-O", "binary", "${CARGO_MAKE_TASK_ARGS}", "./target/kernel_test.img"]
[tasks.qemu-test]
command = "${QEMUCMD}"
args = [
"-semihosting", "-nographic", "-M", "${QEMUMACHINE}", "-kernel", "./target/kernel_test.img", "-serial", "null", "-serial", "mon:stdio", "-d", "int,mmu", "-D", "qemu.log"
]
dependencies = [
"qemu-test-objcopy"
]