Template
230 lines
7.2 KiB
JSON
230 lines
7.2 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Build",
|
|
"type": "cmake",
|
|
"command": "build",
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true
|
|
},
|
|
"problemMatcher": [
|
|
{
|
|
"base": "$gcc",
|
|
"fileLocation": [
|
|
"relative",
|
|
"${command:cmake.buildDirectory}"
|
|
]
|
|
}
|
|
],
|
|
"options": {
|
|
"environment": {
|
|
"CLICOLOR_FORCE": "1",
|
|
"OPENOCD_SCRIPTS": "${env:GD32_OPENOCD_SCRIPTS}"
|
|
}
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "code",
|
|
"tooltip": "Build"
|
|
}
|
|
},
|
|
{
|
|
"label": "Build and Flash",
|
|
"dependsOn": [
|
|
"Build",
|
|
"Flash MCU"
|
|
],
|
|
"dependsOrder": "sequence",
|
|
"group": "build",
|
|
"icon": {
|
|
"id": "insert",
|
|
"tooltip": "Build and Flash"
|
|
}
|
|
},
|
|
{
|
|
"label": "Flash MCU",
|
|
"type": "process",
|
|
"command": "${env:GD32_OPENOCD_BIN}/openocd.exe",
|
|
"args": [
|
|
"-s", "${env:GD32_OPENOCD_SCRIPTS}",
|
|
"-f", "${env:GD32_OPENOCD_SCRIPTS}/${config:gd32.openocd.targetConfig}",
|
|
"-c", "init; reset halt; flash write_image erase ${command:cmake.launchTargetFilename}; reset; exit"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${command:cmake.buildDirectory}/Application",
|
|
"environment": {
|
|
"OPENOCD_SCRIPTS": "${env:GD32_OPENOCD_SCRIPTS}"
|
|
}
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "gather",
|
|
"tooltip": "Flash MCU"
|
|
}
|
|
},
|
|
{
|
|
"label": "Reset MCU",
|
|
"type": "process",
|
|
"command": "${env:GD32_OPENOCD_BIN}/openocd.exe",
|
|
"args": [
|
|
"-s", "${env:GD32_OPENOCD_SCRIPTS}",
|
|
"-f", "${env:GD32_OPENOCD_SCRIPTS}/${config:gd32.openocd.targetConfig}",
|
|
"-c", "init; reset; exit"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${command:cmake.buildDirectory}/Application",
|
|
"environment": {
|
|
"OPENOCD_SCRIPTS": "${env:GD32_OPENOCD_SCRIPTS}"
|
|
}
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "discard",
|
|
"tooltip": "Reset MCU"
|
|
}
|
|
},
|
|
{
|
|
"label": "Mass Erase MCU",
|
|
"type": "process",
|
|
"command": "${env:GD32_OPENOCD_BIN}/openocd.exe",
|
|
"args": [
|
|
"-s", "${env:GD32_OPENOCD_SCRIPTS}",
|
|
"-f", "${env:GD32_OPENOCD_SCRIPTS}/${config:gd32.openocd.targetConfig}",
|
|
"-c", "init; reset halt; ${config:gd32.openocd.massEraseCommand}; exit"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${command:cmake.buildDirectory}/Application",
|
|
"environment": {
|
|
"OPENOCD_SCRIPTS": "${env:GD32_OPENOCD_SCRIPTS}"
|
|
}
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "clear-all",
|
|
"tooltip": "Erase MCU"
|
|
}
|
|
},
|
|
{
|
|
"label": "OpenOCD Server",
|
|
"type": "process",
|
|
"command": "${env:GD32_OPENOCD_BIN}/openocd.exe",
|
|
"args": [
|
|
"-s", "${env:GD32_OPENOCD_SCRIPTS}",
|
|
"-f", "${env:GD32_OPENOCD_SCRIPTS}/${config:gd32.openocd.targetConfig}"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${command:cmake.buildDirectory}/Application",
|
|
"environment": {
|
|
"OPENOCD_SCRIPTS": "${env:GD32_OPENOCD_SCRIPTS}"
|
|
}
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
}
|
|
},
|
|
{
|
|
"label": "Build and Flash (Jlink)",
|
|
"dependsOn": [
|
|
"Build",
|
|
"Flash MCU (Jlink)"
|
|
],
|
|
"dependsOrder": "sequence",
|
|
"group": "build",
|
|
"icon": {
|
|
"id": "insert",
|
|
"tooltip": "Build and Flash (Jlink)"
|
|
}
|
|
},
|
|
{
|
|
"label": "Flash MCU (Jlink)",
|
|
"type": "process",
|
|
"command": "JLink.exe",
|
|
"args": [
|
|
"-device", "${config:gd32.jlink.device}",
|
|
"-if", "${config:gd32.jlink.interface}",
|
|
"-speed", "${config:gd32.jlink.speed}",
|
|
"-autoconnect", "1",
|
|
"-CommanderScript", "${workspaceFolder}/.vscode/flash.jlink"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${command:cmake.buildDirectory}/Application"
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "gather",
|
|
"tooltip": "Flash MCU (Jlink)"
|
|
}
|
|
},
|
|
{
|
|
"label": "Reset MCU (Jlink)",
|
|
"type": "process",
|
|
"command": "JLink.exe",
|
|
"args": [
|
|
"-device", "${config:gd32.jlink.device}",
|
|
"-if", "${config:gd32.jlink.interface}",
|
|
"-speed", "${config:gd32.jlink.speed}",
|
|
"-autoconnect", "1",
|
|
"-CommanderScript", "${workspaceFolder}/.vscode/reset.jlink"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "discard",
|
|
"tooltip": "Reset MCU (Jlink)"
|
|
}
|
|
},
|
|
{
|
|
"label": "Mass Erase MCU (Jlink)",
|
|
"type": "process",
|
|
"command": "JLink.exe",
|
|
"args": [
|
|
"-device", "${config:gd32.jlink.device}",
|
|
"-if", "${config:gd32.jlink.interface}",
|
|
"-speed", "${config:gd32.jlink.speed}",
|
|
"-autoconnect", "1",
|
|
"-CommanderScript", "${workspaceFolder}/.vscode/erase.jlink"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
"presentation": {
|
|
"clear": true
|
|
},
|
|
"icon": {
|
|
"id": "clear-all",
|
|
"tooltip": "Erase MCU (Jlink)"
|
|
}
|
|
}
|
|
]
|
|
}
|