I am using openOCD 0.1.0 with a telnet session on a str912 comstick. Startup of the openOCD and configuration of the access to the board eems to work well. but when I enter the RESET command (RESET, RESET RUN, RESET HALT), the tap str912.cpu gets missconfigured and I have found no possibility, to reconfigure the tap. The only way to continue with work is to shutdown the openOCD, disconnect the stick (power it down) and restart the complete session.
Is somebody out there, who can help?
the main configuration script (openOCD.cfg):
set _CHIPNAME str91x
set _ENDIAN little
telnet_port 4444
gdb_port 3333
debug_level 3
source [find etc/oOCD-interface.cfg]
source [find etc/oOCD-target.cfg]
the interface configuration cript (etc/oOCD-interface.cfg):
interface ft2232
ft2232_device_desc “STR9-comStick A”
ft2232_layout comstick
the target configuration script (etc/oOCD-target.cfg):
jtag_khz 3000
jtag_nsrst_delay 100
jtag_ntrst_delay 100
reset_config trst_and_srst
if { [info exists FLASHTAPID ] } {
set _FLASHTAPID $FLASHTAPID
} else {
set _FLASHTAPID 0x04570041
}
jtag newtap $_CHIPNAME flash -irlen 8 -ircapture 0x1 -irmask 0x1 -expected-id $_FLASHTAPID
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x25966041
}
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
if { [info exists BSTAPID ] } {
set _BSTAPID $BSTAPID
} else {
set _BSTAPID 0x1457f041
}
jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID
set _TARGETNAME [format “%s.cpu” $_CHIPNAME]
target create $_TARGETNAME arm966e -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm966e
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x50000000 -work-area-size 16384 -work-area-backup 0
flash bank str9x 0x00000000 0x00080000 0 0 0
the following is some output from the telnet session (after uccessful startup):
Open On-Chip Debugger
scan_chain
TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr
—|--------------------|---------|------------|------------|------|------|------|---------
0 | str91x.flash | Y | 0x04570041 | 0x04570041 | 0x08 | 0x01 | 0x01 | 0xff
1 | str91x.cpu | Y | 0x25966041 | 0x25966041 | 0x04 | 0x01 | 0x0f | 0x0c
2 | str91x.bs | Y | 0x1457f041 | 0x1457f041 | 0x05 | 0x01 | 0x01 | 0x1f
poll
target state: running
halt
target state: halted
target halted in ARM state due to debug-request, current mode: User
cpsr: 0x20000010 pc: 0x00004e44
poll
target state: halted
target halted in ARM state due to debug-request, current mode: User
cpsr: 0x20000010 pc: 0x00004e44
scan_chain
TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr
—|--------------------|---------|------------|------------|------|------|------|---------
0 | str91x.flash | Y | 0x04570041 | 0x04570041 | 0x08 | 0x01 | 0x01 | 0xff
1 | str91x.cpu | Y | 0x25966041 | 0x25966041 | 0x04 | 0x01 | 0x0f | 0x0c
2 | str91x.bs | Y | 0x1457f041 | 0x1457f041 | 0x05 | 0x01 | 0x01 | 0x1f
reset halt
JTAG tap: str91x.flash tap/device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)
JTAG Tap/device matched
Tap/Device does not have IDCODE
JTAG tap: str91x.cpu got: 0x00000000 (mfg: 0x000, part: 0x0000, ver: 0x0)
JTAG tap: str91x.cpu expected 1 of 1: 0x25966041 (mfg: 0x020, part: 0x5966, ver: 0x2)
trying to validate configured JTAG chain anyway…
Could not validate JTAG scan chain, IR mismatch, scan returned 0x000029. tap=str91x.cpu pos=8 expected 0x1 got 0
Could not validate JTAG chain, continuing anyway…
TAP str91x.cpu:
value captured during scan didn’t pass the requested check:
captured: 0x00 check_value: 0x01 check_mask: 0x0f
in_handler: w/o “in_value”, mismatch in SIR
TAP str91x.cpu:
value captured during scan didn’t pass the requested check:
captured: 0x00 check_value: 0x01 check_mask: 0x0f
in_handler: w/o “in_value”, mismatch in SIR
Runtime error, file “embedded:startup.tcl”, line 176:
examine-fails: -104
in procedure ‘ocd_process_reset’
called at file “embedded:startup.tcl”, line 175
Runtime error, file “command.c”, line 456:
scan_chain
TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr
—|--------------------|---------|------------|------------|------|------|------|---------
0 | str91x.flash | Y | 0x04570041 | 0x04570041 | 0x08 | 0x01 | 0x01 | 0xff
1 | str91x.cpu | Y | 0x00000000 | 0x25966041 | 0x04 | 0x01 | 0x0f | 0x0c
2 | str91x.bs | Y | 0x1457f041 | 0x1457f041 | 0x05 | 0x01 | 0x01 | 0x1f
telenet output after restart of openOCD without power down of the stick:
Open On-Chip Debugger
scan_chain
TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr
—|--------------------|---------|------------|------------|------|------|------|---------
0 | str91x.flash | Y | 0x04570041 | 0x04570041 | 0x08 | 0x01 | 0x01 | 0xff
1 | str91x.cpu | Y | 0xffffffff | 0x25966041 | 0x04 | 0x01 | 0x0f | 0x0c
2 | str91x.bs | Y | 0x00000000 | 0x1457f041 | 0x05 | 0x01 | 0x01 | 0x1f
:arrow: :arrow: :arrow: