openocd: targeting wrong serial port / device #52081
-
Describe the bug We have a Linux machine with two connected targets for our CI validation pipeline:
We use custom
These rules rely on the serial number of the connected device and are therefore bijective. Now, to the issue: when the two devices are connected to the same USB port through an external USB hub, For example, running tests for
always results in This issue is not present if the two devices are connected to different USB ports (we are able to flash either one correctly). To Reproduce
Expected behavior Targeting a specific serial port will result in Impact Major, disrupted CI workflow Environment (please complete the following information):
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Can you reproduce this by using e.g. |
Beta Was this translation helpful? Give feedback.
-
@henrikbrixandersen yes, I have tried to run:
The same device is selected no matter was is passed as |
Beta Was this translation helpful? Give feedback.
-
When using At least |
Beta Was this translation helpful? Give feedback.
-
@henrikbrixandersen Ok this explains it. Then selection is done based on order? Do you have a reference for a board configuration that DOES support the
It's not there indeed, we created our own configuration based on the |
Beta Was this translation helpful? Give feedback.
-
One example is the NEORV32 board definition: https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/riscv/neorv32/support/openocd.cfg
Correct. |
Beta Was this translation helpful? Give feedback.
When using
--serial
with theopenocd
west runner, the serial number is passed on to the openocd via the_ZEPHYR_BOARD_SERIAL
variable. The boardopenocd.cfg
file needs to support this.At least
boards/arm/nucleo_h743zi/support/openocd.cfg
does not support this variable. I don't see theOpenMV H7
board in-tree.