-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
77 lines (68 loc) · 1.4 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
[env]
FEATURES = "${CARGO_MAKE_TASK_ARGS}"
[tasks.reboot-to-bootloader]
command = "sam"
args = ["bootloader"]
# Try to keep going, e.g. if the device already is in bootloader mode
ignore_errors = true
[tasks.build]
command = "cargo"
args = [
"build",
"--release",
"--features", "${FEATURES}"
]
[tasks.test]
command = "cargo"
args = [
"test",
"--lib",
"--target", "x86_64-unknown-linux-gnu",
"--no-default-features"
]
[tasks.objcopy]
command = "cargo"
args = [
"objcopy",
"--quiet",
"--release",
"--features", "${FEATURES}",
"--",
"-O", "binary",
"target/thumbv7em-none-eabihf/release/dfu-rs.bin"
]
dependencies = ["build"]
[tasks.dfu]
linux_alias = "dfu_linux"
windows_alias = "dfu_win"
[tasks.dfu_linux]
command = "dfu-util"
args = [
"-d", "0483:df11",
"-a", "0",
"-s", "0x08000000:leave",
"-D", "target/thumbv7em-none-eabihf/release/dfu-rs.bin",
"-w"
]
dependencies = ["objcopy", "reboot-to-bootloader"]
[tasks.dfu_win]
command = "./dfu-util.exe"
args = [
"-d", "0483:df11",
"-a", "0",
"-s", "0x08000000:leave",
"-D", "target/thumbv7em-none-eabihf/release/dfu-rs.bin",
]
dependencies = ["objcopy", "reboot-to-bootloader"]
[tasks.dfu-log]
command = "sam"
args = ["logcat"]
dependencies = ["dfu"]
[tasks.swd]
command = "cargo"
args = [
"embed",
"--release",
"--features", "${FEATURES}",
"--chip=stm32f401rctx"
]