tasks.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. {
  2. "version": "2.0.0",
  3. "tasks": [
  4. {
  5. "label": "Build - Build project",
  6. "type": "shell",
  7. "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py build",
  8. "windows": {
  9. "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py build",
  10. "options": {
  11. "env": {
  12. "PATH": "${env:PATH};${config:idf.customExtraPaths}"
  13. }
  14. }
  15. },
  16. "options": {
  17. "env": {
  18. "PATH": "${env:PATH}:${config:idf.customExtraPaths}"
  19. }
  20. },
  21. "problemMatcher": [
  22. {
  23. "owner": "cpp",
  24. "fileLocation": [
  25. "relative",
  26. "${workspaceFolder}"
  27. ],
  28. "pattern": {
  29. "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  30. "file": 1,
  31. "line": 2,
  32. "column": 3,
  33. "severity": 4,
  34. "message": 5
  35. }
  36. },
  37. {
  38. "owner": "cpp",
  39. "fileLocation": "absolute",
  40. "pattern": {
  41. "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  42. "file": 1,
  43. "line": 2,
  44. "column": 3,
  45. "severity": 4,
  46. "message": 5
  47. }
  48. }
  49. ],
  50. "group": {
  51. "kind": "build",
  52. "isDefault": true
  53. }
  54. },
  55. {
  56. "label": "Set ESP-IDF Target",
  57. "type": "shell",
  58. "command": "${command:espIdf.setTarget}",
  59. "problemMatcher": {
  60. "owner": "cpp",
  61. "fileLocation": "absolute",
  62. "pattern": {
  63. "regexp": "^(.*):(//d+):(//d+)://s+(warning|error)://s+(.*)$",
  64. "file": 1,
  65. "line": 2,
  66. "column": 3,
  67. "severity": 4,
  68. "message": 5
  69. }
  70. }
  71. },
  72. {
  73. "label": "Clean - Clean the project",
  74. "type": "shell",
  75. "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py fullclean",
  76. "windows": {
  77. "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py fullclean",
  78. "options": {
  79. "env": {
  80. "PATH": "${env:PATH};${config:idf.customExtraPaths}"
  81. }
  82. }
  83. },
  84. "options": {
  85. "env": {
  86. "PATH": "${env:PATH}:${config:idf.customExtraPaths}"
  87. }
  88. },
  89. "problemMatcher": [
  90. {
  91. "owner": "cpp",
  92. "fileLocation": [
  93. "relative",
  94. "${workspaceFolder}"
  95. ],
  96. "pattern": {
  97. "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  98. "file": 1,
  99. "line": 2,
  100. "column": 3,
  101. "severity": 4,
  102. "message": 5
  103. }
  104. },
  105. {
  106. "owner": "cpp",
  107. "fileLocation": "absolute",
  108. "pattern": {
  109. "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  110. "file": 1,
  111. "line": 2,
  112. "column": 3,
  113. "severity": 4,
  114. "message": 5
  115. }
  116. }
  117. ]
  118. },
  119. {
  120. "label": "Flash - Flash the device",
  121. "type": "shell",
  122. "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} -b ${config:idf.flashBaudRate} flash",
  123. "windows": {
  124. "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py flash -p ${config:idf.portWin} -b ${config:idf.flashBaudRate}",
  125. "options": {
  126. "env": {
  127. "PATH": "${env:PATH};${config:idf.customExtraPaths}"
  128. }
  129. }
  130. },
  131. "options": {
  132. "env": {
  133. "PATH": "${env:PATH}:${config:idf.customExtraPaths}"
  134. }
  135. },
  136. "problemMatcher": [
  137. {
  138. "owner": "cpp",
  139. "fileLocation": [
  140. "relative",
  141. "${workspaceFolder}"
  142. ],
  143. "pattern": {
  144. "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  145. "file": 1,
  146. "line": 2,
  147. "column": 3,
  148. "severity": 4,
  149. "message": 5
  150. }
  151. },
  152. {
  153. "owner": "cpp",
  154. "fileLocation": "absolute",
  155. "pattern": {
  156. "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  157. "file": 1,
  158. "line": 2,
  159. "column": 3,
  160. "severity": 4,
  161. "message": 5
  162. }
  163. }
  164. ]
  165. },
  166. {
  167. "label": "Monitor: Start the monitor",
  168. "type": "shell",
  169. "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} monitor",
  170. "windows": {
  171. "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py -p ${config:idf.portWin} monitor",
  172. "options": {
  173. "env": {
  174. "PATH": "${env:PATH};${config:idf.customExtraPaths}"
  175. }
  176. }
  177. },
  178. "options": {
  179. "env": {
  180. "PATH": "${env:PATH}:${config:idf.customExtraPaths}"
  181. }
  182. },
  183. "problemMatcher": [
  184. {
  185. "owner": "cpp",
  186. "fileLocation": [
  187. "relative",
  188. "${workspaceFolder}"
  189. ],
  190. "pattern": {
  191. "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  192. "file": 1,
  193. "line": 2,
  194. "column": 3,
  195. "severity": 4,
  196. "message": 5
  197. }
  198. },
  199. {
  200. "owner": "cpp",
  201. "fileLocation": "absolute",
  202. "pattern": {
  203. "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  204. "file": 1,
  205. "line": 2,
  206. "column": 3,
  207. "severity": 4,
  208. "message": 5
  209. }
  210. }
  211. ],
  212. "dependsOn": "Flash - Flash the device"
  213. },
  214. {
  215. "label": "OpenOCD: Start openOCD",
  216. "type": "shell",
  217. "presentation": {
  218. "echo": true,
  219. "reveal": "never",
  220. "focus": false,
  221. "panel": "new"
  222. },
  223. "command": "openocd -s ${command:espIdf.getOpenOcdScriptValue} ${command:espIdf.getOpenOcdConfigs}",
  224. "windows": {
  225. "command": "openocd.exe -s ${command:espIdf.getOpenOcdScriptValue} ${command:espIdf.getOpenOcdConfigs}",
  226. "options": {
  227. "env": {
  228. "PATH": "${env:PATH};${config:idf.customExtraPaths}"
  229. }
  230. }
  231. },
  232. "options": {
  233. "env": {
  234. "PATH": "${env:PATH}:${config:idf.customExtraPaths}"
  235. }
  236. },
  237. "problemMatcher": {
  238. "owner": "cpp",
  239. "fileLocation": "absolute",
  240. "pattern": {
  241. "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
  242. "file": 1,
  243. "line": 2,
  244. "column": 3,
  245. "severity": 4,
  246. "message": 5
  247. }
  248. }
  249. },
  250. {
  251. "label": "adapter",
  252. "type": "shell",
  253. "command": "${config:idf.pythonBinPath}",
  254. "isBackground": true,
  255. "options": {
  256. "env": {
  257. "PATH": "${env:PATH}:${config:idf.customExtraPaths}",
  258. "PYTHONPATH": "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter"
  259. }
  260. },
  261. "problemMatcher": {
  262. "background": {
  263. "beginsPattern": "\bDEBUG_ADAPTER_STARTED\b",
  264. "endsPattern": "DEBUG_ADAPTER_READY2CONNECT",
  265. "activeOnStart": true
  266. },
  267. "pattern": {
  268. "regexp": "(\\d+)-(\\d+)-(\\d+)\\s(\\d+):(\\d+):(\\d+),(\\d+)\\s-(.+)\\s(ERROR)",
  269. "file": 8,
  270. "line": 2,
  271. "column": 3,
  272. "severity": 4,
  273. "message": 9
  274. }
  275. },
  276. "args": [
  277. "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter_main.py",
  278. "-e",
  279. "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
  280. "-s",
  281. "${command:espIdf.getOpenOcdScriptValue}",
  282. "-ip",
  283. "localhost",
  284. "-dn",
  285. "${config:idf.adapterTargetName}",
  286. "-om",
  287. "connect_to_instance"
  288. ],
  289. "windows": {
  290. "command": "${config:idf.pythonBinPathWin}",
  291. "options": {
  292. "env": {
  293. "PATH": "${env:PATH};${config:idf.customExtraPaths}",
  294. "PYTHONPATH": "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter"
  295. }
  296. }
  297. }
  298. }
  299. ]
  300. }