OpenOCD and Olimex LPC-E2468

here is a thread I startred on the LPC-2000 forum, but maybe someone here knows more ! (read bottom up, sorry)


No success yet, but an update.

Any suggestions welcome !

Olimex LPC-E2468:

The R76 value was 100 Ohms, not 100kOhms as shown on the circuit. This is the RTCLK pullup resister. Not certain if this a show-stopper or not because still not working, but it certainly wouldn’t help !

Anyone else got a LPC-E2468 board they can check to see if 100 Ohms (“101”) or whether this was a load error on the oards we’ve bought ?

Amontec JTAGKey:

  • I am able to use the 717 openocd with my original lpc-2148 board as long as I comment out the 2 “jtag_reset” lines in the config script lpc2xxx_jtagkey.cfg. The original version of the config file didn’t have these lines. Why ?

  • The JTAGKey gets confused if you have another FT232 device on the system, such as the serial port on the LPC-E2468 board ! It finds that device before finding itself and latches onto that. Only a computer reboot will kill off openocd in this case. I switched to external powering on LPC-E2468 when attempting to use the JTAGKey.

  • Unfortunately it seems openocd is still unable to “halt” the processor on the LPC-E2468 card, so it can’t really get anywhere.

Cheers,

Bruce

-----Original Message-----

From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf Of Bruce Paterson

Sent: Friday, 7 November 2008 5:46 PM

To: lpc2000@yahoogroups.com

Subject: [lpc2000] Olimex LPC-E2468 JTAG Debug

Hi all,

I’m having real problems getting debugging going with the Olimex

LPC-E2468 card (PC host) and after one of those frustrating sorts of

days I’m looking for some pointers where to go next.

History:

I’ve been using Eclipse with Openocd and an Amontec JTAGKey for some

years now with various LPC2138 and LPC2148 custom targets, and after

some initial problems have largely been happy with the setup. (An

Amontec died at one stage and had to buy another, but suspect static

damage).

I stayed with the 2006 version of openocd I had at the time as it worked

OK.

Now:

Trying to get a couple of lpc2468 Olimex cards going (prior to custom),

but it hasn’t been clear sailing, and I’m not quite sure why !

At the same time bought a couple of Olimex ARM-USB-OCD debug dongles to

supplement the Amontec due to the number of new projects.

What works:

The old “2006 openocd”, JTAGKey and LPC2148 custom target: Obviously,

that’s what I’ve been using.

The brand new 717 2008 openocd off Yagarto site, JTAGKey and LPC2148

works also (more info messages etc than before)

What doesn’t work:

The “2007 openocd”, JTAGKey and LPC2148. That openocd comes with Olimex

CDs. (Just note this one in passing).

717 openocd, JTAGKey and LPC-E2468 card (debug below).

717 openocd, ARM-USB-OCD and LPC-E2468 card (debug below).

717 openocd, ARM-USB-OCD and LPC-2148 card that works above (debug

below).

Old 2006 openocd, JTAGKey and LPC-E2468 (I tried everything!).

In summary:

JTAGKey can work with 2148 but not E2468

ARM-USB-OCD works with neither.

I must be doing something very wrong !

It seems where the *.cfg files live in the openocd tree has changed for

the different openocd versions, but assume I’ve picked the appropriate

one for the particular JTAG USB dongle in each case.

I have 2 LPC-E2468 cards. One still has the supplied Linux/U-boot etc on

board, the other has our custom hex file programmed via FlashMagic and

the FT232 Uart on card. Since I don’t get openocd to start successfully

this may not be relevant. I sometimes get different debug output

depending on whether I power the card or the dongle first.

Debug from Eclipse console:

With Amontec JTAGKey and E248:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown

EmbeddedICE version (comms ctrl: 0x00000000)

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Warning: jtag.c:1211 jtag_check_value(): value captured during scan

didn’t pass the requested check: captured: 0x0f check_value: 0x01

check_mask: 0x0f

Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed

check

With Amontec JTAGKey and E248 (same as above but different powering

attempt):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f

(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)

Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE

version 7 detected, EmbeddedICE handling might be broken

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f

(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)

Warning: jtag.c:1211 jtag_check_value(): value captured during scan

didn’t pass the requested check: captured: 0x0f check_value: 0x01

check_mask: 0x0f

Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed

check

Warning: jtag.c:1211 jtag_check_value(): value captured during scan

didn’t pass the requested check: captured: 0x0f check_value: 0x01

check_mask: 0x0f

Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed

check

Error: armv4_5.h:114 armv4_5_mode_to_number(): invalid mode value

encountered

Error: arm7_9_common.c:1102 arm7_9_debug_entry(): cpsr contains

invalid mode value - communication failure

Warning: arm7_9_common.c:970 arm7_9_halt(): target was in unknown state

when halt was requested

Warning: arm7_9_common.c:700 arm7_9_poll(): DBGACK set while target was

in unknown state. Reset or initialize target.

With Amontec JTAGKey and E248 (same as above but different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f

(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)

Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE

version 7 detected, EmbeddedICE handling might be broken

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f

(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)

User: target.c:436 target_process_reset(): Timed out waiting for halt

after reset

^^^^

Looks like it nearly gets there this time, but still can’t halt =>

starting gdb useless. No idea what is different this time from last time

really.

With ARM-USB-OCD & E2468:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown

EmbeddedICE version (comms ctrl: 0x00000000)

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

With ARM-USB-OCD & E2468 (different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f

(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)

Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE

version 7 detected, EmbeddedICE handling might be broken

Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f

(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)

User: target.c:436 target_process_reset(): Timed out waiting for halt

after reset

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,

exit

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,

exit

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan

chain, IR mismatch, scan returned 0x3f

Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,

exit

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3

Info: options.c:50 configuration_output_handler(): Open On-Chip

Debugger (2008-06-19 19:00) svn: 717

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown

EmbeddedICE version (comms ctrl: 0x00000000)

Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,

check connection, JTAG interface, target power etc.

Error: jtag.c:1556 jtag_init_inner(): trying to validate configured

JTAG chain anyway…

User: target.c:436 target_process_reset(): Timed out waiting for halt

after reset

So,

Is the JTAG on a 2148 and 2468 processor identical ? (ie. If it works

for 2148 it should for 2468 ?)

It is something to do with SRST and TRST timing / relationship ?

Has anyone got a JTAGKey or an ARM-USB-OCD working with an Olimex

LPC-E2468 card ? Need to add an extra pullup/pulldown somewhere maybe ?

A bit Frustrated,

Bruce

Also posted to lpc2000

To continue my monologue, in case anyone is interested :slight_smile:

I now have debugging working somewhat on the LPC-E2468 board, both with the JTAGKey and the ARM-USB-OCD dongles.

The reason for the problem (other than the 2 things noted earlier below), was my program on card 1 was going off into the weeds (TBD why) and disabling JTAG. [Discovered by switching JTAG to boundary scan using the DBGSEL pin and openocd could see it, but not the uP JTAG…ahha!].

I thought I’d eliminated this possibility on card 2 by leaving it with original Olimex supplied code, but alas this must also affect the JTAG pins. Grrr my bad.

Still can’t get the ARM-USB-OCD working on the lpc-2148 original card.

Openocd throws up all sorts of problems. JTAGKey works fine. Of course I tried commenting out the “jtag-reset” lines in the armusbocd.cfg file as well (see below) but it didn’t help. It’d be nice to know why it doesn’t work, but not as immediately critical.

Hmmm

All is still not fine with ARM-USB-OCD. For some reason I can’t get it to breakpoint on main reliably. I usually set a temporary breakpoint there as part of the startup of gdb, but if I do this, it never gets there. If I just let it halt at random when gdb starts, then I can put a breakpoint on main and it can get there OK.

Is there an openocd guru who can tell me what I should do here instead ?

Here is my gdb startup:

target remote localhost:3333

monitor soft_reset_halt

monitor arm7_9 force_hw_bkpts enable

symbol-file bin/track.elf

thbreak main

continue

104 (100k) on my r76 ollimex board