我使用St-write将.bin烧录到STM32F4并看到了我期望的消息。现在,我希望了解GPIO是如何初始化的。因此,我使用 OpenOCD 和 arm-none-eabi-gdb 来做到这一点。这是我的过程。
$ minicom
$ openocd -f /opt/openocd/share/openocd/scripts/board/stm32f4discovery.cfg
$ arm-none-eabi-gdb main.elf
(gdb) target remote localhost:3333
(gdb) localhost:3333: Connection timed out.
如何查看 OpenOCD 的端口?为什么会出现超时的情况呢?
最佳答案
这肯定意味着 openocd 没有启动或者端口正忙。
通常,您使用:
openocd -f board/stm32f4discovery.cfg
您应该检查您的 session 是否正在运行。
关于GDB连接超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20728963/