OpenOCD starts with an error (writing DCSR) [solved]

Hello,

I’m new to JTAG and debugging but I need to get some images to pxa270 system with JTAG. I’m using linux and ARM-USB-OCD by Olimex. OpenOCD starts with an error and warnings (see below starting at line 54). When I try to telnet to target and then for example check flash configuration (>flash info 0) it gives segmentation fault.

Any ideas how to get through this? Maybe something to kick me to the right direction :slight_smile: Thanks.


By the way, I had to remove debug line 27 from the debug info below. It gave me an error when submitting this text even if it was inside ‘code’. I really can’t see why. Weird.

Debug:   6 0 command.c:375 command_run_line(): script openocd.cfg
Debug:   7 0 configuration.c:87 open_file_from_path(): opened openocd.cfg
Debug:   8 0 command.c:375 command_run_line(): telnet_port 	3333
Debug:   9 0 command.c:375 command_run_line(): gdb_port 	4444
Debug:   10 0 command.c:375 command_run_line(): interface ft2232
Debug:   11 0 command.c:375 command_run_line(): ft2232_layout olimex-jtag
Debug:   12 0 command.c:375 command_run_line(): ft2232_vid_pid 0x15BA 0x0003
Debug:   13 0 command.c:375 command_run_line(): ft2232_device_desc "Olimex OpenOCD JTAG"
Debug:   14 0 command.c:375 command_run_line(): jtag_speed 0
Debug:   15 0 command.c:375 command_run_line(): jtag_nsrst_delay 260
Debug:   16 0 command.c:375 command_run_line(): jtag_ntrst_delay 0
Debug:   17 0 command.c:375 command_run_line(): reset_config trst_and_srst separate
Debug:   18 0 command.c:375 command_run_line(): jtag_device 7 0x1 0x7f 0x7e
Debug:   19 0 command.c:375 command_run_line(): daemon_startup reset
Debug:   20 0 command.c:375 command_run_line(): target xscale little reset_halt 0 pxa27x
Debug:   21 0 command.c:375 command_run_line(): working_area 0 0x5c000000 0x10000 nobackup
Debug:   22 0 command.c:375 command_run_line(): run_and_halt_time 0 30
Debug:   23 0 command.c:375 command_run_line(): flash bank cfi 0x0000000 0x4000000 2 4 0
Debug:   24 0 jtag.c:1439 jtag_init(): -
Debug:   25 0 ft2232.c:1463 ft2232_init_libftdi(): 'ft2232' interface using libftdi with 'olimex-jtag' layout (15ba:0003)
Debug:   26 1 ft2232.c:1505 ft2232_init_libftdi(): current latency timer: 2
asserted

Debug:   28 1 ft2232.c:1815 olimex_jtag_init(): 82 09 0f
Debug:   29 1 ft2232.c:256 ft2232_speed(): 86 00 00
Debug:   30 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   31 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   32 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   33 1 jtag.c:1210 jtag_reset_callback(): -
Info:    34 1 jtag.c:1304 jtag_examine_chain(): JTAG device found: 0x79265013 (Manufacturer: 0x009, Part: 0x9265, Version: 0x7)
Debug:   35 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   36 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   37 1 openocd.c:114 main(): jtag init complete
Debug:   38 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: SRST released
Debug:   39 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   40 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   41 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   42 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: SRST released
Debug:   43 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   44 1 ft2232.c:1000 olimex_jtag_reset(): trst: 1, srst: 0, high_output: 0x08, high_direction: 0x0f
Debug:   45 1 ft2232.c:1000 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f
Debug:   46 1 openocd.c:118 main(): target init complete
Debug:   47 1 openocd.c:122 main(): flash init complete
Debug:   48 1 openocd.c:126 main(): NAND init complete
Debug:   49 1 openocd.c:130 main(): pld init complete
Debug:   50 1 gdb_server.c:1978 gdb_init(): gdb service for target xscale at port 4444
Debug:   51 1 xscale.c:1583 xscale_assert_reset(): target->state: unknown
Debug:   52 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: TRST released
Debug:   53 1 jtag.c:1210 jtag_reset_callback(): -
Warning: 54 1 jtag.c:1132 jtag_check_value(): value captured during scan didn't pass the requested check: captured: 0x00 check_value: 0x02 check_mask: 0x07
Warning: 55 1 jtag.c:1092 jtag_read_buffer(): in_handler reported a failed check
Error:   56 1 xscale.c:803 xscale_write_dcsr(): JTAG error while writing DCSR
Debug:   57 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: SRST asserted
Debug:   58 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   59 1 ft2232.c:1000 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x03, high_direction: 0x0f
Debug:   60 1 xscale.c:1251 xscale_halt(): target->state: reset
Debug:   61 1 xscale.c:1266 xscale_halt(): target->state == TARGET_RESET
Debug:   62 1 xscale.c:1627 xscale_deassert_reset(): -
Debug:   63 1 jtag.c:303 jtag_call_event_callbacks(): jtag event: SRST released
Debug:   64 1 jtag.c:1210 jtag_reset_callback(): -
Debug:   65 1 ft2232.c:1000 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f
Debug:   66 2 configuration.c:87 open_file_from_path(): opened /usr/lib/openocd/xscale/debug_handler.bin
Debug:   67 2 xscale.c:835 xscale_load_ic(): loading miniIC at 0xfe000820
Debug:   68 2 xscale.c:821 parity(): parity of 0xee1ade10 is 0
Debug:   69 2 xscale.c:821 parity(): parity of 0xe21dd102 is 1
Debug:   70 2 xscale.c:821 parity(): parity of 0x1a000001 is 0
Debug:   71 2 xscale.c:821 parity(): parity of 0xe3a0d103 is 1
Debug:   72 2 xscale.c:821 parity(): parity of 0xee0ade10 is 1
Debug:   73 2 xscale.c:821 parity(): parity of 0xee1efe10 is 0
Debug:   74 2 xscale.c:821 parity(): parity of 0x6afffffd is 1
Debug:   75 2 xscale.c:821 parity(): parity of 0xee080e10 is 1
Debug:   76 2 xscale.c:835 xscale_load_ic(): loading miniIC at 0xfe000840
Debug:   77 2 xscale.c:821 parity(): parity of 0xee1efe10 is 0
Debug:   78 2 xscale.c:821 parity(): parity of 0x6afffffd is 1
Debug:   79 2 xscale.c:821 parity(): parity of 0xee08ee10 is 0
Debug:   80 2 xscale.c:821 parity(): parity of 0xe1a00001 is 1
Debug:   81 2 xscale.c:821 parity(): parity of 0xeb000170 is 0
Debug:   82 2 xscale.c:821 parity(): parity of 0xe1a00002 is 1
Debug:   83 2 xscale.c:821 parity(): parity of 0xeb00016e is 0
Debug:   84 2 xscale.c:821 parity(): parity of 0xe1a00003 is 0
Debug:   85 2 xscale.c:835 xscale_load_ic(): loading miniIC at 0xfe000860
...and so on

Solved this by installing OpenOCD again with a slightly newer version. Dunno if the previous installation had something wrong or the new version just works better…