You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to do it in VS Code. So I need to modify the tasks.json and launch.json:
tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "launch OpenOCD",
"type": "shell",
"command": "/path/to/openocd -c 'gdb_port 33333' -c 'tcl_port disabled;telnet_port disabled' -f /path/to/openocd_configfile &"
}
]
}
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/helloworld.elf",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"miDebuggerArgs": "-ex 'target remote 127.0.0.1:33333' -ex 'monitor reset halt' -ex 'load ${workspaceFolder}/helloworld.elf'",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "launch OpenOCD"
}
]
}
It seems like the executable file path ${workspaceFolder}/helloworld.elf in miDebuggerArgs is duplicated with the program and the miDebuggerPath is redundant.
Can I simplify them by adding some debugger args to remove the miDebuggerPath and the miDebuggerArgs?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello:
I have already debugged a baremetal (a hardware board) in terminal using openocd:
/path/to/openocd -c "gdb_port 33333" -c "tcl_port disabled; telnet_port disabled" -f "/path/to/openocd_configfile"
gdb -ex "target remote 127.0.0.1:33333" -ex "monitor reset halt" -ex "load /path/to/openocd_configfile"
I'm trying to do it in VS Code. So I need to modify the tasks.json and launch.json:
It seems like the executable file path
${workspaceFolder}/helloworld.elf
inmiDebuggerArgs
is duplicated with the program and themiDebuggerPath
is redundant.Can I simplify them by adding some debugger args to remove the
miDebuggerPath
and themiDebuggerArgs
?Beta Was this translation helpful? Give feedback.
All reactions