Skip to main content
Topic: Openocd troubles (Read 2792 times) previous topic - next topic

Openocd troubles

Hi,

I'm trying to figure out how to use jtag debugging. The only thing I have on hand with jtag is a stellaris/tiva board. I've been trying to hook gdb to openocd using v2.5 bus blaster but no luck yet.

I can successfully connect to the interface, but problems when I try to use. I seem to be getting various different errors when doing scan. Been trying to get it going all day now, I'm not sure what I'm screwing up.

I get errors like the following:

Code: [Select]
Open On-Chip Debugger 0.7.0 (2013-05-22-13:14)
Licensed under GNU GPL v2
For bug reports, read

adapter speed: 2000 kHz
Info : only one transport option; autoselect 'jtag'
adapter speed: 500 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 500 kHz
Info : TAP lm3s.cpu does not have IDCODE
Warn : JTAG tap: lm3s.cpu      UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x0000, ver: 0x0)
Error: JTAG tap: lm3s.cpu  expected 1 of 1: 0x0ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x0)
Warn : Unexpected idcode after end of chain: 1 0xffff5fab
Warn : Unexpected idcode after end of chain: 33 0xaf55ffff
Warn : Unexpected idcode after end of chain: 97 0xffff57aa
Warn : Unexpected idcode after end of chain: 129 0xafd5ffff
Warn : Unexpected idcode after end of chain: 193 0xffff5faa
Warn : Unexpected idcode after end of chain: 225 0xbf55ffff
Warn : Unexpected idcode after end of chain: 257 0xfffffffe
Warn : Unexpected idcode after end of chain: 289 0xfffd7faa
Warn : Unexpected idcode after end of chain: 321 0xabf5fff7
Warn : Unexpected idcode after end of chain: 353 0xbffeffff
Warn : Unexpected idcode after end of chain: 385 0x7ffd57ff
Warn : Unexpected idcode after end of chain: 417 0xeaff55ff
Warn : Unexpected idcode after end of chain: 449 0xaaffafff
Warn : Unexpected idcode after end of chain: 481 0xfdfffd5f
Warn : Unexpected idcode after end of chain: 513 0xfaffd5ff
Warn : Unexpected idcode after end of chain: 545 0xaafeafff
Warn : Unexpected idcode after end of chain: 577 0x75fff57f
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: lm3s.cpu: IR capture error; saw 0x0e not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x4 in JTAG-DP transaction
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 100ms
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 300ms

Code: [Select]
Open On-Chip Debugger 0.8.0-dev-00193-gff12044 (2013-09-28-00:18)
Licensed under GNU GPL v2
For bug reports, read
adapter speed: 2000 kHz
Info : only one transport option; autoselect 'jtag'
adapter speed: 500 kHz
Info : clock speed 500 kHz
Info : JTAG tap: lm3s.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : lm3s.cpu: hardware has 6 breakpoints, 4 watchpoints
Warn : Timeout (1000ms) waiting for ACK=OK/FAULT in JTAG-DP transaction - aborting
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 100ms
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 300ms
Polling target lm3s.cpu succeeded again
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 100ms
Polling target lm3s.cpu succeeded again
Warn : Invalid ACK 0 in JTAG-DP transaction
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 100ms
Polling target lm3s.cpu succeeded again
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 100ms
Polling target lm3s.cpu succeeded again
target state: halted
target halted due to undefined, current mode: Thread
xPSR: 0x21000000 pc: 0x00003352 msp: 0x20000fe8

but mostly:
Code: [Select]
Open On-Chip Debugger 0.8.0-dev-00193-gff12044 (2013-09-28-00:18)
Licensed under GNU GPL v2
For bug reports, read
adapter speed: 2000 kHz
Info : only one transport option; autoselect 'jtag'
adapter speed: 500 kHz
Info : clock speed 500 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: lm3s.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 100ms
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 300ms
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 700ms
Polling target lm3s.cpu failed, GDB will be halted. Polling again in 1500ms

my config is as follows:
Code: [Select]
adapter_khz 2000
#source [find interface/busblaster.cfg]
source [find interface/ftdi/dp_busblaster.cfg]
source [find target/stellaris.cfg]

I've tried using ftd2xx and just libftdi drivers for openocd, does not seem to make any difference.

I started with default buffer logic, then ran self tests, showing no errors, so I don't think its a HW thing. then loaded BBv2-JTAGkey-v1.4-verilog.svf, which worked, but did not fix anything.

I'm leaving JP4 open, and have not connected up power for target, only connected gound. Target is powered via USB. Could this cause any issues?