set jtag=jlink, j-link was seen in windows hw manager, but OpenOCD still failed

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello

I use segger jlink to download on wiced sdk 3.4.0.  in windows 10 64 bit

I saw this tread https://community.broadcom.com/message/8850#8850

Jlink support for wiced sdk not working.

and followed

1.download libusb driver - link (http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1....)
2.extract

3.run the app "inf-wizard" in libusb-win32-bin-1.2.6.0\bin
4.select jlink
5.complete driver installation.

6.Changethe line in the file wiced_toolchain_common.mk from:

    JTAG ?= BCM9WCD1EVAL1

    to

    JTAG ?= jlink

7.add the parameter JTAG=jlink to the make target.

8.Try loading with wiced sdk, now it should work.

And I add {   reset_config trst_and_srst srst_push_pull srst_nogate connect_assert_srst } in jlink.cfg

but still failed on download.

螢幕快照 2016-06-04 12.07.17.png

Here is the openocd_log :

Open On-Chip Debugger 0.9.0-00029-g9f797a3-dirty (2015-09-16-09:22)

Licensed under GNU GPL v2

For bug reports, read

  http://openocd.org/doc/doxygen/bugs.html

trst_and_srst separate srst_nogate trst_push_pull srst_push_pull connect_assert_srst

adapter speed: 1000 kHz

adapter_nsrst_delay: 100

Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

Error: J-Link command 0x01 failed (0)

Error: J-Link command EMU_CMD_VERSION failed (0)

Info : J-Link JTAG Interface ready

Error: J-Link command 0xdd failed (0)

Error: J-Link command 0xdf failed (0)

Error: J-Link setting speed failed (0)

Error: usb_bulk_write failed (requested=6, result=0)

Error: jlink_tap_execute failed USB io (-107)

Error: J-Link setting speed failed (0)

After that I found the thread

https://community.broadcom.com/message/19009#19009

He had same openocd_log as mine, but no answer for him.

Could any one give me any suggestion to solve this issue ?

Thank you.

0 Likes
4 Replies
user_2177781
Level 5
Level 5
25 likes received 10 likes received 5 likes given

I can see that you are using OpenOCD 0.9.0, I did not manage to get my j-link working using this version, so I manually rolled OpenOCD back to version 0.8.0 (which is included in some of the older SDK releases), and this solves the issue for me.

I later moved to a Olimex based JTAG, which works fine with OpenOCD 0.9.0.

Anonymous
Not applicable

Hi renejos,

Thank you for replied.

I replace OpenOCD 0.9.0 to OpenOCD 0.8.0 which copy from WICED-SDK-3.1.2 .

the log has changed but download failed.

Do you have any idea where goes wrong ?

Here is the log :

Open On-Chip Debugger 0.8.0-dev-00139-g4dfe8d5-dirty (2013-08-22-12:22)

Licensed under GNU GPL v2

For bug reports, read

  http://openocd.sourceforge.net/doc/doxygen/bugs.html

Info : only one transport option; autoselect 'jtag'

trst_and_srst separate srst_nogate trst_push_pull srst_push_pull connect_assert_srst

adapter speed: 1000 kHz

adapter_nsrst_delay: 100

jtag_ntrst_delay: 100

Warn : target name is deprecated use: 'cortex_m'

jtag_init

Info : J-Link initialization started / target CPU reset initiated

Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46

Info : J-Link caps 0xb9ff7bbf

Info : J-Link hw version 80000

Info : J-Link hw type J-Link

Info : J-Link max mem block 9224

Info : J-Link configuration

Info : USB-Address: 0x0

Info : Kickstart power on JTAG-pin 19: 0xffffffff

Info : Vref = 3.287 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0

Info : J-Link JTAG Interface ready

Info : clock speed 1000 kHz

Polling target stm32f4xx.cpu failed, GDB will be halted. Polling again in 100ms

Info : TAP stm32f4xx.cpu does not have IDCODE

Warn : JTAG tap: stm32f4xx.cpu       UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x0000, ver: 0x0)

Error: JTAG tap: stm32f4xx.cpu  expected 1 of 1: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)

Info : TAP stm32f4xx.bs does not have IDCODE

Warn : JTAG tap: stm32f4xx.bs       UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x0000, ver: 0x0)

Error: JTAG tap: stm32f4xx.bs  expected 1 of 1: 0x06413041 (mfg: 0x020, part: 0x6413, ver: 0x0)

Warn : Unexpected idcode after end of chain: 2 0x00000000

Warn : Unexpected idcode after end of chain: 34 0x00000000

Warn : Unexpected idcode after end of chain: 66 0x00000000

Warn : Unexpected idcode after end of chain: 98 0x00000000

Warn : Unexpected idcode after end of chain: 130 0x00000000

Warn : Unexpected idcode after end of chain: 162 0x00000000

Warn : Unexpected idcode after end of chain: 194 0x00000000

Warn : Unexpected idcode after end of chain: 226 0x00000000

Warn : Unexpected idcode after end of chain: 258 0x00000000

Warn : Unexpected idcode after end of chain: 290 0x00000000

Warn : Unexpected idcode after end of chain: 322 0x00000000

Warn : Unexpected idcode after end of chain: 354 0x00000000

Warn : Unexpected idcode after end of chain: 386 0x00000000

Warn : Unexpected idcode after end of chain: 418 0x00000000

Warn : Unexpected idcode after end of chain: 450 0x00000000

Warn : Unexpected idcode after end of chain: 482 0x00000000

Warn : Unexpected idcode after end of chain: 514 0x00000000

Warn : Unexpected idcode after end of chain: 546 0x00000000

Warn : Unexpected idcode after end of chain: 578 0x00000000

Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)

Error: Trying to use configured scan chain anyway...

Error: stm32f4xx.cpu: IR capture error; saw 0x00 not 0x01

Warn : Bypassing JTAG setup events due to errors

Info : Selecting JTAG transport command set.

Warn : Invalid ACK 0 in JTAG-DP transaction

in procedure 'transport'

Runtime Error: ./tools/OpenOCD/stm32f4x-flash-app.cfg:10:

in procedure 'script'

at file "embedded:startup.tcl", line 58

in procedure 'init' called at file "./tools/OpenOCD/stm32f4x-flash-app.cfg", line 10

Open On-Chip Debugger 0.8.0-dev-00139-g4dfe8d5-dirty (2013-08-22-12:22)

0 Likes

I remember that there was some threads about this topic and some modification could be needed.

See seyhans comment in this thread: JTAG (J-Link) not working when programming first time?

Anonymous
Not applicable

You can try with openocd in SDK-2.4.1

1> Replace file openocd-all-brcm-libftdi.exe.

2> Change the stm32f2x.cfg script as bellow :

Change to :

$_TARGETNAME configure -work-area-phys $CHIP_RAM_START -work-area-size $_WORKAREASIZE -work-area-backup 0

And change to :

# if srst is not fitted use SYSRESETREQ to

# perform a soft reset

#cortex_m3 reset_config srst

reset_config srst_only

Good luck