EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Re: Olimex LPC-E2468 JTAG Debug: Update

Started by michael brown November 10, 2008
Bruce Paterson wrote:
> No success yet, but an update.
> Any suggestions welcome !

Well, on my Olimex LPC-2378-STK board, I've seen similar messages after I
fed OpenOCD a configuration for another board. I had downloaded a project
for another board and was converting it to run. After trying to upload to
the wrong locations, it started spewing messages like yours. Resetting
everything didn't help and I thought my board was done for. I used the
FlashMagic thingy and was able to connect to the board thru the serial port.
After flashing it with the demo code from IAR, it started working thru the
JTAG again. Have no idea what was really wrong.
> 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: l... [mailto:l...] On
> Behalf Of Bruce Paterson
> Sent: Friday, 7 November 2008 5:46 PM
> To: l...
> 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
>
>

An Engineer's Guide to the LPC2100 Series

Thanks Michael.
Well, as you may have seen from a follow-up post I made, one of the
problems was a *bit* like that in that for the JTAGKey I had to comment
out the "jtag_reset" lines in the *.cfg file. I worked this out from my
cfg with the older openocd file that didn't have them. These lines do
seem OK for the ARM-USB-OCD though.
The main issue was I was experiencing multiple problems that all had
similar symptoms, so if I happened to fix any one of them, it didn't
seem to help.

Still dunno why the ARM-USB-OCD won't play with the 2148 though !
Weirdness. If I didn't have a "good" setup combination to start with,
I'd probably have despaired of ever getting the things going.

Cheers,
Bruce
-----Original Message-----
From: l... [mailto:l...] On Behalf
Of michael brown
Sent: Tuesday, 11 November 2008 5:01 AM
To: l...
Subject: Re: [lpc2000] Olimex LPC-E2468 JTAG Debug: Update

Bruce Paterson wrote:
> No success yet, but an update.
> Any suggestions welcome !

Well, on my Olimex LPC-2378-STK board, I've seen similar messages after
I
fed OpenOCD a configuration for another board. I had downloaded a
project
for another board and was converting it to run. After trying to upload
to
the wrong locations, it started spewing messages like yours. Resetting
everything didn't help and I thought my board was done for. I used the
FlashMagic thingy and was able to connect to the board thru the serial
port.
After flashing it with the demo code from IAR, it started working thru
the
JTAG again. Have no idea what was really wrong.
> 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: l... [mailto:l...] On
> Behalf Of Bruce Paterson
> Sent: Friday, 7 November 2008 5:46 PM
> To: l...
> 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
>
>
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 <- Have to remove this line and continue to get it to work
with ARM-USB-OCD.
continue

Cheers,
Bruce

-----Original Message-----
From: l... [mailto:l...] On Behalf
Of michael brown
Sent: Tuesday, 11 November 2008 5:01 AM
To: l...
Subject: Re: [lpc2000] Olimex LPC-E2468 JTAG Debug: Update

Bruce Paterson wrote:
> No success yet, but an update.
> Any suggestions welcome !

Well, on my Olimex LPC-2378-STK board, I've seen similar messages after
I
fed OpenOCD a configuration for another board. I had downloaded a
project
for another board and was converting it to run. After trying to upload
to
the wrong locations, it started spewing messages like yours. Resetting
everything didn't help and I thought my board was done for. I used the
FlashMagic thingy and was able to connect to the board thru the serial
port.
After flashing it with the demo code from IAR, it started working thru
the
JTAG again. Have no idea what was really wrong.
> 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: l... [mailto:l...] On
> Behalf Of Bruce Paterson
> Sent: Friday, 7 November 2008 5:46 PM
> To: l...
> 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
>
>

Memfault Beyond the Launch