Please note that I’ve only started yesterday with OpenOCD.
I’m trying to get OpenOCD and Segger JLink up and running. For some reason, OpenOCD cannot find a JLink interface. OpenOCD (debug level 3) reports the following error:
Error: 71 31 jlink.c:295 jlink_init(): Cannot find jlink Interface! Please check connection and permissions.
Debug: 72 31 command.c:427 run_command(): Command failed with error code -100
User : 73 31 command.c:626 openocd_jim_vfprintf(): Runtime error, file "command.c", line 456:
Where do I start to solve this type of errors?
My sourced cfg file:
telnet_port 4444
gdb_port 3333
interface jlink
jtag_speed 0
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc2368
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4F1F0F0F
}
reset_config trst_and_srst srst_pulls_trst
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
flash bank lpc2000 0x0 0x80000 0 0 0 lpc2000_v2 12000 calc_checksum
flash bank cfi 0x80000000 0x400000 2 2 0
I’m using a windows build with --enable-jlink. I don’t think that there exists a Windows version of lsusb. In any case, the Segger tools find the j-link and IAR can flash over the j-link.
Your feedback is appreciated!
Regards,
Bart
kasi:
hi deboeck,
first of all did u configure and compile openocd using the switch :
./configure --enable-jlink
if not get the latest source from svn and configure with this option
if that doesnt give u the solution then check whether the jlinks vendor and device id are shown using lsusb -v
i used openocd on linux that’s why i asked you to check for lsusb, which is pretty handy. i dont have that much of an idea how the support for jlink in windows is (normally that shudnt be a problem i guess ), but openocd is going to work the same way on both linux and windows.so from my perspective ther shud nt be any problem with the debugger.
segger’s jlink has very good support and i suggest you to spend some time brewing ther website and the openocd source code to get a clear idea.
There are two ways of installing the jlink driver, either using the inf as detailed above or using the libusb filter driver.
The issue will be if using the inf then you will not be able to use the standard jlink tools. Using the filter driver you will be able to use both, however the filter drivers has issues on certain systems (vista).
Be warned the jlink openocd support is not 100%, you will get better performance using a ftdi based dongle.