env: add debug conf for vscode

This commit is contained in:
TT 2020-03-08 19:56:37 +09:00
parent ba5bf9c1ad
commit 608482a970
2 changed files with 37 additions and 6 deletions

31
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,31 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "OpenOCD-Debug",
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"executable": "build/ch.elf",
"configFiles": [
"interface/stlink.cfg",
"target/stm32f0x.cfg"
],
"cwd": "${workspaceRoot}",
"svdFile": "STM32F0x2.svd",
"device": "stm32f0x",
"preLaunchTask": "build",
},
{
"name": "STLink-Debug",
"type": "cortex-debug",
"request": "launch",
"servertype": "stutil",
"executable": "build/ch.elf",
"cwd": "${workspaceRoot}",
"svdFile": "STM32F0x2.svd",
"device": "stm32f0x",
"preLaunchTask": "build",
}
]
}

12
.vscode/tasks.json vendored
View file

@ -2,19 +2,19 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "make", "label": "build",
"type": "shell", "type": "shell",
"command": "make", "command": "make",
"group": "build" "group": {
"kind": "build",
"isDefault": true
}
}, },
{ {
"label": "flash", "label": "flash",
"type": "shell", "type": "shell",
"command": "make dfu flash", "command": "make dfu flash",
"group": { "group": "build"
"kind": "build",
"isDefault": true
}
} }
] ]
} }