Skip to content

Commit f9bf93a

Browse files
committed
bricks/simhub: Debug locally with wall clock.
Use CI for fast tests. Locally, viewing the animation only makes sense at normal speed.
1 parent 4d43486 commit f9bf93a

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"name": "simhub",
9797
"type": "cppdbg",
9898
"request": "launch",
99-
"program": "${workspaceFolder}/bricks/simhub/build/firmware.elf",
99+
"program": "${workspaceFolder}/bricks/simhub/debug/firmware.elf",
100100
"args": [
101101
"${workspaceFolder}/tests/virtualhub/motor/car.py"
102102
],
@@ -122,7 +122,7 @@
122122
"ignoreFailures": false
123123
}
124124
],
125-
"preLaunchTask": "build simhub"
125+
"preLaunchTask": "build simhub (debug)"
126126
},
127127
{
128128
"name": "test-pbio",

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
"options": {
4646
"cwd": "${workspaceFolder}/bricks/simhub"
4747
},
48-
"label": "build simhub",
48+
"label": "build simhub (debug)",
4949
"type": "shell",
50-
"command": "poetry run make DEBUG=1 COPT=-O0 -j",
50+
"command": "poetry run make DEBUG=1 BUILD=debug COPT=-DPBDRV_CONFIG_CLOCK_LINUX -j",
5151
},
5252
{
5353
"label": "build test-pbio",

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ simhub: mpy-cross
8585
@$(MAKE) -C bricks/simhub CROSS_COMPILE=
8686

8787
clean-simhub: clean-mpy-cross
88-
@$(MAKE) -C bricks/simhub clean CROSS_COMPILE=
89-
@$(MAKE) -C bricks/simhub clean DEBUG=1
88+
@$(MAKE) -C bricks/simhub clean
89+
@$(MAKE) -C bricks/simhub clean
90+
@$(MAKE) -C bricks/simhub clean BUILD=debug
9091

9192

9293
mpy-cross:

bricks/simhub/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
debug/

0 commit comments

Comments
 (0)