OPENOCD and NUCLEO-L476RG in LINUX

I’m trying to use the System Workbench for STM32 with the nucleo-l476rg.

I’m using Ubuntu 14.04 .

I have no problem importing and compiling cubeSTM settings projects, but attempting to debug from eclipse, openocd hangs (waiting the server to respond I suppose) with the message:

Error message from debugger back end:
localhost:3333: Connection timed out.

Launcing openocd from terminal and adding the log-file and debug options (-l mylog -d) I got in the last lines:

Info : 248 12 core.c:1388 adapter_init(): clock speed 1800 kHz
Debug: 249 12 openocd.c:137 handle_init_command(): Debug Adapter init complete
Debug: 250 12 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 251 12 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 253 12 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 254 12 hla_transport.c:154 hl_transport_init(): hl_transport_init
Debug: 255 12 hla_transport.c:171 hl_transport_init(): current transport hla_swd
Debug: 256 12 hla_interface.c:44 hl_interface_open(): hl_interface_open
Debug: 257 12 hla_layout.c:42 hl_layout_open(): hl_layout_open
Debug: 258 12 stlink_usb.c:1697 stlink_usb_open(): stlink_usb_open
Debug: 259 12 stlink_usb.c:1714 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x374b serial:
Error: 260 15 stlink_usb.c:1727 stlink_usb_open(): open failed
Debug: 261 15 hla_layout.c:49 hl_layout_open(): failed
Debug: 262 15 command.c:628 run_command(): Command failed with error code -4
User : 263 15 command.c:689 command_run_line(): in procedure ‘init’
in procedure ‘ocd_bouncer’
Debug: 264 15 command.c:628 run_command(): Command failed with error code -4
User : 265 15 command.c:689 command_run_line():
Debug: 266 15 hla_interface.c:119 hl_interface_quit(): hl_interface_quit

The error seems generated by the function usb_open(dev), but I’m not sure of this.

  • the usb device is regularly enumenrated (lsusb → Bus 002 Device 004: ID 0483:3748 STMicroelectronics ST-LINK/V2)

  • the permissions are normally write in the file /etc/udev/rules.d/49-stlinkv2.rules

*SUBSYSTEMS==“usb”, ATTRS{idVendor}==“0483”, ATTRS{idProduct}==“3748”, *
*MODE:=“0666”, *
SYMLINK+=“stlinkv2_%n”

  • the libusb-dev is installed (of course)

also, using a c simple test code which uses the function usb_open(), I got the following result:

bus/device idVendor/idProduct
002/004 0483/3748
- Manufacturer : STMicroelectronics
- Product : STM32 STLink
- Serial Number: 0672FF515456707067072452

and many other info regarding the USB device.

Pease, can someone confirm the compatibility of openocd with nucleo-l476rg in linux?
Thx

I solved my issue:

The on board STLink needs to be updated with STSW-LINK005.

http://www2.st.com/content/st_com/en/pr … nk005.html

Now I can write that nucleo-l476rg is compatible with openocd in linux.