My command line to start OpenOCD:
/home/ARM/DevTools/bin/openocd gdb_memory_map disable -s
/home/ARM/DevTools/share/openocd/scripts/ -f interface/olimex-arm-usb-ocd-h.cfg
-f board/twr-k60f120m.cfg
The only mods to the config files are to set the adapter speed to 1MHz, and to
add reset init to the GDB attach event
$_TARGETNAME configure -event gdb-attach {
echo "Halting Target"
reset init
}
The reset line on the K60 is pulsing about every 50us. It seems that this is
preventing OpenOCD from maintaining a connection with the K60.
Here is a sample terminal output of such a case:
Open On-Chip Debugger 0.7.0 (2013-08-01-17:19)
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: 1000 kHz
cortex_m3 reset_config sysresetreq
Info : add flash_bank kinetis pflash.0
Info : add flash_bank kinetis pflash.1
Info : add flash_bank kinetis pflash.2
Info : add flash_bank kinetis pflash.3
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: k60.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part:
0xba00, ver: 0x4)
START...
Info : k60.cpu: hardware has 6 breakpoints, 4 watchpoints
END...
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 100ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 300ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 700ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 1500ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 3100ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Info : accepting 'gdb' connection from 3333
Halting Target
Info : JTAG tap: k60.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part:
0xba00, ver: 0x4)
START...
END...
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000edf0
in procedure 'reset'
Warn : Cannot communicate... target not halted.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to
prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000002, MEM_AP_TAR 0xe000edf0
Polling target k60.cpu failed, GDB will be halted. Polling again in 6300ms
Thanks,
Nick
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Andreas Fritiofson
Sent: Wednesday, April 02, 2014 5:11 PM
To: Borton, Nick
Cc:
[email protected]<mailto:[email protected]>
Subject: Re: [OpenOCD-devel] Initial Flashing of K60
On Wed, Apr 2, 2014 at 8:49 PM, Borton, Nick
<[email protected]<mailto:[email protected]>> wrote:
Hello,
I've been developing with custom Freescale K60 boards for around a year, using
OpenOCD 0.7.0 + Olimex-ARM-USB-OCD-H for programming and debugging. For the
most part it works great, and thanks to everyone who put this tool together. I
do however have issues initially programming some virgin parts. I have tried
upgrading to 0.8.0-rc1, I have googled all sorts of odd procedures from other
tools (hold reset low, and then issue a mass erase). I've tried running an
erase with the flash command (no good when reset is held though), and I've
tried using a combination of irscan + drscan to issue the mass erase manually.
I have to imagine that others have had this issue. Maybe I'm missing something
in the docs? Is there an undocumented command?
It will not be easy to help you without the details of how it fails. Show the
complete command line and any custom config files you might use and attach a
debug log from a (short) session when it fails.
I've had some failures with a k40 part myself, not sure if it's related.
/Andreas
------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel