-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdrive-software.code-workspace
162 lines (160 loc) · 4.74 KB
/
drive-software.code-workspace
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
159
160
161
162
{
"extensions": {
"recommendations": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"twxs.cmake",
"marus25.cortex-debug",
"dan-c-underwood.arm",
"zixuanwang.linkerscript",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.vscode-python-debugger",
]
},
"folders": [
{
"path": "."
}
],
"tasks": {
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "Build project",
"command": "cmake",
"args": ["--build", "${command:cmake.buildDirectory}", "-j", "8"],
"options": {
"cwd": "${workspaceFolder}/firmware"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "shell",
"label": "Re-build project",
"command": "cmake",
"args": ["--build", "${command:cmake.buildDirectory}", "--clean-first", "-v", "-j", "8"],
"options": {
"cwd": "${workspaceFolder}/firmware"
},
"problemMatcher": ["$gcc"],
},
{
"type": "shell",
"label": "Clean project",
"command": "cmake",
"args": ["--build", "${command:cmake.buildDirectory}", "--target", "clean"],
"options": {
"cwd": "${workspaceFolder}/firmware"
},
"problemMatcher": []
},
{
"type": "shell",
"label": "CubeProg: Flash project (SWD)",
"command": "STM32_Programmer_CLI",
"args": [
"--connect",
"port=swd",
"--download", "${command:cmake.launchTargetPath}",
"-hardRst"
],
"options": {
"cwd": "${workspaceFolder}/firmware"
},
"problemMatcher": []
},
{
"type": "shell",
"label": "CubeProg: Flash project with defined serial number (SWD) - you must set serial number first",
"command": "STM32_Programmer_CLI",
"args": [
"--connect",
"port=swd",
"sn=<yourserialnumber>",
"--download", "${command:cmake.launchTargetPath}",
"-hardRst"
],
"options": {
"cwd": "${workspaceFolder}/firmware"
},
"problemMatcher": []
},
{
"type": "shell",
"label": "CubeProg: List all available communication interfaces",
"command": "STM32_Programmer_CLI",
"args": [
"--list",
],
"options": {
"cwd": "${workspaceFolder}/firmware"
},
"problemMatcher": []
},
{
"type": "shell",
"label": "Create Python venv and install dependencies",
"command": "cmd",
"args": [
"/c",
"if not exist ${workspaceFolder}\\python\\.venv ( python -m venv ${workspaceFolder}\\python\\.venv && ${workspaceFolder}\\python\\.venv\\Scripts\\activate && pip install -r requirements.txt ) else ( echo Virtual environment already exists )"
],
"options": {
"cwd": "${workspaceFolder}\\python"
},
"problemMatcher": []
}
]
},
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"cwd": "${workspaceFolder}/firmware", //Path from where commands are executed
"type": "cortex-debug", //Debug
"executable": "${command:cmake.launchTargetPath}", //or fixed file path: build/project-name.elf
"request": "launch", //Use "attach" to connect to target w/o elf download
"servertype": "stlink", //Use stlink setup of cortex-M debug
"device": "STM32F413RG", //MCU used
"interface": "swd", //Interface setup
"serialNumber": "", //Set ST-Link ID if you use multiple at the same time
"runToEntryPoint": "main", //Run to main and stop there
"svdFile": "firmware/stm32f413.svd", //SVD file to see registers
"v1": false,
"showDevDebugOutput": "both",
},
// {
// "name": "Run without Debug",
// "cwd": "${workspaceFolder}/firmware", //Path from where commands are executed
// "type": "cortex-debug", //Debug
// "executable": "${command:cmake.launchTargetPath}", //or fixed file path: build/project-name.elf
// "request": "launch", //Use "attach" to connect to target w/o elf download
// "servertype": "stlink", //Use stlink setup of cortex-M debug
// "device": "STM32F413RG", //MCU used
// "interface": "swd", //Interface setup
// "serialNumber": "", //Set ST-Link ID if you use multiple at the same time
// "runToEntryPoint": "main", //Run to main and stop there
// "svdFile": "firmware/stm32f413.svd", //SVD file to see registers
// "v1": false,
// "showDevDebugOutput": "both",
// "postLaunchCommands": [
// "monitor reset run",
// "detach"
// ]
// }
]
},
"settings": {
"cortex-debug.variableUseNaturalFormat": true,
"files.associations": {
"cmath": "cpp"
}
}
}