OpenOCD startup fails - Olimex LPC-P2103

Im new into embedded.

I understand little of the response OpenOCD gives me.

Please point me into the right direction…

Board

http://www.olimex.com/dev/lpc-p2103.html

JTAG adapter

http://shop.embedded-projects.net/produ … apter.html

OpenOCD 0.1.0 - Config

#LPC-2103 CPU
reset_config trst_and_srst separate

#jtag scan chain
jtag newtap lpc2103 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0xffffffff
target create lpc2103.cpu arm7tdmi -endian little -chain-position lpc2103.cpu -variant arm7tdmi-s_r4
lpc2103.cpu configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x2000 

-work-area-backup 0
flash bank lpc2000 0x0 0x8000 0 0 0 lpc2000_v2 14745 calc_checksum

OpenOCD Startup

Open On-Chip Debugger 0.1.0 (2009-01-21-21:15) Release


BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS


$URL: https://kc8apf@svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.1.0/src
/openocd.c $
jtag_speed: 2
Warn : Tap/Device does not have IDCODE
Error: JTAG tap: lpc2103.cpu             got: 0x00000000 (mfg: 0x000, part: 0x00
00, ver: 0x0)
Error: JTAG tap: lpc2103.cpu expected 1 of 1: 0xffffffff (mfg: 0x7ff, part: 0xff
ff, ver: 0xf)
Error: trying to validate configured JTAG chain anyway...
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Warn : no tcl port specified, using default port 6666

It seems to partially work since i can get some flash bank information (using telnet)

Trying to ‘halt’ it gives me a timeout, calling ‘reset halt’ a

> reset halt
Tap/Device does not have IDCODE
JTAG tap: lpc2103.cpu             got: 0x00000000 (mfg: 0x000, part: 0x0000, ver
: 0x0)
JTAG tap: lpc2103.cpu expected 1 of 1: 0xffffffff (mfg: 0x7ff, part: 0xffff, ver
: 0xf)
trying to validate configured JTAG chain anyway...
invalid mode value encountered
cpsr contains invalid mode value - communication failure
Runtime error, file "embedded:startup.tcl", line 211:
    expected return code but got 'TARGET: lpc2103.cpu - Not halted'
in procedure 'ocd_process_reset'
called at file "embedded:startup.tcl", line 196
called at file "embedded:startup.tcl", line 197
called at file "embedded:startup.tcl", line 210
Runtime error, file "command.c", line 456:

DBGACK set while target was in unknown state. Reset or initialize target.
invalid mode value encountered
cpsr contains invalid mode value - communication failure
DBGACK set while target was in unknown state. Reset or initialize target.
invalid mode value encountered
cpsr contains invalid mode value - communication failure
DBGACK set while target was in unknown state. Reset or initialize target.
invalid mode value encountered
cpsr contains invalid mode value - communication failure

Thanks for your time

If that’s your config then it’s worthless.

Use STANDARD config files:

openocd -f interface/arm-usb-ocd.cfg -f target/lpc2103.cfg

And replace the wrong value of CPUTAPID in lpc2103 with 0x4f1f0f0f, and modify the clock to your value.

4/3!!

Works all fine with 0x4f1f0f0f where did you get this value from, if i may ask?

The OpenOCD installation i got doesn’t contain no target lpc2103.cfg

file, did copy most from posts i found.

Thanks for your help.

Duchamp:
Works all fine with 0x4f1f0f0f where did you get this value from, if i may ask?

If the rest of the setup is OK, OpenOCD will display the value it found. You had to had something else messed up too - not just that value.

The OpenOCD installation i got doesn’t contain no target lpc2103.cfg

file, did copy most from posts i found.

Indeed 0.1.0 release didn't have that file... Here you can get the "official" lpc2103.cfg file - it works - just adjust the core clock at the end.

http://svn.berlios.de/svnroot/repos/ope … pc2103.cfg

4/3!!