$ openocd -f interface/olimex-arm-usb-ocd-h.cfg -f target/cs351x.cfg
Open On-Chip Debugger 0.6.1 (2013-04-15-21:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Error: The specified debug interface was not found (ft2232)
The following debug interfaces are available:
Runtime Error: /usr/local/share/openocd/scripts/interface/olimex-arm-usb-ocd-h.cfg:7:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'interface' called at file "/usr/local/share/openocd/scripts/interface/olimex-arm-usb-ocd-h.cfg", line 7
usb 1-3: new high speed USB device using ehci_hcd and address 12
usb 1-3: New USB device found, idVendor=15ba, idProduct=002b
usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-3: Product: Olimex OpenOCD JTAG ARM-USB-OCD-H
usb 1-3: Manufacturer: Olimex
usb 1-3: SerialNumber: OLXXXXX
usb 1-3: configuration #1 chosen from 1 choice
Looking at the config.log, it seems the ft2232_libftdi was not selected. Maybe the configure supports the arg as “–enable-ft2232_libftdi”. I’d used --enable-ft2232_libftdi1 since I’ve libftdi1-1.0 version installed. Would this cause the configure not to select ft2232_libftdi?
I created sym links for libusb.* and libftdi.* . The ft2232 interface is available now.
Now I’ve to figure out how to get JTAG work -
openocd -f interface/olimex-arm-usb-ocd-h.cfg -f target/cs351x.cfg
Open On-Chip Debugger 0.6.1 (2013-05-03-18:41)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
dcc downloads are enabled
Info : max TCK change to: 30000 kHz
Error: An adapter speed is not selected in the init script. Insert a call to adapter_khz or jtag_rclk to proceed.
in procedure 'init'
I’m surprised you get an error rather than a warning. Anyway the syntax is
adapter_khz 500
```or similar. You can insert it in olimex-arm-usb-ocd-h.cfg, or create an openocd.cfg. Or you may be able to add it on the command line - not sure about syntax for that.
openocd -f interface/olimex-arm-usb-ocd-h.cfg -f target/cs351x.cfg
Open On-Chip Debugger 0.6.1 (2013-05-03-18:41)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 500 kHz
dcc downloads are enabled
Info : max TCK change to: 30000 kHz
Info : clock speed 500 kHz
Error: couldn't read enough bytes from FT2232 device (0 < 81)
Error: couldn't read from FT2232
Error: Trying to use configured scan chain anyway...
Error: couldn't read enough bytes from FT2232 device (0 < 2)
Error: couldn't read from FT2232
Warn : Bypassing JTAG setup events due to errors
Error: couldn't read enough bytes from FT2232 device (0 < 6)
Error: couldn't read from FT2232
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms
Any idea as why the JTAG scan chain interrogation is failing?
openocd -f interface/olimex-arm-usb-ocd-h.cfg -f target/cs351x.cfg
Open On-Chip Debugger 0.6.1 (2013-05-04-20:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 500 kHz
dcc downloads are enabled
Info : max TCK change to: 30000 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: cs351x.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 15
Error: unknown EmbeddedICE version (comms ctrl: 0xffffffff)
Info : cs351x.cpu: hardware has 2 breakpoint/watchpoint units
Error: fa526_change_to_arm: there is no Thumb state on FA526
Warn : ThumbEE -- incomplete support
I tried reducing the adapter clock speed upto 0 but didn’t help. The cables, JTAG port ( Arm 20pin 3.3V ) seems okay as far as I can tell. There is no external power source to the adapter. With the adapter clock 500kHz, openocd starts and allows gdb connection. But I couldn’t do target reset. There are no jumpers on the board.
(gdb) mon targets
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* cs351x.cpu fa526 little cs351x.cpu halted
This is my first time, so please bear with me as it’s all new to me. How do I check if the target is running some code which maybe using the JTAG port as GPIO?
This begins to sound like a hardware problem. Since the JTAG adapter is talking to openOCD, the first suspect might be the target. But the JTAG adapter could have hardware problems on the target side. I suppose you could check for activity on TCK, TDO, and TDI with a scope (or with a DMM at low clock speed) for clues. But it is much easier if you can obtain either a known-good target or a known good interface.
Does the target have any power LEDs or anything? Any way to tell if it is working?
It could be target code hijacking the JTAG pins. You can usually hold the target in reset while starting openOCD to circumvent that. If the target has no reset button you can make do with a piece of bus wire. (You may have to have a friend start openOCD - or hit the enter key with your nose.)
hsutherl:
This begins to sound like a hardware problem. Since the JTAG adapter is talking to openOCD, the first suspect might be the target. But the JTAG adapter could have hardware problems on the target side. I suppose you could check for activity on TCK, TDO, and TDI with a scope (or with a DMM at low clock speed) for clues. But it is much easier if you can obtain either a known-good target or a known good interface.
Does the target have any power LEDs or anything? Any way to tell if it is working?
It could be target code hijacking the JTAG pins. You can usually hold the target in reset while starting openOCD to circumvent that. If the target has no reset button you can make do with a piece of bus wire. (You may have to have a friend start openOCD - or hit the enter key with your nose.)
Thanks for taking time to reply. The target has a power LED on it and a reset switch. I’ve access to the serial console. The target is working. I suspect the target code is hijacking the JTAG. I tried earlier nSRST delay (100/500 ) earlier but didn’t do openocd restart. I tried as suggested now( openocd fire up ) but maybe I’m not doing it right way. With the reset switch pressed over 3 secs, the target reset and more than 5 secs it does FRESET ( full reset ). Would you mind to suggest a proper sequence of actions here?
It does sound like the reset switch is a soft key rather than a hardware reset. So I guess there is still a chance that gounding either nTRST or nRST or both (not trivial to do with the JTAG adapter installed) while starting openOCD might do the trick.
I think I have to look at each signal and see what’s going on. Is there a good logic analyzer supporting JTAG protocol out there which someone can recommend?