- install https://marketplace.visualstudio.com/items?itemName=webfreak.debug
- create launch.json in .vscode folder
{
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"request": "attach",
"name": "Attach to gdbserver",
"gdbpath": "/opt/riscv/bin/riscv64-unknown-elf-gdb",
"executable": "kernel/kernel",
"target": "localhost:26000",
"remote": true,
"printCalls": true,
"cwd": "${workspaceRoot}",
"valuesFormatting": "parseText"
}
]
}
3. Change the no of hart to 1
ifndef CPUS
CPUS := 1
endif
Result : Step over fully work