Hi all, just trying to get started developing for the LPC-2106
I bought the LPC-H2106 header board (from Sparkfun of course!), and Olimex’s ARM-USB-TINY OpenOCD JTAG device. I’ve wired up a jtag header for the board, and can connect to it from OpenOCD, but only on every other connection?!?
E.g. If I start OpenOCD, with the relevant config file, it will connect fine (and the LED will blink nicely on the programmer). If however I kill OCD, then restart it, I get an error: ‘timed out waiting for halt after reset’, and the LED doesn’t blink (it flashes v. briefly (<10ms)). If I then kill OCD, and run it again, it connects fine.
The process is entirely repeatable, and continues on in the pattern described above.
Anybody have any ideas what could be causing this. It’s causing problems with debugging/flash programming.
The only other quirky thing is that on the very first connection after plugging the jtag device in (not when the board is powered up), I get some errors about things not being in a normal state, and generating a reset.
Here’s the openocd.cfg file for reference:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 100
jtag_nsrst_delay 10
jtag_ntrst_delay 10
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30
#target_script 0 reset oocd_flash2138.script
working_area 0 0x40000000 0x40000 nobackup
#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14745 calc_checksum
# pre-OpenOCD189
#flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14745 calc_checksum
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
The error:
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)
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
And the first start error:
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)
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
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.
Any help would be greatly appreciated.
James