Files
tinyusb/.vscode/tasks.json
T
Gordon McNab fa06bd01c9 Merge in upstream changes
Merge upstream changes and expand example support to hid examples.
2021-12-08 10:05:32 +00:00

176 lines
5.1 KiB
JSON

{
"version": "2.0.0",
"options": {
"env": {
// Set this to the type of example.
// Choices can be "device" or "host".
"exampleType": "device",
// Set this to the name of the example.
// The name is the folder name in the examples directory.
"exampleName": "cdc_msc",
// Set this to the name of the board to target.
"boardName": "mm900evxb"
}
},
"inputs": [
{
"type": "pickString",
"id": "pickExampleName",
"description": "Which example project do you want to use?",
"options": [
"board_test",
"cdc_msc",
"hid_boot_interface",
"hid_composite",
],
"default": "board_test"
},
{
"type": "pickString",
"id": "pickBoardName",
"description": "Which board type do you want to use?",
"options": [
"mm900ev1b",
"mm900ev2b",
"mm900ev3b"
],
"default": "mm900ev1b"
}
],
"tasks": [
{
"label": "test env",
"type": "shell",
"command": "echo",
"args": [
"$env:exampleName"
],
"problemMatcher": []
},
{
"label": "Build and Program (Memory)",
"dependsOrder": "sequence",
"dependsOn": [
"Build Project",
"Program Project (Memory)"
],
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "copy",
"args": [
"examples\\$env:exampleType\\$env:exampleName\\_build\\$env:boardName\\$env:exampleName.elf",
"examples\\$env:exampleType\\program.elf"
],
"problemMatcher": {
"pattern": {
"regexp": "^Error:\\s+(.*)$",
"message": 1
}
}
},
{
"label": "Build Project",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "make.exe",
"args": [
"-C",
"examples\\$env:exampleType\\$env:exampleName",
"BOARD=$env:boardName"
],
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Rebuild Project",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "make.exe",
"args": [
"-C",
"examples\\$env:exampleType\\$env:exampleName",
"BOARD=$env:boardName",
"-B"
],
"problemMatcher": [
"$gcc"
],
"group": "build"
},
{
"label": "Clean Project",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "make.exe",
"args": [
"-C",
"examples\\$env:exampleType\\$env:exampleName",
"BOARD=$env:boardName",
"clean"
],
"problemMatcher": [
"$gcc"
],
"group": "build"
},
{
"label": "Program Project (Flash)",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "C:\\Program Files (x86)\\Bridgetek\\FT9xx Toolchain\\Toolchain\\programmer\\dist\\FT900Prog.exe",
"args": [
"--loadflash",
"examples\\$env:exampleType\\$env:exampleName\\_build\\$env:boardName\\$env:exampleName.bin",
"--onewire",
"--noReset"
],
"problemMatcher": {
"pattern": {
"regexp": "^Error:\\s+(.*)$",
"message": 1
}
},
"dependsOn": "${defaultBuildTask}"
},
{
"label": "Program Project (Memory)",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "C:\\Program Files (x86)\\Bridgetek\\FT9xx Toolchain\\Toolchain\\programmer\\dist\\FT900Prog.exe",
"args": [
"--loadpm",
"examples\\$env:exampleType\\$env:exampleName\\_build\\$env:boardName\\$env:exampleName.bin",
"--onewire",
"--noReset"
],
"problemMatcher": {
"pattern": {
"regexp": "^Error:\\s+(.*)$",
"message": 1
}
},
"dependsOn": "${defaultBuildTask}"
}
],
}