gpt4 book ai didi

eclipse - OpenOCD 一次调试多个设备

转载 作者:行者123 更新时间:2023-12-04 22:11:31 26 4
gpt4 key购买 nike

我正在尝试在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com