Skip to content
Snippets Groups Projects
Unverified Commit de5ec2a2 authored by CNLohr's avatar CNLohr Committed by GitHub
Browse files

Merge pull request #298 from prosper00/master

tweaks to vscode debugging configs in template example
parents 99fb9c42 5427adcf
No related branches found
No related tags found
No related merge requests found
{
"configurations": [
{
"name": "Linux",
"name": "RISCV32EC",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/../../ch32v003fun"
"${workspaceFolder}../../ch32v003fun",
"/usr/include/newlib" //why? the configurationProvider ought to find this
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cppStandard": "c++14",
"intelliSenseMode": "linux-clang-x64",
"compilerArgs": [
"-DCH32V003FUN_BASE"
"defines": [
"CH32V003",
"__riscv",
"USE_SIGNALS",
"CH32V003FUN_BASE"
],
"compilerPath": "/usr/bin/riscv64-unknown-elf-gcc",
"cStandard": "gnu11",
"cppStandard": "gnu++17",
"intelliSenseMode": "gcc-x86", //works. Someday, intellisense might get riscv modes
"compilerArgs": [],
"configurationProvider": "ms-vscode.makefile-tools"
}
],
"version": 4
}
\ No newline at end of file
}
{
"configurations": [
{
"name": "GDB Debug Target",
"name": "cppdbg GDB Debug Target",
"type": "cppdbg",
"request": "launch",
"program": "template.elf",
"program": "${workspaceFolder}/template.elf",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"deploySteps": [
"deploySteps": [ // 'make ...gdbserver' doesn't seem to work here. The Makefile calls 'minichlink -baG'... Needs -aG. Easier to add minichlink as a seperate step below
{
"type": "shell", //isn't there some way to call a task from tasks.json?
"command": "make --directory=${workspaceFolder} -j 1 closechlink flash",
},
{
"type": "shell",
"continueOn": "GDBServer",
"command": "make --directory=${workspaceFolder} closechlink flash gdbserver"
"command": "${workspaceFolder}/../../minichlink/minichlink -aG",
"continueOn": "gdbserver running"
},
],
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
"ignoreFailures": true,
},
],
"svdPath": "${workspaceFolder}/../../misc/CH32V003xx.svd", // extension 'Peripheral Viewer' by mcu-debug (cortex-debug)
"miDebuggerPath": "gdb-multiarch",
"miDebuggerServerAddress": "127.0.0.1:2000"
"miDebuggerServerAddress": "localhost:2000",
"logging": {
"engineLogging": false
},
},
{
"name": "Run Only (In Terminal)",
......@@ -34,6 +42,6 @@
"request": "launch",
"program": "",
"preLaunchTask": "run_flash_and_gdbserver",
}
]
}
}
]
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
"makefile.launchConfigurations": [
{
"cwd": "",
"sbinaryPath": "blink.elf",
"sbinaryPath": "template.elf",
"binaryArgs": []
}
],
......@@ -11,5 +11,5 @@
"editor.tabSize": 4,
"files.associations": {
"ch32v003fun.h": "c"
}
}
},
}
\ No newline at end of file
......@@ -3,37 +3,53 @@
"tasks": [
{
"type": "shell",
"label": "flash",
"label": "build",
"presentation": {
"echo": true,
"focus": false,
"group": "build",
"panel": "shared",
"showReuseMessage" : false
"showReuseMessage": false
},
"group": {
"kind": "build",
"isDefault": true
},
"command": "make closechlink clean; make",
"problemMatcher": { // https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
},
},
"command": "make closechlink flash",
},
{
"type": "shell",
"label": "run_flash_and_gdbserver",
"command": "make closechlink flash gdbserver",
"presentation": {
"echo": true,
"focus": false,
"group": "build",
"panel": "shared",
"close": true,
"showReuseMessage" : false
"showReuseMessage": false
},
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}",
},
"runOptions": {
"instanceLimit": 2,
},
},
"group": "build",
"problemMatcher": {
"pattern": [
......@@ -44,13 +60,12 @@
"message": 3
}
],
"background": {
"activeOnStart": false,
"beginsPattern": "^.*Image written.*",
"endsPattern": "^.*GDBServer*"
}
},
}
},
]
}
}
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment