# OpenOCD 0.2.0 Win and LPC2148

**URL:** <https://community.sparkfun.com/t/openocd-0-2-0-win-and-lpc2148/12889>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [October 11, 2009, 4:24pm UTC](https://community.sparkfun.com/t/openocd-0-2-0-win-and-lpc2148/12889 "2009-10-11T16:24:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhermans](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@jhermans](https://community.sparkfun.com/u/jhermans)\
**Post date:** [October 11, 2009, 4:24pm UTC](https://community.sparkfun.com/t/openocd-0-2-0-win-and-lpc2148/12889/1 "2009-10-11T16:24:05Z")

</div>

I have some problems getting openocd 0.2.0 to work under windows with my olimex LPC-P2148 board ([http://www.olimex.com/dev/lpc-p2148.html](http://www.olimex.com/dev/lpc-p2148.html)). I am using a Olimex ARM-USB-TINY JTAG interface. I first have this problem:

```auto
C:\PROGRA~1\OpenOCD\02225D~1.0>openocd -f interface\olimex-jtag-tiny.cfg -f targ
et\lpc2148.cfg
Open On-Chip Debugger 0.2.0 (2009-07-18-09:50) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd
.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
jtag_speed: 3
RCLK - adaptive
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Info : JTAG tap: lpc2148.cpu tap/device found: 0x9f3f1f1f (mfg: 0x78f, part: 0xf
3f1, ver: 0x9)
Error: JTAG tap: lpc2148.cpu got: 0x9f3f1f1f (mfg: 0x78f, part: 0xf
3f1, ver: 0x9)
Error: JTAG tap: lpc2148.cpu expected 1 of 1: 0x4f1f0f0f (mfg: 0x787, part: 0xf
1f0, ver: 0x4)
Error: trying to validate configured JTAG chain anyway...
Error: unknown EmbeddedICE version (comms ctrl: 0x80000000)

```

When i change lpc2148.cfg (“set \_CPUTAPID 0x9f3f1f1f”) i get:

```auto
C:\PROGRA~1\OpenOCD\02225D~1.0>openocd -f interface\olimex-jtag-tiny.cfg -f targ
et\lpc2148.cfg
<cut>
Info : JTAG tap: lpc2148.cpu tap/device found: 0x9f3f1f1f (mfg: 0x78f, part: 0xf
3f1, ver: 0x9)
Info : JTAG Tap/device matched
Error: unknown EmbeddedICE version (comms ctrl: 0x80000000)

```

Right, to the device is now correctly detected, but: The EmbeddedICE version is unknown. When i do a telnet localhost 4444, the following happens:

```auto
Open On-Chip Debugger
> init
> reset
JTAG tap: lpc2148.cpu tap/device found: 0x9f3f1f1f (mfg: 0x78f, part: 0xf3f1, ver: 0x9)
JTAG Tap/device matched
> halt
invalid mode value encountered 15
cpsr contains invalid mode value - communication failure
Runtime error, file "command.c", line 469:

invalid mode value encountered 15
cpsr contains invalid mode value - communication failure
invalid mode value encountered 15
cpsr contains invalid mode value - communication failure
invalid mode value encountered 15
cpsr contains invalid mode value - communication failure
invalid mode value encountered 15
cpsr contains invalid mode value - communication failure

```

What can this problem be? Thank you very much

---

<div class="post-metadata">

**Author:** ![bobcousins](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@bobcousins](https://community.sparkfun.com/u/bobcousins)\
**Post date:** [October 12, 2009, 10:12pm UTC](https://community.sparkfun.com/t/openocd-0-2-0-win-and-lpc2148/12889/2 "2009-10-12T22:12:40Z")

</div>

> jhermans:
> 
> ```auto
> C:\PROGRA~1\OpenOCD\02225D~1.0>openocd -f interface\olimex-jtag-tiny.cfg -f targ
> 
> ```

et\lpc2148.cfg  
  
Info : JTAG tap: lpc2148.cpu tap/device found: 0x9f3f1f1f (mfg: 0x78f, part: 0xf  
3f1, ver: 0x9)  
Info : JTAG Tap/device matched  
Error: unknown EmbeddedICE version (comms ctrl: 0x80000000)

> ```auto
> 
> Right, to the device is now correctly detected, but: The EmbeddedICE version is unknown.
> 
> ```

Actually, I think the id should be 0x4f1f0f0f but because the comms is faulty it is returning the wrong id. Changing the id won’t fix the comms…

I would change your config to remove rclk setting, and set jtag speed to no more than 1000 khz.

You appear to be running 0.2.0 version of Openocd but are using 0.1.0 scripts?
