Search Posts

Remote riscv-qemu gdb in vscode

  1. install https://marketplace.visualstudio.com/items?itemName=webfreak.debug
  2. 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

Leave a Reply

Your email address will not be published. Required fields are marked *