Skip to content

Commit

Permalink
vscode: add debug config for virtualhub
Browse files Browse the repository at this point in the history
This adds a virtualhub build task and debug config to allow debugging
the virtual hub code.
  • Loading branch information
dlech committed Feb 21, 2022
1 parent 20fa0ca commit a56fbba
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,42 @@
],
"preLaunchTask": "build ev3dev-host"
},
{
"name": "virtualhub",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bricks/virtualhub/build/virtualhub-micropython",
"args": [
"./tests/pup/motors/busy.py"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{
"name": "PYTHONPATH",
"value": "tests"
},
{
"name": "VIRTUALHUB_MODULE",
"value": "virtualhub.turtle"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Ignore timer signal",
"text": "handle SIG34 noprint pass",
"ignoreFailures": false
}
],
"preLaunchTask": "build virtualhub"
},
{
"name": "test-pbio",
"type": "cppdbg",
Expand Down
11 changes: 8 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@
{
"label": "build ev3dev-host",
"type": "shell",
"command": "make -C bricks/ev3dev DEBUG=1 -j8"
"command": "poetry run make -C bricks/ev3dev DEBUG=1 -j8"
},
{
"label": "build virtualhub",
"type": "shell",
"command": "poetry run make -C bricks/virtualhub DEBUG=1 CROSS_COMPILE= -j8"
},
{
"label": "build test-pbio",
"type": "shell",
"command": "make -C lib/pbio/test/ -j8"
"command": "poetry run make -C lib/pbio/test DEBUG=1 -j8"
},
{
"label": "build debug",
"type": "shell",
"command": "make -C bricks/debug DEBUG=1 build/firmware-no-checksum.bin -j8"
"command": "poetry run make -C bricks/debug DEBUG=1 build/firmware-no-checksum.bin -j8"
}
]
}

0 comments on commit a56fbba

Please sign in to comment.