eclipse - OpenOCD 一次调试多个设备

标签 eclipse debugging openocd

我正在尝试在 Eclipse 上使用 openocd 一次调试多个设备。我有 2 个 STM32F303 发现板,我已将 hla_serial 标志设置为适当的板,但仍然没有运气。

单独的电路板工作正常,但是在尝试调试时,Eclipse 说它在最后一个序列中出错。

所以如果有人有这方面的经验。谢谢

最佳答案

我们只能在 openocd 0.9+ 中使用 hla_serial 选项。我建议从下载
GNU ARM Eclipse 项目或自己编译。

要获得 hla_serial,在阅读包含此选项 ( http://openocd.zylin.com/#/c/2198/ ) 的补丁后发现的最简单方法,更具体的函数“string_descriptor_equal ”是提供错误的序列号,因此它将打印正确的序列号。

下面的命令将创建文件 log_with_correct_serial.txt 。当前使用的开关板配置文件。

openocd.exe -d3 -f board/stm32f4discovery.cfg  -c "hla_serial wrong_serial" 2>log_with_correct_serial.txt

打开 log_with_correct_serial.txt 你会在行中找到包含类似内容的正确序列
 Debug: 229 23 libusb1_common.c:67 string_descriptor_equal(): Device serial number 'xxxxxxxxxxx' doesn't match requested serial 'wrong_serial'

因此,在 openocd 根目录上的文件夹 board 内创建派生配置(例如 stm32f4discovery-mydevice1.cfg ,假设使用了 stm32f4discovery)。使用 Notepad++ 之类的东西来复制序列号,因为它是十六进制数字。
# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/252419.jsp
# hla_serial thanks to http://wunderkis.de/stlink-serialno/index.html

source [find board/stm32f4discovery.cfg]
hla_serial V?nIpSU)?

现在打开您的设备,您可以使用以下命令开始使用 ST-Link 适配器进行调试。
openocd.exe -f board/stm32f4discovery-mydevice1.cfg

在每个 eclipse 项目中,为每个项目提供不同的板配置,你很高兴。

关于eclipse - OpenOCD 一次调试多个设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29121050/

相关文章:

java - 如何获取SVN所有页面的历史记录

debugging - 调试器/异常如何在已编译的程序上工作?

ios - 将多个数组相加形成一个最终数组。调试 swift xcode

rust - Gdb:目标远程连接在错误的地方?

stm32f4discovery - OpenOCD - telnet 上传演示程序

java - 用于 MS SQL Server 的 Eclipse 中 Tomcat 的连接池

c - Eclipse C/C++ (CDT) 将文件导入项目 - 找不到头文件 - 包含路径

python - 如何为引发异常的 Python 控制台应用程序运行 Python 调试器

eclipse - 使用 OpenOCD 调试 STM32F1xx 探索板(ST-Link)

eclipse - 如何使用特定的jdk(而不是JDK_HOME)运行eclipse