New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616162 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

EC: Board might not flash when two connected to computer simultaneously

Project Member Reported by twothreecc@google.com, May 31 2016

Issue description

When plugging in two different boards (in this case, stm32l476g-eval and nucleo-f072rb), one of the two boards will not be able to be flashed, showing the error:

Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x0bb11477
in procedure 'init' called at file "board/nucleo-f072rb/openocd-flash.cfg", line 14
in procedure 'ocd_bouncer'

make: *** [flash] Error 1
 
Owner: dnojiri@chromium.org
This is caused by openocd not able to distinguish one jtag adapter from another because the two boards use the same debugger chip (stlink) and default configuration files specify only vendor ID and product ID. 

The two boards can be distinguished using hla_serial command to further specify which board to use:

$ openocd -s /usr/local/share/openocd/scripts -f board/st_nucleo_f0.cfg -c 'hla_serial XXXXXXXXXXXXXXXXXXXXXXXX'

$ openocd -s /usr/local/share/openocd/scripts -f board/stm32l4discovery.cfg -c 'hla_serial YYYYYYYYYYYYYYYYYYYYYYYY'

One way to get a hla_serial is to specify a wrong serial and make openocd print a right serial in the debug output as explained in http://stackoverflow.com/a/29475074).

We can use this technique as workaround. It's better for us to send a patch to openocd.org to add a new command or update existing one (e.g. hla_device_desc).
Looks like openocd gets the serial string by calling out libusb_get_string_descriptor_ascii. So, lsusb can display it too:

  $ lsusb -d 0483:374b -v | grep iSerial

We want to integrate this when we automate test framework.
If openocd is launched side-by-side, TCL, GDB, Telnet ports conflict. The ports have to be specified explicitly.
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 2 2016

Labels: Hotlist-Google

Comment 5 by gkihumba@google.com, Mar 31 2017

Status: Assigned (was: Untriaged)

Sign in to add a comment