forked from Goldan32/h745-start
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
110 lines (93 loc) · 2.17 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[env]
ARTIFACT_DIR = "artifacts"
HEX_FILE_0 = "${ARTIFACT_DIR}/image-0.hex"
ELF_FILE_0 = "${ARTIFACT_DIR}/image-0.elf"
BIN_FILE_0 = "${ARTIFACT_DIR}/image-0.bin"
HEX_FILE_1 = "${ARTIFACT_DIR}/image-1.hex"
ELF_FILE_1 = "${ARTIFACT_DIR}/image-1.elf"
BIN_FILE_1 = "${ARTIFACT_DIR}/image-1.bin"
ORIGINAL_ELF_0 = "target/thumbv7em-none-eabihf/release/h747-dual-core-0"
ORIGINAL_ELF_1 = "target/thumbv7em-none-eabihf/release/h747-dual-core-1"
MERGE_HEX = "${ARTIFACT_DIR}/merge.hex"
[tasks.artifact-dir]
command = "mkdir"
args = ["${ARTIFACT_DIR}"]
[tasks.elf0]
command = "cp"
args = ["${ORIGINAL_ELF_0}", "${ELF_FILE_0}"]
dependencies = ["artifact-dir", "crate"]
[tasks.elf1]
command = "cp"
args = ["${ORIGINAL_ELF_1}", "${ELF_FILE_1}"]
dependencies = ["artifact-dir", "crate"]
[tasks.hex0]
command = "objcopy"
args = ["-O", "ihex", "${ELF_FILE_0}", "${HEX_FILE_0}"]
dependencies = ["elf0"]
[tasks.hex1]
command = "objcopy"
args = ["-O", "ihex", "${ELF_FILE_1}", "${HEX_FILE_1}"]
dependencies = ["elf1"]
[tasks.bin0]
command = "xxd"
args = ["-r", "-p", "${HEX_FILE_0}", "${BIN_FILE_0}"]
dependencies = ["hex0"]
[tasks.bin1]
command = "xxd"
args = ["-r", "-p", "${HEX_FILE_1}", "${BIN_FILE_1}"]
dependencies = ["hex1"]
[tasks.merge]
command = "srec_cat"
args = [
"${HEX_FILE_0}", "-intel",
"${HEX_FILE_1}", "-intel",
"-o", "${MERGE_HEX}", "-intel",
"-Line_Length", "44"
]
dependencies = ["hex0", "hex1"]
[tasks.crate]
clear = true
command = "cargo"
toolchain = "nightly"
args = [
"microamp",
"--bin", "h747-dual-core",
"--release", "-v"
]
[tasks.remove-artifacts]
command = "rm"
args = ["-rf", "${ARTIFACT_DIR}"]
[tasks.cargo-clean]
command = "cargo"
args = ["clean"]
[tasks.clean]
clear = true
dependencies = ["cargo-clean", "remove-artifacts"]
[tasks.all]
dependencies = ["merge"]
[tasks.default]
clear = true
dependencies = ["all"]
[tasks.deploy0]
clear=true
command = "cargo"
args = [
"flash",
"--elf",
"${ELF_FILE_0}",
"--chip",
"STM32H747XIHx"
]
[tasks.deploy1]
clear=true
command = "cargo"
args = [
"flash",
"--elf",
"${ELF_FILE_1}",
"--chip",
"STM32H747XIHx"
]
[tasks.deploy]
clear = true
dependencies = ["all", "deploy0", "deploy1"]