Browse Source

[DEVELOPMENT] Update vscode config templates for inav development

master
Alberto García Hierro 4 years ago
parent
commit
9d054d1be7
  1. 13
      dev/vscode/launch.json
  2. 33
      dev/vscode/tasks.json

13
dev/vscode/launch.json

@ -2,22 +2,27 @@
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// ******* INAV ********
// Define the following values in settings.json
// - BUILD_DIR: Relative path to the build directory
// - TARGET: Target name that you want to launch
"version": "0.2.0",
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "./obj/main/INAV_${config:TARGET}.elf",
"executable": "${config:BUILD_DIR}/bin/${config:TARGET}.elf",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"device": "${config:TARGET}",
"configFiles": [
"./obj/main/${config:TARGET}/openocd.cfg"
"${config:BUILD_DIR}/openocd/${config:TARGET}.cfg"
],
"preLaunchCommands": ["monitor arm semihosting enable"],
"preLaunchTask": "openocd-debug-prepare",
"svdFile": "./obj/main/${config:TARGET}/svd.svd",
"svdFile": "${config:BUILD_DIR}/svd/${config:TARGET}.svd",
}
]
}

33
dev/vscode/tasks.json

@ -5,14 +5,13 @@
"options": {
"env": {
"TARGET": "${config:TARGET}",
"SEMIHOSTING": "${config:SEMIHOSTING}"
}
},
"tasks": [
{
"label": "hex",
"label": "target",
"type": "shell",
"command": "make", "args": ["hex"],
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "${config:TARGET}"],
"problemMatcher": "$gcc",
"group": {
"kind": "build",
@ -25,45 +24,27 @@
}
},
{
"label": "elf",
"label": "flash",
"type": "shell",
"command": "make", "args": ["elf"],
"problemMatcher": "$gcc",
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
}
},
{
"label": "openocd-flash",
"type": "shell",
"command": "make", "args": ["openocd-flash"],
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "openocd_flash_${config:TARGET}"],
"dependsOn": "elf"
},
{
"label": "clean",
"type": "shell",
"command": "make", "args": ["clean"],
"problemMatcher": []
},
{
"label": "svd",
"type": "shell",
"command": "make", "args": ["svd"],
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "svd_${config:TARGET}"],
"problemMatcher": []
},
{
"label": "openocd-cfg",
"type": "shell",
"command": "make", "args": ["openocd-cfg"],
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "openocd_cfg_${config:TARGET}"],
"problemMatcher": []
},
{
"label": "openocd-debug-prepare",
"type": "shell",
"dependsOn": ["svd", "openocd-cfg", "openocd-flash"],
"dependsOn": ["svd", "openocd-cfg", "flash"],
"problemMatcher": []
}
]

Loading…
Cancel
Save