tms470, Amontec JTAGkey and OpenOCD

To all interested,

Placing the following code in flash to execute at boot time unlocks the jtag:

  int dummy;
  dummy = MSMPWL3;
  dummy = MSMPWL2;
  dummy = MSMPWL1;
  dummy = MSMPWL0;

Now after a reset “openocd” connects and “sdk4arm Insight” connects to that.

I also found that using the low level JLink.exe debug interface leaves the device locked.

Doing the following unlocks the device:

First I connect to the device and try to read 8 bytes. It fails.

Then I read the 4 MSMPWL locations.

Lastly I am able to read memory.

SEGGER J-Link Commander V3.70a ('?' for help)
Compiled May 15 2007 21:03:47
DLL version V3.70a, compiled May 15 2007 21:03:44
Firmware: J-Link compiled May 10 2007 13:05:02 ARM Rev.5
Hardware: V5.20
S/N : 10005870
OEM : IARKS
VTarget = 3.196V
JTAG speed: 30 kHz
Found 1 JTAG device, Total IRLen = 4:
 Id of device #0: 0x3100E02F
Found ARM with core Id 0x3100E02F (ARM7)
J-Link>mem 0,8
Could not read memory.
J-Link>mem 0xffec,1
Could not read memory.
J-Link>mem 0xffe8,1
Could not read memory.
J-Link>mem 0xffe4,1
Could not read memory.
J-Link>mem 0xffe0,1
0000FFE0 = 00
J-Link>mem 0,8
00000000 = 0D 00 00 EA 00 00 00 00
J-Link>

Is this something that could be added to openocd in the future?

Mark