如何在 OpenOCD 0.11.0 中启用 GDB 服务器?

时间:2021-05-24 19:43:30

标签: gdb openocd

我机器上的 Ubuntu 20 提供的 OpenOCD 版本是 0.10.0 我用这种方式对 FPGA 设备进行编程:

openocd -f arty_board.cfg -c 'init; pld load 0 {my_bitstream_file.bit}'

它正确地完成了工作。 默认情况下,它在端口 3333 上启动 GDB 服务器,在 4444 上启动 telnet,在 6666 上启动其他东西(我不知道)。

我已经从源代码构建了 OpenOCD,现在我有了 0.11.0+dev-00179-g4e872a797-dirty (2021-05-24-21:08) 版本 我以同样的方式启动它,但结果是我没有运行任何网络服务(我需要 GDB 服务器)。我还没有找到有关如何启用服务器的任何信息。从我看到的这些文档来看,如何更改参数(例如端口),而不是如何实际启动或启用它。 http://openocd.org/doc/html/Server-Configuration.html

如果更多的上下文会有用:
当我尝试连接到 GDB 中的服务器(tar rem :3333tar ext :3333)时出现此错误:

Info : accepting 'gdb' connection on tcp/3333
Error: Unknown flash device (ID 0x00000000)
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected

使用 gdb_memory_map disable 并连接到服务器导致 OpenOCD 出现分段错误,因此我决定使用更新的 OpenOCD。

我正在使用 GDB 11.0.50.20210521-git

0 个答案:

没有答案
相关问题