mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 03:19:58 +03:00
[DEVELOPMENT] Update vscode config templates for inav development
This commit is contained in:
parent
93723d0ad0
commit
9d054d1be7
2 changed files with 16 additions and 30 deletions
|
@ -2,22 +2,27 @@
|
||||||
// Use IntelliSense to learn about possible attributes.
|
// Use IntelliSense to learn about possible attributes.
|
||||||
// Hover to view descriptions of existing attributes.
|
// Hover to view descriptions of existing attributes.
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// 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",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Cortex Debug",
|
"name": "Cortex Debug",
|
||||||
"cwd": "${workspaceRoot}",
|
"cwd": "${workspaceRoot}",
|
||||||
"executable": "./obj/main/INAV_${config:TARGET}.elf",
|
"executable": "${config:BUILD_DIR}/bin/${config:TARGET}.elf",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "cortex-debug",
|
"type": "cortex-debug",
|
||||||
"servertype": "openocd",
|
"servertype": "openocd",
|
||||||
"device": "${config:TARGET}",
|
"device": "${config:TARGET}",
|
||||||
"configFiles": [
|
"configFiles": [
|
||||||
"./obj/main/${config:TARGET}/openocd.cfg"
|
"${config:BUILD_DIR}/openocd/${config:TARGET}.cfg"
|
||||||
],
|
],
|
||||||
"preLaunchCommands": ["monitor arm semihosting enable"],
|
|
||||||
"preLaunchTask": "openocd-debug-prepare",
|
"preLaunchTask": "openocd-debug-prepare",
|
||||||
"svdFile": "./obj/main/${config:TARGET}/svd.svd",
|
"svdFile": "${config:BUILD_DIR}/svd/${config:TARGET}.svd",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,14 +5,13 @@
|
||||||
"options": {
|
"options": {
|
||||||
"env": {
|
"env": {
|
||||||
"TARGET": "${config:TARGET}",
|
"TARGET": "${config:TARGET}",
|
||||||
"SEMIHOSTING": "${config:SEMIHOSTING}"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "hex",
|
"label": "target",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make", "args": ["hex"],
|
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "${config:TARGET}"],
|
||||||
"problemMatcher": "$gcc",
|
"problemMatcher": "$gcc",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
|
@ -25,45 +24,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "elf",
|
"label": "flash",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make", "args": ["elf"],
|
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "openocd_flash_${config:TARGET}"],
|
||||||
"problemMatcher": "$gcc",
|
|
||||||
"group": "build",
|
|
||||||
"presentation": {
|
|
||||||
"echo": true,
|
|
||||||
"reveal": "always",
|
|
||||||
"focus": false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "openocd-flash",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make", "args": ["openocd-flash"],
|
|
||||||
"dependsOn": "elf"
|
"dependsOn": "elf"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"label": "clean",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "make", "args": ["clean"],
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"label": "svd",
|
"label": "svd",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make", "args": ["svd"],
|
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "svd_${config:TARGET}"],
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "openocd-cfg",
|
"label": "openocd-cfg",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "make", "args": ["openocd-cfg"],
|
"command": "make", "args": ["-C", "${config:BUILD_DIR}", "openocd_cfg_${config:TARGET}"],
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "openocd-debug-prepare",
|
"label": "openocd-debug-prepare",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"dependsOn": ["svd", "openocd-cfg", "openocd-flash"],
|
"dependsOn": ["svd", "openocd-cfg", "flash"],
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue