6
6
{
7
7
"label" : " Build Firmware" ,
8
8
"type" : " shell" ,
9
- "command" : " ${config:esp_idf_command} build" ,
10
- "options" : {
11
- "env" : {
12
- "PATH" : " ${config:esp_extra_paths}"
13
- }
14
- },
15
9
"group" : {
16
10
"kind" : " build" ,
17
11
"isDefault" : true
18
12
},
13
+ "options" : {
14
+ "cwd" : " ${workspaceRoot}" ,
15
+ "env" : {
16
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH}"
17
+ }
18
+ },
19
+ "command" : " idf.py build" ,
19
20
"problemMatcher" : [
20
21
" $gcc"
21
22
]
22
23
},
23
24
{
24
- "label" : " OpenOCD" ,
25
+ "label" : " Clean Project" ,
26
+ "type" : " shell" ,
27
+ "options" : {
28
+ "cwd" : " ${workspaceRoot}" ,
29
+ "env" : {
30
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH}"
31
+ }
32
+ },
33
+ "command" : " idf.py fullclean" ,
34
+ "problemMatcher" : []
35
+ },
36
+ {
37
+ "label" : " Manually 'clean' the `build/` Directory" ,
38
+ "type" : " shell" ,
39
+ "options" : {
40
+ "cwd" : " ${workspaceRoot}" ,
41
+ "env" : {
42
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH}"
43
+ }
44
+ },
45
+ "command" : " rm -rf build/" ,
46
+ "problemMatcher" : []
47
+ },
48
+ {
49
+ "label" : " Flash via ESP-Prog and OpenOCD" ,
25
50
"type" : " shell" ,
26
- "isBackground" : true ,
27
51
"options" : {
28
- "cwd" : " ${config:openocd_root_dir}"
52
+ "cwd" : " ${workspaceRoot}" ,
53
+ "env" : {
54
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH}"
55
+ }
29
56
},
30
- "command" : " bin/ openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f target/esp32.cfg" ,
57
+ "command" : " openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f target/esp32.cfg -c \" program_esp build/esp_prog_vscode_debug.bin 0x10000 verify reset exit \" " ,
31
58
"problemMatcher" : []
32
59
},
60
+ {
61
+ "label" : " Launch OpenOCD GDB Server" ,
62
+ "type" : " shell" ,
63
+ "isBackground" : true ,
64
+ "options" : {
65
+ "cwd" : " ${workspaceRoot}" ,
66
+ "env" : {
67
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH}"
68
+ }
69
+ },
70
+ "command" : " openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f target/esp32.cfg" ,
71
+ "problemMatcher" : {
72
+ "pattern" : {
73
+ "regexp" : " (Error|Warn) ?: .*" ,
74
+ "file" : 1 ,
75
+ "location" : 2 ,
76
+ "message" : 3
77
+ },
78
+ "background" : {
79
+ "activeOnStart" : true ,
80
+ "beginsPattern" : " Open On-Chip Debugger.*" ,
81
+ "endsPattern" : " Info : Listening on port [0-9]{1,5} for gdb connections"
82
+ }
83
+ }
84
+ },
33
85
{
34
86
"label" : " Flash and Monitor Device" ,
35
87
"type" : " shell" ,
36
- "command" : " ${config:esp_idf_command} -p ${config:esp_device_port} -b ${config:esp_device_baud} flash monitor" ,
37
88
"options" : {
89
+ "cwd" : " ${workspaceRoot}" ,
38
90
"env" : {
39
- "PATH" : " ${config:esp_extra_paths }"
91
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH }"
40
92
}
41
93
},
94
+ "command" : " idf.py -p ${config:esp_device_port} -b ${config:esp_device_baud} flash monitor" ,
42
95
"problemMatcher" : []
43
96
},
44
97
{
45
98
"label" : " Flash Device" ,
46
99
"type" : " shell" ,
47
- "command" : " ${config:esp_idf_command} -p ${config:esp_device_port} -b ${config:esp_device_baud} flash" ,
48
100
"options" : {
101
+ "cwd" : " ${workspaceRoot}" ,
49
102
"env" : {
50
- "PATH" : " ${config:esp_extra_paths }"
103
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH }"
51
104
}
52
105
},
106
+ "command" : " idf.py -p ${config:esp_device_port} -b ${config:esp_device_baud} flash" ,
53
107
"problemMatcher" : []
54
108
},
55
109
{
56
110
"label" : " Monitor Device" ,
57
111
"type" : " shell" ,
58
- "command" : " ${config:esp_idf_command} -p ${config:esp_device_port} -b ${config:esp_device_baud} monitor" ,
59
112
"options" : {
113
+ "cwd" : " ${workspaceRoot}" ,
60
114
"env" : {
61
- "PATH" : " ${config:esp_extra_paths }"
115
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH }"
62
116
}
63
117
},
118
+ "command" : " idf.py -p ${config:esp_device_port} -b ${config:esp_device_baud} monitor" ,
64
119
"problemMatcher" : []
65
120
},
66
121
{
67
- "label" : " Clean Project " ,
122
+ "label" : " Environment Check " ,
68
123
"type" : " shell" ,
69
- "command" : " ${config:esp_idf_command} fullclean" ,
124
+ "options" : {
125
+ "cwd" : " ${workspaceRoot}" ,
126
+ "env" : {
127
+ "PATH" : " ${config:esp_toolchain_paths}:${env:PATH}"
128
+ }
129
+ },
130
+ "command" : " printenv" ,
70
131
"problemMatcher" : []
71
132
},
72
133
]
73
- }
134
+ }
0 commit comments