Skip to content

Instantly share code, notes, and snippets.

@byq77
Last active November 15, 2018 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byq77/92eb0984bddce011ed158a83d1b45047 to your computer and use it in GitHub Desktop.
Save byq77/92eb0984bddce011ed158a83d1b45047 to your computer and use it in GitHub Desktop.
Example of task.json for mbed cli project in Visual Studio Code IDE
{
"version": "2.0.0",
"tasks": [
{
"label": "build release clean",
"type": "shell",
"command": "mbed",
"args": ["compile", "--profile", "release", "-c", "-N", "firmware"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern":
{
"regexp": "^(\\[ERROR\\])*\\s*(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 2,
"line": 3,
"column": 4,
"severity": 5,
"message": 6
}
}
},
{
"label": "build release",
"type": "shell",
"command": "mbed",
"args": ["compile", "--profile", "release", "-N", "firmware"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern":
{
"regexp": "^(\\[ERROR\\])*\\s*(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 2,
"line": 3,
"column": 4,
"severity": 5,
"message": 6
}
}
},
{
"label": "flash release app",
"type": "shell",
"command": "nrfjprog",
"args": ["--family", "NRF52", "--program", "./BUILD/NRF52_DK/GCC_ARM-RELEASE/firmware_application.hex", "--sectorerase", "--reset"]
}
]
}
@byq77
Copy link
Author

byq77 commented Nov 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment