{ "version": "2.0.0", "tasks": [ { "label": "Configure CMake", "type": "shell", "command": "sh", "args": [ "-c", "cmake --preset Debug && cmake --preset Release" ], "problemMatcher": [] }, { "label": "Build", "type": "shell", "command": "cmake", "args": [ "--build", "--preset", "${input:build_type}", "--parallel" ], "group": { "kind": "build" }, "dependsOn": [ "Configure CMake" ] }, { "label": "Clean", "type": "shell", "command": "sh", "args": [ "-c", "'cmake --build build/Debug --target clean && cmake --build build/Release --target clean'", ], "group": "build", "problemMatcher": [] }, { "label": "Flash", "type": "shell", "command": "probe-rs", "args": [ "download", "--chip", "STM32H743II", "${workspaceFolder}/build/${input:build_type}/${workspaceFolderBasename}.elf", ], "group": "build", "dependsOn": [ "Build" ] }, { "label": "Build_Debug", "type": "shell", "command": "cmake", "args": [ "--build", "--preset", "Debug", "--parallel" ], "dependsOn": [ "Configure CMake" ] }, ], "inputs": [ { "id": "build_type", "type": "pickString", "options": [ "Debug", "Release" ], "description": "选择构建类型 (Select Build Type)", "default": "Debug" } ] }