Hi Guys,
I am having a hard time creating a launch configuration to debug an application on an embedded board using gdb.
For this we are using the latest version of CDT.cloud.Blueprint from November 2022.
What we want to do is launch gdb, which talks to OpenOCD and to be able to step through the code in Theia.
We are using an external gdb tool chain and are able to set the path to it using the “gdb” entry.
To simplify matters, we launch OpenOCD manually (instead of in a preDebugTask
) so we can concentrate on getting gdb launch correctly and to be able to step through the code in the IDE.
Here is our launch configuration:
{
"name": "Debug-gpio",
"type": "gdb",
"gdbNonStop": false,
"request": "launch",
"gdb": "/home/user/bin/riscv64-unknown-elf-gdb",
"program": "${workspaceFolder}/file-name.elf",
"initCommands": [
"set mem inaccessible-by-default off",
"set $target_riscv=1",
"set architecture riscv:rv64",
"file $"${workspaceFolder}/file-name.elf",
"target remote localhost:3333",
"load",
"thread apply all set $pc=_start",
"thread apply all set $mie=0",
"thread apply all set $mip=0",
"thread apply all set $mstatus=0"
]
}
We are unable to get to any break points that we have inserted in the IDE.
We assume that we should be able to do this, as we see the cdt-gdb-vscode (with the gdb-debug-adapter) is included in CDT.cloud.Blueprint
Any help with this would be greatly appreciated.