-
Notifications
You must be signed in to change notification settings - Fork 27
/
tasks.json
158 lines (158 loc) · 4.58 KB
/
tasks.json
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "rmk-test",
"type": "process",
"command": "cargo",
"args": [
"expand"
// "test",
// "--package",
// "rmk-test",
// "--bin",
// "rmk-test",
// "--",
// "tests::test_main",
// "--exact",
// "--nocapture"
],
// "problemMatcher": [
// "$rustc"
// ],
"options": {
"cwd": "${workspaceFolder}/examples/use_rust/stm32h7"
},
"group": {
"kind": "test",
"isDefault": true,
},
},
{
"label": "build stm32h7 --debug",
"type": "process",
"command": "cargo",
"args": [
"size",
"-j",
"32"
],
"options": {
"cwd": "${workspaceFolder}/examples/use_rust/stm32h7"
},
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
},
},
{
"label": "build rp2040 --debug",
"type": "process",
"command": "cargo",
"args": [
"size",
"-j",
"32"
],
"options": {
"cwd": "${workspaceFolder}/examples/use_rust/rp2040"
},
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
},
},
{
"label": "build stm32h7 --release",
"type": "process",
"command": "cargo",
"args": [
"size",
"--release",
"-j",
"32"
],
"options": {
"cwd": "${workspaceFolder}/examples/use_rust/stm32h7"
},
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
},
},
{
"label": "build rp2040 --release",
"type": "process",
"command": "cargo",
"args": [
"size",
"--release",
"-j",
"32"
],
"options": {
"cwd": "${workspaceFolder}/examples/use_rust/rp2040"
},
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
},
},
{
"label": "flash stm32h7",
"group": "build",
"type": "shell",
"command": "openocd -f \"${workspaceFolder}/examples/use_rust/stm32h7/openocd.cfg\" -c \"program examples/use_rust/stm32h7/target/thumbv7em-none-eabihf/debug/rmk-stm32h7 preverify verify reset exit\"",
"dependsOn": [
"build stm32h7 --debug"
],
"dependsOrder": "sequence"
},
{
"label": "flash rp2040",
"group": "build",
"type": "shell",
"command": "openocd -f \"${workspaceFolder}/examples/use_rust/rp2040/openocd.cfg\" -c \"program examples/use_rust/rp2040/target/thumbv6m-none-eabi/debug/rmk-rp2040 preverify verify reset exit\"",
"dependsOn": [
"build rp2040 --debug"
],
"dependsOrder": "sequence"
},
{
"label": "objcopy",
"type": "shell",
"command": "cargo objcopy --release -- -O binary \"${workspaceFolder}/examples/use_rust/${input:targetChip}/target/release/rmk-${input:targetChip}.bin\" && cargo size -j 32 --release",
"options": {
"cwd": "${workspaceFolder}/examples/use_rust/${input:targetChip}"
},
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
},
},
],
"inputs": [
{
"id": "targetChip",
"type": "pickString",
"description": "Choose a chip in `examples` folder to build or flash",
"options": [
"rp2040",
"stm32h7"
],
"default": "stm32h7"
}
]
}