Hello guys,
Here’s the setup:
-
Olimex SAM7-P64 evaluation board (external power supply)
-
OOCDLink (home made replica)
-
Using OpenOCD (differen versions)
On the board runs the “blinking led tutorial” SW from the Using_Open_Source_Tools_for_AT91SAM7S_Cross_Development_revision_C, what I have flashed with SAM-BA.
OOCD doesnt start correctly.
I have tried several versions (0.1.0, 0.2.0, 0.3.1, 0.4.x RC), compiled by myself with libftdi on two laptops, results are the same.
After OOCD is up, over telnet I can assert “jtag_reset 1 1” and the blinking stops, at least that part works. NSRST goes low, I mean.
Config:
Board:
interface ft2232
ft2232_device_desc “OOCDLink”
ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0xbaf8
ft2232_latency 10
jtag_khz 2
jtag_nsrst_delay 200
jtag_ntrst_delay 200
Target:
at91sam7sx.cfg
Here is the worth part of the log file:
Debug: 416 797 ft2232.c:1676 ft2232_execute_scan(): DR scan, 640 bits, end in DRPAUSE
Debug: 417 797 ft2232.c:1564 ft2232_execute_statemove(): statemove end in RESET
Debug: 418 797 ft2232.c:271 clock_tms(): mpsse cmd=4b, tms_bits = 0x000000ff, bit_count=5
Debug: 419 797 ft2232.c:281 clock_tms(): tap_set_state(DREXIT2)
Debug: 420 797 ft2232.c:281 clock_tms(): tap_set_state(DRUPDATE)
Debug: 421 797 ft2232.c:281 clock_tms(): tap_set_state(DRSELECT)
Debug: 422 797 ft2232.c:281 clock_tms(): tap_set_state(IRSELECT)
Debug: 423 797 ft2232.c:281 clock_tms(): tap_set_state(RESET)
Debug: 424 797 ft2232.c:636 ft2232_send_and_recv(): write buffer (size 94):
Debug: 425 797 ft2232.c:611 ft2232_debug_dump_buffer(): 4b 06 17 39 4e 00 ff 00 00 00 ff 00 00 00 ff 00
Debug: 426 797 ft2232.c:611 ft2232_debug_dump_buffer(): 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
Debug: 427 797 ft2232.c:611 ft2232_debug_dump_buffer(): 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
Debug: 428 797 ft2232.c:611 ft2232_debug_dump_buffer(): 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
Debug: 429 797 ft2232.c:611 ft2232_debug_dump_buffer(): 00 00 ff 00 00 00 ff 00 00 00 ff 00 00 00 ff 00
Debug: 430 797 ft2232.c:617 ft2232_debug_dump_buffer(): 00 00 ff 00 00 3b 06 00 6b 01 01 4b 04 1f
Info : 431 1125 ft2232.c:680 ft2232_send_and_recv(): inter: 0.000000, inter2: 0.000000 end: 0.328125
Debug: 432 1125 ft2232.c:701 ft2232_send_and_recv(): read buffer (0 retries): 81 bytes
Debug: 433 1125 ft2232.c:611 ft2232_debug_dump_buffer(): 0f 87 c3 e7 0f 00 00 00 7f 00 00 00 7f 00 00 00
Debug: 434 1125 ft2232.c:611 ft2232_debug_dump_buffer(): 7f 00 00 00 7f 00 00 00 7f 00 00 00 7f 00 00 00
Debug: 435 1125 ft2232.c:611 ft2232_debug_dump_buffer(): 7f 00 00 00 7f 00 00 00 7f 00 00 00 7f 00 00 00
Debug: 436 1125 ft2232.c:611 ft2232_debug_dump_buffer(): 7f 00 00 00 7f 00 00 00 7f 00 00 00 7f 00 00 00
Debug: 437 1125 ft2232.c:611 ft2232_debug_dump_buffer(): 7f 00 00 00 7f 00 00 00 7f 00 00 00 7f 00 00 00
Debug: 438 1125 ft2232.c:617 ft2232_debug_dump_buffer(): 00
Debug: 439 1125 commands.c:248 jtag_read_buffer(): fields[0].in_value[640]: 0x0000000FE7C3870F
Info : 440 1125 core.c:915 jtag_examine_chain_display(): JTAG tap: at91sam7s.cpu tap/device found: 0xe7c3870f (mfg: 0x387, part: 0x7c38, ver: 0xe)
Warn : 441 1125 core.c:915 jtag_examine_chain_display(): JTAG tap: at91sam7s.cpu UNEXPECTED: 0xe7c3870f (mfg: 0x387, part: 0x7c38, ver: 0xe)
Error: 442 1125 core.c:915 jtag_examine_chain_display(): JTAG tap: at91sam7s.cpu expected 1 of 1: 0x07c3870f (mfg: 0x387, part: 0x7c38, ver: 0x0)
Warn : 443 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 32 0x0000000f
Warn : 444 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 64 0x0000007f
Warn : 445 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 96 0x0000007f
Warn : 446 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 128 0x0000007f
Warn : 447 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 160 0x0000007f
Warn : 448 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 192 0x0000007f
Warn : 449 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 224 0x0000007f
Warn : 450 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 256 0x0000007f
Warn : 451 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 288 0x0000007f
Warn : 452 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 320 0x0000007f
Warn : 453 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 352 0x0000007f
Warn : 454 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 384 0x0000007f
Warn : 455 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 416 0x0000007f
Warn : 456 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 448 0x0000007f
Warn : 457 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 480 0x0000007f
Warn : 458 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 512 0x0000007f
Warn : 459 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 544 0x0000007f
Warn : 460 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 576 0x0000007f
Warn : 461 1125 core.c:953 jtag_examine_chain_end(): Unexpected idcode after end of chain: 608 0x0000007f
I dont know why I’m receiving that IDCODE.
Why the command “39 4e 00” sends only 78 bytes and not 80 (20x4Byte)?
Also very interesting: before I flashed the blinking led example, with the same setup, holding down the reset button for the whole time and resetting the OOCD I have got the IDCODE 0x3f0f0f0f. After that I couldnt debug.
Now, it doesnt work anymore.
Also very interesting that I keep receiving the message:
Debug: 945 33984 target.c:952 target_call_event_callbacks(): target event 2 (gdb-halt)
So long. Any idea?
Is there any way with OOCD to check if the communication channel (OOCD → OOCDLink → SAM7 → OOCDLink → OOCD) works?
Can I send somehow commands and read back something to see that the “line” is actually OK? BYPASS?
Thanks for your help in advance.