【发布时间】:2022-07-08 03:56:56
【问题描述】:
我正在尝试将 GDB 附加到 QEMU 以用于我在 RISC-V 上的裸机项目。但是,它无法连接。我的主机是 Windows 机器上 WSL 的 Ubuntu。我正在使用 openSBI 提供的固件来启动我的自定义 \"bootloader\" (boot.bin)。
我运行 QEMU(在 Ubuntu WSL 中):
qemu-system-riscv64.exe --machine virt -m 256 -bios ./opensbi/build/platform/generic/firmware/fw_jump.bin -kernel ./boot.bin --nographic -s -S
然后我打开一个新的命令行(新的 Ubuntu WSL 窗口)并启动 GDB:
riscv-gnu/bin/riscv64-unknown-elf-gdb
并指定一个目标:
target remote localhost:1234
几秒钟后,这给了我错误:localhost:1234:连接超时。
有没有人遇到过这个问题,不胜感激!
标签: gdb qemu riscv bare-metal