SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By fabiobarrosoist
#173901
Hey guys! First post on this forum :D

Until recently, I have been using two JTAG interfaces to work with an Olimex AT91SAM7A2 board (ARM7 based), so I could work on a Linux environment (Ubuntu 14.04): one of them was for flashing purposes (Olimex usb-tiny-h) and another for debugging (SEGGER J-Link Edu).

Because it was not a very convenient solution (in terms of time and ease to use), I've opted to acquire a J-Link Plus, and so far i've been doing fine flashing my binary files on windows 7 through JFlash (SEGGER software) and compiling my project/debugging with JLinkGDBServer and Eclipse CDT on Linux.

This solution lets me use only one JTAG interface, which is handy, but i would prefer to keep doing everything (flashing and debugging) on one OS (Ubuntu).

TL:DR
I've tried several different configurations but I can't seem to be able to flash my code using openocd and J-Link Plus on Linux.


The following error occurs:
Code: Select all
Open On-Chip Debugger 0.7.0 (2013-10-22-08:31)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
adapter speed: 15000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
fast memory access is enabled
dcc downloads are enabled
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link V9 compiled Jul 28 2014 08:23:29
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 90000
Info : J-Link hw type J-Link
Info : J-Link max mem block 72112
Info : J-Link configuration
Info : USB-Address: 0x0
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.93 TCK = 1 TDI = 0 TDO = 1 TMS = 1 SRST = 0 TRST = 0
Info : J-Link JTAG Interface ready
Error: jlink_usb_read_emu_result retried requested = 1, result=0, in_length=1
Error: jlink_usb_read_emu_result failed (requested = 1, result=0)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Info : reduce speed request: 15000kHz to 12000kHz maximum
Info : clock speed 15000 kHz
Error: jlink_usb_read_emu_result retried requested = 1, result=0, in_length=1
Error: jlink_usb_read_emu_result failed (requested = 1, result=0)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Error: jlink_usb_read_emu_result retried requested = 1, result=0, in_length=1
Error: jlink_usb_read_emu_result failed (requested = 1, result=0)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Error: jlink_usb_read_emu_result retried requested = 1, result=0, in_length=1
Error: jlink_usb_read_emu_result failed (requested = 1, result=0)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Error: jlink_usb_read_emu_result retried requested = 1, result=0, in_length=1
Error: jlink_usb_read_emu_result failed (requested = 1, result=0)
Error: jlink_tap_execute, wrong result -107 (expected 1)
in procedure 'transport'
Runtime Error: openocd.cfg:16: 
in procedure 'script' 
at file "embedded:startup.tcl", line 58
in procedure 'init' called at file "openocd.cfg", line 16
Polling target at91sam7a1.cpu failed, GDB will be halted. Polling again in 100ms
(The polling continues indefinately...)

Has anyone managed to use openocd and a J-Link JTAG Interface? If so, I'll post my openocd configuration files here, to see if someone can help figuring out what seems to be the problem.

Thank you in advance,
Fábio