Forums

OpenOCD: JTAG error while reading cpsr

Started by Jeff February 8, 2007
Hi, I'm new and trying to get started with an LPC2106 (Olimex LPC-P2106
board) and OpenOCD with an Olimex parallel port wiggler. OpenOCD is r128
from Yagarto. I'm wondering what I've setup wrong. Sorry for the long
length of this post, but I wasn't sure what info would be needed and
wanted to provide everything I could think of.

I get usually get errors trying to start OpenOCD but if I press the
reset button on the board a few times and rerun OpenOCD over and over,
it finally does come up and wait. The times when it fails to come up I
usually get:

Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Error: arm7_9_common.c:610 arm7_9_poll(): JTAG queue failed while
reading EmbeddedICE status register
However, once I finally get it to run, I've tried to start a debug
session within Eclipse. It tries to load the little test program into
RAM but before any debugging occurs OpenOCD exists with:

Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Error: arm7_9_common.c:1792 arm7_9_read_memory(): JTAG error while
reading cpsr

------
Here's my config:

Eclipse debug commands
target remote localhost:3333
load

Config file - I started with lpc2106_pp.cfg. I've tried playing with
jtag_speed and also working_area but neither seems to make any
difference. The config file is:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface parport
parport_port 0x378
parport_cable wiggler
jtag_speed 0

#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
#target arm7tdmi
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

working_area 0 0x40010000 0x10000 nobackup

#flash configuration
flash bank lpc2000 0x0 0x20000 0 0 lpc2000_v1 0 14765 calc_checksum

------
The log from openocd-pp -d 1

Debug: jtag.c:1307 jtag_init():
Debug: parport.c:377 parport_init(): requesting privileges for
parallel port 0x378...
Debug: parport.c:387 parport_init(): ...privileges granted
Debug: parport.c:212 parport_reset(): trst: 0, srst: 0
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1106 jtag_reset_callback():
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1106 jtag_reset_callback():
Debug: jtag.c:1192 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1106 jtag_reset_callback():
Debug: openocd.c:102 main(): jtag init complete
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 4
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 3
Debug: jtag.c:1106 jtag_reset_callback():
Debug: arm7_9_common.c:656 arm7_9_assert_reset(): target->state: unknown
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 0
Debug: jtag.c:1106 jtag_reset_callback():
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1106 jtag_reset_callback():
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test
logic, too
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 0
Debug: jtag.c:1106 jtag_reset_callback():
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
Debug: jtag.c:1106 jtag_reset_callback():
Debug: parport.c:212 parport_reset(): trst: 1, srst: 1
Debug: parport.c:212 parport_reset(): trst: 1, srst: 1
Debug: arm7_9_common.c:722 arm7_9_deassert_reset(): target->state: reset
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 2
Debug: jtag.c:1106 jtag_reset_callback():
Debug: parport.c:212 parport_reset(): trst: 0, srst: 0
Debug: openocd.c:106 main(): target init complete
Debug: openocd.c:110 main(): flash init complete
Debug: openocd.c:114 main(): pld init complete
Debug: gdb_server.c:1347 gdb_init(): gdb service for target arm7tdmi
at port 3333
Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: reset
Debug: embeddedice.c:299 embeddedice_write_reg(): 9: 0xffffffff
Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 3
Debug: jtag.c:1106 jtag_reset_callback():
Debug: embeddedice.c:299 embeddedice_write_reg(): 11: 0xffffffff
Debug: embeddedice.c:299 embeddedice_write_reg(): 12: 0x00000100
Debug: embeddedice.c:299 embeddedice_write_reg(): 13: 0x000000f7
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: arm7_9_common.c:620 arm7_9_poll(): DBGACK set,
dbg_state->value: 0x19
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: embeddedice.c:299 embeddedice_write_reg(): 12: 0x00000000
Debug: arm7_9_common.c:936 arm7_9_debug_entry(): target entered debug
from Thumb state
Debug: arm7_9_common.c:940 arm7_9_debug_entry(): r0_thumb: 0xc0000000,
pc_thumb: 0x7fffe256
Debug: arm7_9_common.c:976 arm7_9_debug_entry(): target entered debug
state in Supervisor mode
Debug: arm7_9_common.c:980 arm7_9_debug_entry(): thumb state, applying
fixups
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r0: 0xc0000000
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r1: 0xe0028000
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r2: 0xe0008000
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r3: 0xd57f5042
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r4: 0xe002c000
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r5: 0x7ffffd34
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r6: 0x40000128
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r7: 0x00000000
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r8: 0xc8cac578
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r9: 0xf7e6efbe
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r10: 0x9d075916
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r11: 0x2e977c06
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r12: 0x1c0747fb
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r13: 0x4000ffb8
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r14: 0x7fffe30d
Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r15: 0x7fffe250
Debug: arm7_9_common.c:1011 arm7_9_debug_entry(): entered debug state
at PC 0x7fffe250
Debug: target.c:444 target_call_event_callbacks(): target event 0
Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: halted
Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted
Debug: gdb_server.c:124 gdb_get_char(): received '+$Hc-1#09'
Info: server.c:67 add_connection(): accepted 'gdb' connection from 0
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'Hc-1'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
Debug: gdb_server.c:124 gdb_get_char(): received '+$qC#b4'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'qC'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
Debug: gdb_server.c:124 gdb_get_char(): received '+$qOffsets#4b'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'qOffsets'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
Debug: gdb_server.c:124 gdb_get_char(): received '+$?#3f'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: '?'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$S02#b5'
Debug: gdb_server.c:124 gdb_get_char(): received '+$Hg0#df'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'Hg0'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
Debug: gdb_server.c:124 gdb_get_char(): received '+$pf#d6'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pf'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$50e2ff7f#65'
Debug: gdb_server.c:124 gdb_get_char(): received '+$m7fffe250,4#32'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'm7fffe250,4'
Debug: gdb_server.c:834 gdb_read_memory_packet(): addr: 0x7fffe250,
len: 0x00000004
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0x7fffe250,
size: 0x00000004, count: 0x00000001
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$fcd40868#37'
Debug: gdb_server.c:124 gdb_get_char(): received '+$qSymbol::#5b'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'qSymbol::'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
Debug: gdb_server.c:124 gdb_get_char(): received '+$X40000000,0:#72'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'X40000000,0:'
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received
'+$X40000000,17d:ðŸåðŸåðŸåðŸåðŸå'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet:
'X40000000,17d:ðŸåðŸåðŸåðŸåðŸå'
Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
0x40000000, len: 0x0000017d
Debug: target.c:625 target_write_buffer(): writing buffer of 381 byte
at 0x40000000
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x40000000, size: 0x00000004, count: 0x0000005f
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x4000017c, size: 0x00000001, count: 0x00000001
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$X4000017d,17d:'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'X4000017d,17d:'
Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
0x4000017d, len: 0x0000017d
Debug: target.c:625 target_write_buffer(): writing buffer of 381 byte
at 0x4000017d
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x4000017d, size: 0x00000001, count: 0x00000003
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x40000180, size: 0x00000004, count: 0x0000005e
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x400002f8, size: 0x00000001, count: 0x00000002
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$X400002fa,17b:'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'X400002fa,17b:'
Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
0x400002fa, len: 0x0000017b
Debug: target.c:625 target_write_buffer(): writing buffer of 379 byte
at 0x400002fa
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x400002fa, size: 0x00000001, count: 0x00000002
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x400002fc, size: 0x00000004, count: 0x0000005e
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x40000474, size: 0x00000001, count: 0x00000001
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$X40000475,4f:À-å
À á'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'X40000475,4f:À-å
À á'
Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
0x40000475, len: 0x0000004f
Debug: target.c:625 target_write_buffer(): writing buffer of 79 byte
at 0x40000475
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x40000475, size: 0x00000001, count: 0x00000003
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x40000478, size: 0x00000004, count: 0x00000013
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$X400004c4,18:'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'X400004c4,18:'
Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
0x400004c4, len: 0x00000018
Debug: target.c:625 target_write_buffer(): writing buffer of 24 byte
at 0x400004c4
Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
0x400004c4, size: 0x00000004, count: 0x00000006
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p0#a0'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p0'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$000000c0#b3'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p1#a1'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p1'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$008002e0#bf'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p2#a2'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p2'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$008000e0#bd'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p3#a3'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p3'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$42507fd5#01'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p4#a4'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p4'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$00c002e0#ea'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p5#a5'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p5'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$34fdff7f#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p6#a6'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p6'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$28010040#8f'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p7#a7'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p7'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$00000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p8#a8'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p8'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$78c5cac8#66'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p9#a9'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p9'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$beefe6f7#ca'
Debug: gdb_server.c:124 gdb_get_char(): received '+$pa#d1'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pa'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$1659079d#d9'
Debug: gdb_server.c:124 gdb_get_char(): received '+$pb#d2'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pb'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$067c972e#07'
Debug: gdb_server.c:124 gdb_get_char(): received '+$pc#d3'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pc'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$fb47071c#2e'
Debug: gdb_server.c:124 gdb_get_char(): received '+$pd#d4'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pd'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$b8ff0040#2a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$pe#d5'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pe'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$0de3ff7f#95'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p10#d1'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p10'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p11#d2'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p11'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p12#d3'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p12'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p13#d4'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p13'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p14#d5'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p14'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p15#d6'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p15'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p16#d7'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p16'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p17#d8'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p17'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet
'$000000000000000000000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p18#d9'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p18'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$00000000#80'
Debug: gdb_server.c:124 gdb_get_char(): received '+$p19#da'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p19'
Debug: gdb_server.c:680 gdb_get_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$f3000080#c1'
Debug: gdb_server.c:124 gdb_get_char(): received '+$Pf020040#79'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'Pf020040'
Debug: gdb_server.c:728 gdb_set_register_packet():
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$P1900080#b6'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'P1900080'
Debug: gdb_server.c:728 gdb_set_register_packet():
Debug: armv4_5.c:256 armv4_5_set_core_reg(): changing to ARM state
Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
Debug: gdb_server.c:124 gdb_get_char(): received '+$m2e977c06,4#d4'
Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'm2e977c06,4'
Debug: gdb_server.c:834 gdb_read_memory_packet(): addr: 0x2e977c06,
len: 0x00000004
Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address: 0x2e977c06,
size: 0x00000001, count: 0x00000004
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
didn't pass the requested check: captured: 0x00 check_value: 0x01
check_mask: 0x0f
Error: arm7_9_common.c:1792 arm7_9_read_memory(): JTAG error while
reading cpsr

An Engineer's Guide to the LPC2100 Series

Hi,
I have had the same problem when the CPU clock was not stable, or
when driving the JTAG too fast.
regards,
jason.
--- In l..., Jeff wrote:
>
> Hi, I'm new and trying to get started with an LPC2106 (Olimex LPC-
P2106
> board) and OpenOCD with an Olimex parallel port wiggler. OpenOCD
is r128
> from Yagarto. I'm wondering what I've setup wrong. Sorry for the
long
> length of this post, but I wasn't sure what info would be needed
and
> wanted to provide everything I could think of.
>
> I get usually get errors trying to start OpenOCD but if I press the
> reset button on the board a few times and rerun OpenOCD over and
over,
> it finally does come up and wait. The times when it fails to come
up I
> usually get:
>
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Error: arm7_9_common.c:610 arm7_9_poll(): JTAG queue failed while
> reading EmbeddedICE status register
> However, once I finally get it to run, I've tried to start a debug
> session within Eclipse. It tries to load the little test program
into
> RAM but before any debugging occurs OpenOCD exists with:
>
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Error: arm7_9_common.c:1792 arm7_9_read_memory(): JTAG error
while
> reading cpsr
>
> ------
> Here's my config:
>
> Eclipse debug commands
> target remote localhost:3333
> load
>
> Config file - I started with lpc2106_pp.cfg. I've tried playing
with
> jtag_speed and also working_area but neither seems to make any
> difference. The config file is:
>
> #daemon configuration
> telnet_port 4444
> gdb_port 3333
>
> #interface
> interface parport
> parport_port 0x378
> parport_cable wiggler
> jtag_speed 0
>
> #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
> #target arm7tdmi
> target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
> run_and_halt_time 0 30
>
> working_area 0 0x40010000 0x10000 nobackup
>
> #flash configuration
> flash bank lpc2000 0x0 0x20000 0 0 lpc2000_v1 0 14765 calc_checksum
>
> ------
> The log from openocd-pp -d 1
>
> Debug: jtag.c:1307 jtag_init():
> Debug: parport.c:377 parport_init(): requesting privileges for
> parallel port 0x378...
> Debug: parport.c:387 parport_init(): ...privileges granted
> Debug: parport.c:212 parport_reset(): trst: 0, srst: 0
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: jtag.c:1192 jtag_examine_chain(): JTAG device found:
0x4f1f0f0f
> (Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: openocd.c:102 main(): jtag init complete
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 4
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 3
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: arm7_9_common.c:656 arm7_9_assert_reset(): target->state:
unknown
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 0
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
> Debug: jtag.c:1106 jtag_reset_callback():
> Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets
test
> logic, too
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 0
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: parport.c:212 parport_reset(): trst: 1, srst: 1
> Debug: parport.c:212 parport_reset(): trst: 1, srst: 1
> Debug: arm7_9_common.c:722 arm7_9_deassert_reset(): target-
>state: reset
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 2
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: parport.c:212 parport_reset(): trst: 0, srst: 0
> Debug: openocd.c:106 main(): target init complete
> Debug: openocd.c:110 main(): flash init complete
> Debug: openocd.c:114 main(): pld init complete
> Debug: gdb_server.c:1347 gdb_init(): gdb service for target
arm7tdmi
> at port 3333
> Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: reset
> Debug: embeddedice.c:299 embeddedice_write_reg(): 9: 0xffffffff
> Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 3
> Debug: jtag.c:1106 jtag_reset_callback():
> Debug: embeddedice.c:299 embeddedice_write_reg(): 11: 0xffffffff
> Debug: embeddedice.c:299 embeddedice_write_reg(): 12: 0x00000100
> Debug: embeddedice.c:299 embeddedice_write_reg(): 13: 0x000000f7
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: arm7_9_common.c:620 arm7_9_poll(): DBGACK set,
> dbg_state->value: 0x19
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: embeddedice.c:299 embeddedice_write_reg(): 12: 0x00000000
> Debug: arm7_9_common.c:936 arm7_9_debug_entry(): target entered
debug
> from Thumb state
> Debug: arm7_9_common.c:940 arm7_9_debug_entry(): r0_thumb:
0xc0000000,
> pc_thumb: 0x7fffe256
> Debug: arm7_9_common.c:976 arm7_9_debug_entry(): target entered
debug
> state in Supervisor mode
> Debug: arm7_9_common.c:980 arm7_9_debug_entry(): thumb state,
applying
> fixups
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r0: 0xc0000000
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r1: 0xe0028000
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r2: 0xe0008000
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r3: 0xd57f5042
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r4: 0xe002c000
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r5: 0x7ffffd34
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r6: 0x40000128
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r7: 0x00000000
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r8: 0xc8cac578
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r9: 0xf7e6efbe
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r10: 0x9d075916
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r11: 0x2e977c06
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r12: 0x1c0747fb
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r13: 0x4000ffb8
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r14: 0x7fffe30d
> Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r15: 0x7fffe250
> Debug: arm7_9_common.c:1011 arm7_9_debug_entry(): entered debug
state
> at PC 0x7fffe250
> Debug: target.c:444 target_call_event_callbacks(): target event 0
> Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: halted
> Warning: arm7_9_common.c:842 arm7_9_halt(): target was already
halted
> Debug: gdb_server.c:124 gdb_get_char(): received '+$Hc-1#09'
> Info: server.c:67 add_connection(): accepted 'gdb' connection
from 0
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'Hc-1'
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$qC#b4'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'qC'
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$qOffsets#4b'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'qOffsets'
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$?#3f'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: '?'
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$S02#b5'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$Hg0#df'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'Hg0'
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$pf#d6'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pf'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$50e2ff7f#65'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$m7fffe250,4#32'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'm7fffe250,4'
> Debug: gdb_server.c:834 gdb_read_memory_packet(): addr:
0x7fffe250,
> len: 0x00000004
> Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address:
0x7fffe250,
> size: 0x00000004, count: 0x00000001
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$fcd40868#37'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$qSymbol::#5b'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'qSymbol::'
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$#00'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$X40000000,0:#72'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'X40000000,0:'
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char(): received
> '+$X40000000,17d:ðŸåðŸåðŸåðŸåðŸå'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet:
> 'X40000000,17d:ðŸåðŸåðŸåðŸåðŸå'
> Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
> 0x40000000, len: 0x0000017d
> Debug: target.c:625 target_write_buffer(): writing buffer of 381
byte
> at 0x40000000
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x40000000, size: 0x00000004, count: 0x0000005f
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x4000017c, size: 0x00000001, count: 0x00000001
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$X4000017d,17d:'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'X4000017d,17d:'
> Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
> 0x4000017d, len: 0x0000017d
> Debug: target.c:625 target_write_buffer(): writing buffer of 381
byte
> at 0x4000017d
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x4000017d, size: 0x00000001, count: 0x00000003
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x40000180, size: 0x00000004, count: 0x0000005e
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x400002f8, size: 0x00000001, count: 0x00000002
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$X400002fa,17b:'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'X400002fa,17b:'
> Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
> 0x400002fa, len: 0x0000017b
> Debug: target.c:625 target_write_buffer(): writing buffer of 379
byte
> at 0x400002fa
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x400002fa, size: 0x00000001, count: 0x00000002
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x400002fc, size: 0x00000004, count: 0x0000005e
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x40000474, size: 0x00000001, count: 0x00000001
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$X40000475,4f:À-å
> À á'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'X40000475,4f:À-å
> À á'
> Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
> 0x40000475, len: 0x0000004f
> Debug: target.c:625 target_write_buffer(): writing buffer of 79
byte
> at 0x40000475
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x40000475, size: 0x00000001, count: 0x00000003
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x40000478, size: 0x00000004, count: 0x00000013
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$X400004c4,18:'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'X400004c4,18:'
> Debug: gdb_server.c:994 gdb_write_memory_binary_packet(): addr:
> 0x400004c4, len: 0x00000018
> Debug: target.c:625 target_write_buffer(): writing buffer of 24
byte
> at 0x400004c4
> Debug: arm7_9_common.c:1822 arm7_9_write_memory(): address:
> 0x400004c4, size: 0x00000004, count: 0x00000006
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Debug: embeddedice.c:299 embeddedice_write_reg(): 0: 0x00000005
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p0#a0'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p0'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$000000c0#b3'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p1#a1'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p1'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$008002e0#bf'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p2#a2'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p2'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$008000e0#bd'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p3#a3'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p3'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$42507fd5#01'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p4#a4'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p4'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$00c002e0#ea'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p5#a5'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p5'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$34fdff7f#9a'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p6#a6'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p6'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$28010040#8f'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p7#a7'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p7'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$00000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p8#a8'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p8'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$78c5cac8#66'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p9#a9'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p9'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$beefe6f7#ca'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$pa#d1'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pa'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$1659079d#d9'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$pb#d2'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pb'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$067c972e#07'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$pc#d3'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pc'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$fb47071c#2e'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$pd#d4'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pd'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$b8ff0040#2a'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$pe#d5'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'pe'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$0de3ff7f#95'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p10#d1'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p10'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p11#d2'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p11'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p12#d3'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p12'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p13#d4'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p13'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p14#d5'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p14'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p15#d6'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p15'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p16#d7'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p16'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p17#d8'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p17'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet
> '$000000000000000000000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p18#d9'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p18'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$00000000#80'
> Debug: gdb_server.c:124 gdb_get_char(): received '+$p19#da'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied packet: 'p19'
> Debug: gdb_server.c:680 gdb_get_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending
packet '$f3000080#c1'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$Pf020040#79'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'Pf020040'
> Debug: gdb_server.c:728 gdb_set_register_packet():
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$P1900080#b6'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'P1900080'
> Debug: gdb_server.c:728 gdb_set_register_packet():
> Debug: armv4_5.c:256 armv4_5_set_core_reg(): changing to ARM
state
> Debug: gdb_server.c:177 gdb_put_packet(): sending packet '$OK#9a'
> Debug: gdb_server.c:124 gdb_get_char():
received '+$m2e977c06,4#d4'
> Debug: gdb_server.c:239 gdb_get_packet(): character: '$'
> Debug: gdb_server.c:1237 gdb_input(): recevied
packet: 'm2e977c06,4'
> Debug: gdb_server.c:834 gdb_read_memory_packet(): addr:
0x2e977c06,
> len: 0x00000004
> Debug: arm7_9_common.c:1676 arm7_9_read_memory(): address:
0x2e977c06,
> size: 0x00000001, count: 0x00000004
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Debug: embeddedice.c:203 embeddedice_read_reg_w_check(): 1
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Warning: jtag.c:1048 jtag_read_buffer(): value captured during scan
> didn't pass the requested check: captured: 0x00 check_value: 0x01
> check_mask: 0x0f
> Error: arm7_9_common.c:1792 arm7_9_read_memory(): JTAG error
while
> reading cpsr
>
Jeff,

did you succeed by now?
I just started to recap on my old JTAG work and now have a target
board with ft2232 and lpc2138. Both are powered from USB and I see the
same problems you have.
The problems seems to be somewhere in the field of powering the target
and ft2232 both from USB and thus being reset/initialized at the same
time (this is an ft2232 specific issue).

I am not sure if the clock will be too high. Can you measure the TCK
pulse with? TCK should be max 1/6 of the lpc21xx crystal freq so max 2
MHz for a 12 MHz Xtal. But it is safer to go a bit lower in freq since
an exact match means that both clocks _must_ be in sync and that is
only true if RTCK was used ...

If RTCK is used there is no need to set the jtag_speed. This is called
"adaptive clocking" where the JTAG TCK signal can always be driven to
the highest possible frequency (very usefull - I once had a target
that booted from 32 kHz by default ...).

But ... I did discover there is a problem with the RTCK and CPU reset
(not TRST) lines. I now have my little ft2232 board connected to a
separate target board (using its own power supply and reset logic) and
this works great: start openOCD after resetting the target always
works - as long as I make sure my ft2232 USB thingy is initialized
before resetting the target.

Maybe there is a similar problem with the par.port wiggler type of
devices. When the rtck line is kept floating (i.e: the lpc2106 does
not see a perfect logical zero during reset) the jtag port will be
disabled.
Having said above that I do not think the jtag_speed will be too high:
be sure to check this! If the jtag clock is too high you will see very
strange errors. I had the thing started up correctly but behaving
strange during debugging later on with my jtag clock set to 2 MHz (on
a 12 MHz target xtal). If in doubt, use a low clock frequency (a high
jtag_speed value) to be sure.

Good Luck,

Rob - http://www.myvoice.nl/electronics

--- In l..., "Jason Morgan" wrote:
>
> Hi,
> I have had the same problem when the CPU clock was not stable, or
> when driving the JTAG too fast.
> regards,
> jason.
> --- In l..., Jeff wrote:
> >
> > Hi, I'm new and trying to get started with an LPC2106 (Olimex LPC-
> P2106
> > board) and OpenOCD with an Olimex parallel port wiggler. OpenOCD
> is r128
> > from Yagarto. I'm wondering what I've setup wrong. Sorry for the
> long
> > length of this post, but I wasn't sure what info would be needed
> and
> > wanted to provide everything I could think of.
Hi Rob,

Thanks for the good info. As it turns out, without any other ideas I
just gave up. I just didn't have the time to keep trying and wanted to
spend time working on my code instead, so I've developed without using
JTAG and without interactive debugging. It's certainly gone slower than
it might have, but I have been able to complete the application (or
nearly so). I've got both a serial port and LCD panel, so I was able to
get those going early on and then use them for outputting debug info.
Slow but sure.... At some point when I get some more time, I'll try JTAG
again. Maybe it has something to do with the computer I was using and
I'm thinking I'll first try with a different one. Just haven't gotten
there yet.

- Jeff
If you want to use JTAG wiggler circuit then try to use H-JTAG with keil
which support RDI interface.

On 3/16/07, Deirdre Schleigh & Jeff Robbins wrote:
>
> Hi Rob,
>
> Thanks for the good info. As it turns out, without any other ideas I
> just gave up. I just didn't have the time to keep trying and wanted to
> spend time working on my code instead, so I've developed without using
> JTAG and without interactive debugging. It's certainly gone slower than
> it might have, but I have been able to complete the application (or
> nearly so). I've got both a serial port and LCD panel, so I was able to
> get those going early on and then use them for outputting debug info.
> Slow but sure.... At some point when I get some more time, I'll try JTAG
> again. Maybe it has something to do with the computer I was using and
> I'm thinking I'll first try with a different one. Just haven't gotten
> there yet.
>
> - Jeff
>

--
sandip chudasama
CESES