OpenOCD 一次调试多个设备
OpenOCD debugging multiple devices at once
我正在尝试在 eclipse 上使用 openocd 同时调试多个设备。我有 2 个 STM32F303 发现板,我已将 hla_serial 标志设置为正确的板,但仍然没有运气。
单独的板子运行正常,但在尝试调试时 Eclipse 说它在最后一个序列中出错。
所以如果有人有这方面的经验。谢谢
我们可以在 openocd 0.9+ ONLY 中使用 hla_serial 选项。我建议从下载
GNU ARM Eclipse 项目或自己编译。
要获得 hla_serial,在阅读包含此选项的补丁 (http://openocd.zylin.com/#/c/2198/), more specific function "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'
因此在文件夹 board 上创建派生配置(例如 stm32f4discovery-mydevice1.cfg,假设使用了 stm32f4discovery) openocd根目录。使用像 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 同时调试多个设备。我有 2 个 STM32F303 发现板,我已将 hla_serial 标志设置为正确的板,但仍然没有运气。
单独的板子运行正常,但在尝试调试时 Eclipse 说它在最后一个序列中出错。
所以如果有人有这方面的经验。谢谢
我们可以在 openocd 0.9+ ONLY 中使用 hla_serial 选项。我建议从下载 GNU ARM Eclipse 项目或自己编译。
要获得 hla_serial,在阅读包含此选项的补丁 (http://openocd.zylin.com/#/c/2198/), more specific function "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'
因此在文件夹 board 上创建派生配置(例如 stm32f4discovery-mydevice1.cfg,假设使用了 stm32f4discovery) openocd根目录。使用像 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 项目中,为每个项目提供不同的电路板配置,您可以开始了。