7 Replies Latest reply on Mar 31, 2016 12:22 AM by jone_yi_1844281

    OpenOCD failure on OS X - jlink - WICED-SDK-3.4.0

    mickael.toumi_1583836

      I have an issue with the OpenOCD running on OS X 10.11.1 (El Capitan). My setup includes a jlink JTAG debugger as well as the Broadcom EVB including the BCM43341 (BCM943341WCD1).

       

      The command that I run under Make Project is the following:

       

      demo.MYPROJECT-BCM943341WCD1-debug JTAG=jlink debug

       

      The result of this command is very similar to some other posts. I do see after the build summary the following error printed three times:

       

      **** OpenOCD failed - ensure you have installed the driver from the drivers directory, and that the debugger is not running **** In Linux this may be due to USB access permissions. In a virtual machine it may be due to USB passthrough settings. Check in the task list that another OpenOCD process is not running. Check that you have the correct target and JTAG device plugged in. ****

       

      If I change the Make Project command as follow: demo.MYPROJECT-BCM943341WCD1-debug JTAG=jlink debug VERBOSE=1

      to be able to extract one of the commands that creates the issue. I found the following command:

       

      ./tools/OpenOCD//OSX/openocd-all-brcm-libftdi --enable-ftdi -f ./tools/OpenOCD/jlink.cfg -f ./tools/OpenOCD/stm32f4x.cfg -f ./tools/OpenOCD/stm32f4x-flash-app.cfg -c "verify_image_checksum build/demo.MYPROJECT-BCM943341WCD1-debug/binary/demo.MYPROJECT-BCM943341WCD1-debug.stripped.elf" -c shutdown

       

      I ran the same command including: --debug=3 so OpenOCD will add more logs. I found this here:

       

      Info : 253 2158 jlink.c:573 jlink_init(): J-Link JTAG Interface ready

      Debug: 254 2158 jlink.c:705 jlink_reset(): trst: 0, srst: 0

      Debug: 255 2162 log.c:422 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (2162). This may cause trouble with GDB connections.

      Debug: 257 2163 core.c:1591 adapter_khz_to_speed(): convert khz to interface specific speed value

      Debug: 258 2163 core.c:1594 adapter_khz_to_speed(): have interface set up

      Debug: 259 2164 core.c:1591 adapter_khz_to_speed(): convert khz to interface specific speed value

      Debug: 260 2164 core.c:1594 adapter_khz_to_speed(): have interface set up

      Info : 261 2164 core.c:1386 adapter_init(): clock speed 1000 kHz

      Debug: 262 2164 openocd.c:137 handle_init_command(): Debug Adapter init complete

      Debug: 263 2164 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init

      Debug: 264 2164 command.c:145 script_debug(): command - ocd_transport ocd_transport init

      Debug: 266 2164 transport.c:240 handle_transport_init(): handle_transport_init

      Debug: 267 2164 jlink.c:705 jlink_reset(): trst: 0, srst: 0

      Debug: 268 2164 core.c:730 jtag_add_reset(): SRST line released

      Debug: 269 2164 core.c:754 jtag_add_reset(): TRST line released

      Debug: 270 2164 core.c:328 jtag_call_event_callbacks(): jtag event: TAP reset

      Debug: 271 2379 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag_reset 1 1

      Debug: 272 2379 command.c:145 script_debug(): command - jtag_reset ocd_jtag_reset 1 1

      Error: 274 2379 core.c:676 jtag_add_reset(): BUG: can't assert SRST

      Debug: 275 2379 command.c:628 run_command(): Command failed with error code -4

      Debug: 276 2379 command.c:628 run_command(): Command failed with error code -4

      User : 277 2379 command.c:689 command_run_line(): in procedure 'init' called at file "./tools/OpenOCD/stm32f4x-flash-app.cfg", line 10

      in procedure 'ocd_bouncer'

      Debug: 278 2379 command.c:628 run_command(): Command failed with error code -4

      User : 279 2379 command.c:689 command_run_line():

       

      I will follow the post here (Re: OS  X version of WICED SDK 3.1.1 posted ) with an Olimex debugger this time and see if I can get it working. The understanding is that the OpenOCD is conflicting with the native FTDI driver.

       

      Please comment this post if you find a way to get the Jlink running on OS X.