Hello,

I am trying to get the OpenOCD to work with an ARM7TDMI - custom SoC.

OpenOCD works fine with the Olimex ARM-USB-OCD but I'd like to be able
to use the J-Link because it support the RTCK clock.

I am using the latest SVN version 1022.

I can communicate with the J-Link without problem - so this is a
different problem from earlier.

Here is a scenario for testing :
I start OpenOCD, then telnet into it and issue a "halt", the CPU halts
(LEDs on the board stop blinking), I can "mdw 0 100" without problem.
then I issue a "reset halt" and then I get the error below (after
recompiling with all debug in jlink):
Warning: 4859 24281 jtag.c:1217 jtag_check_value(): value captured
during scan didn't pass the requested check: captured: 0x04
check_value: 0x01 check_mask: 0x0f

And then nothing works anymore, I get "target not halted" - and halt
command fails.

it looks like " jlink_tap_execute(): pending scan result, " is not
getting the correct data back from the target but I am not sure what
is going on - a little to deep in the jtag for me ...

Can anybody offer a hint ?

Thanks

Francois

The config file is :

#daemon configuration
telnet_port 4444
gdb_port 2332

#interface
interface jlink

#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 0xf

#target configuration
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little 0

jtag_khz 0
init



Here is the relevant part of the log just before the error :

Debug:   4748 24187 target.c:3859 jim_target(): Target command params:
Debug:   4749 24187 target.c:3860 jim_target(): target names
Debug:   4750 24187 target.c:2995 target_handle_event(): event: 10
reset-assert-pre - no action
Debug:   4751 24187 arm7_9_common.c:768 arm7_9_assert_reset():
target->state: halted
Debug:   4752 24187 embeddedice.c:401 embeddedice_write_reg(): 8: 0x00000000
Debug:   4753 24187 embeddedice.c:401 embeddedice_write_reg(): 9: 0x00000003
Debug:   4754 24187 embeddedice.c:401 embeddedice_write_reg(): 11: 0xffffffff
Debug:   4755 24187 embeddedice.c:401 embeddedice_write_reg(): 12: 0x00000100
Debug:   4756 24187 embeddedice.c:401 embeddedice_write_reg(): 13: 0x000000f7
Debug:   4757 24187 jtag.c:999 jtag_add_reset(): SRST line asserted
Debug:   4758 24187 jtag.c:1022 jtag_add_reset(): TRST line asserted
Debug:   4759 24187 jtag.c:327 jtag_call_event_callbacks(): jtag
event: JTAG controller reset (TLR or TRST)
Debug:   4760 24187 jtag.c:1301 jtag_reset_callback(): -
Debug:   4761 24187 target.c:2995 target_handle_event(): event: 11
reset-assert-post - no action
Debug:   4762 24187 target.c:3859 jim_target(): Target command params:
Debug:   4763 24187 target.c:3860 jim_target(): target names
Debug:   4764 24187 target.c:2995 target_handle_event(): event: 12
reset-deassert-pre - no action
Debug:   4765 24187 arm7_9_common.c:830 arm7_9_deassert_reset():
target->state: reset
Debug:   4766 24187 jtag.c:1003 jtag_add_reset(): SRST line released
Warning: 4767 24187 arm7_9_common.c:838 arm7_9_deassert_reset(): srst
pulls trst - can not reset into halted mode. Issuing halt after reset.
Debug:   4768 24187 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4769 24187 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4770 24187 jlink.c:919 jlink_debug_buffer(): 0000 00 00 00 00 68
Debug:   4771 24187 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4772 24187 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4773 24187 jlink.c:919 jlink_debug_buffer(): 0000 03 00 00 00 69
Debug:   4774 24187 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4775 24187 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4776 24187 jlink.c:919 jlink_debug_buffer(): 0000 ff ff ff ff 6b
Debug:   4777 24187 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4778 24187 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4779 24187 jlink.c:919 jlink_debug_buffer(): 0000 00 01 00 00 6c
Debug:   4780 24187 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4781 24187 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4782 24187 jlink.c:919 jlink_debug_buffer(): 0000 f7 00 00 00 6d
Debug:   4783 24187 jlink.c:212 jlink_execute_queue(): reset trst: 1 srst 1
Debug:   4784 24187 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 72, result = 72
Debug:   4785 24187 jlink.c:919 jlink_debug_buffer(): 0000 cf 00 10 01
25 00 00 00 00 10 ac 04 00 00 00 00
Debug:   4786 24187 jlink.c:919 jlink_debug_buffer(): 0010 82 95 00 00
00 00 40 b0 12 00 00 00 00 08 56 02
Debug:   4787 24187 jlink.c:919 jlink_debug_buffer(): 0020 00 00 00 00
c1 00 00 00 00 00 00 14 00 30 00 00
Debug:   4788 24187 jlink.c:919 jlink_debug_buffer(): 0030 00 90 02 00
fe ff ff ff 57 00 00 40 00 00 00 0b
Debug:   4789 24187 jlink.c:919 jlink_debug_buffer(): 0040 00 b8 07 00
00 68 01 00
Debug:   4790 24203 jlink.c:879 jlink_usb_read(): jlink_usb_read, result = 34
Debug:   4791 24203 jlink.c:919 jlink_debug_buffer(): 0000 00 00 00 00
00 1a 00 00 00 00 00 80 fe ff 07 00
Debug:   4792 24203 jlink.c:919 jlink_debug_buffer(): 0010 00 00 d2 ff
ff ff ff ff ff 0a 00 00 08 00 00 60
Debug:   4793 24203 jlink.c:919 jlink_debug_buffer(): 0020 ff ff
Debug:   4794 24203 jlink.c:893 jlink_usb_read_emu_result():
jlink_usb_read_result, result = 1
Debug:   4795 24203 jlink.c:919 jlink_debug_buffer(): 0000 00
Debug:   4796 24203 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4797 24203 jlink.c:919 jlink_debug_buffer(): 0000 00 00 00 00
74 01 cf 00 02 00 02 00 43 01 0b 01
Debug:   4798 24203 jlink.c:919 jlink_debug_buffer(): 0010 03 00 00 00
69 01 cf 00 02 00 02 00 41 01 0b 01
Debug:   4799 24203 jlink.c:919 jlink_debug_buffer(): 0020 ff ff
Debug:   4800 24203 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4801 24203 jlink.c:919 jlink_debug_buffer(): 0000 00 00 00 00
68 01 cf 00 02 00 02 00 41 01 0b 01
Debug:   4802 24203 jlink.c:919 jlink_debug_buffer(): 0010 ff ff ff ff
6b 01 cf 00 02 00 02 00 4f 01 0b 01
Debug:   4803 24203 jlink.c:919 jlink_debug_buffer(): 0020 00 01
Debug:   4804 24203 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4805 24203 jlink.c:919 jlink_debug_buffer(): 0000 03 00 00 00
69 01 cf 00 02 00 02 00 4f 01 0b 01
Debug:   4806 24203 jlink.c:919 jlink_debug_buffer(): 0010 00 01 00 00
6c 01 cf 00 02 00 02 00 4d 01 0b 01
Debug:   4807 24203 jlink.c:919 jlink_debug_buffer(): 0020 f7 00
Debug:   4808 24203 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4809 24203 jlink.c:919 jlink_debug_buffer(): 0000 ff ff ff ff
6b 01 cf 00 02 00 02 00 4d 01 0b 01
Debug:   4810 24203 jlink.c:919 jlink_debug_buffer(): 0010 f7 00 00 00
6d 01 cf 00 0a 03 02 00 00 00 00 01
Debug:   4811 24203 jlink.c:919 jlink_debug_buffer(): 0020 78 01
Debug:   4812 24203 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4813 24203 jlink.c:919 jlink_debug_buffer(): 0000 00 01 00 00
6c 01 cf 00 0a 03 02 00 00 00 00 01
Debug:   4814 24203 jlink.c:919 jlink_debug_buffer(): 0010 78 01 cf 00
78 01 cf 00 11 00 00 00 14 00 00 00
Debug:   4815 24203 jlink.c:919 jlink_debug_buffer(): 0020 14 00
Debug:   4816 24203 jlink.c:447 jlink_reset(): trst: 1, srst: 1
Debug:   4817 24203 jlink.c:473 jlink_simple_command(): 0xdc
Debug:   4818 24203 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 1, result = 1
Debug:   4819 24203 jlink.c:919 jlink_debug_buffer(): 0000 dc
Debug:   4820 24203 jlink.c:473 jlink_simple_command(): 0xde
Debug:   4821 24203 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 1, result = 1
Debug:   4822 24203 jlink.c:919 jlink_debug_buffer(): 0000 de
Debug:   4823 24203 jlink.c:224 jlink_execute_queue(): sleep 50000
Debug:   4824 24265 jlink.c:212 jlink_execute_queue(): reset trst: 0 srst 0
Debug:   4825 24265 jlink.c:447 jlink_reset(): trst: 0, srst: 0
Debug:   4826 24265 jlink.c:473 jlink_simple_command(): 0xdd
Debug:   4827 24265 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 1, result = 1
Debug:   4828 24265 jlink.c:919 jlink_debug_buffer(): 0000 dd
Debug:   4829 24265 jlink.c:473 jlink_simple_command(): 0xdf
Debug:   4830 24265 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 1, result = 1
Debug:   4831 24265 jlink.c:919 jlink_debug_buffer(): 0000 df
Debug:   4832 24265 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4833 24265 jlink.c:202 jlink_execute_queue(): scan input, length = 4
Debug:   4834 24265 jlink.c:919 jlink_debug_buffer(): 0000 d2
Debug:   4835 24265 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4836 24265 jlink.c:202 jlink_execute_queue(): scan input, length = 4
Debug:   4837 24265 jlink.c:919 jlink_debug_buffer(): 0000 c2
Debug:   4838 24265 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4839 24265 jlink.c:202 jlink_execute_queue(): scan input, length = 4
Debug:   4840 24265 jlink.c:919 jlink_debug_buffer(): 0000 bc
Debug:   4841 24265 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4842 24265 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4843 24265 jlink.c:919 jlink_debug_buffer(): 0000 00 00 00 00 40
Debug:   4844 24265 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4845 24265 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4846 24265 jlink.c:919 jlink_debug_buffer(): 0000 00 00 00 00 44
Debug:   4847 24265 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 46, result = 46
Debug:   4848 24265 jlink.c:919 jlink_debug_buffer(): 0000 cf 00 a8 00
1b 04 2b 21 d8 0a c1 4a 00 00 00 00
Debug:   4849 24265 jlink.c:919 jlink_debug_buffer(): 0010 20 58 09 00
00 00 00 04 03 00 01 00 08 00 80 01
Debug:   4850 24265 jlink.c:919 jlink_debug_buffer(): 0020 00 00 00 00
00 00 00 00 00 00 00 80 00 00
Debug:   4851 24265 jlink.c:879 jlink_usb_read(): jlink_usb_read, result = 21
Debug:   4852 24265 jlink.c:919 jlink_debug_buffer(): 0000 00 02 00 10
00 20 02 00 00 00 00 00 00 00 00 00
Debug:   4853 24265 jlink.c:919 jlink_debug_buffer(): 0010 00 00 00 01 00
Debug:   4854 24265 jlink.c:893 jlink_usb_read_emu_result():
jlink_usb_read_result, result = 1
Debug:   4855 24265 jlink.c:919 jlink_debug_buffer(): 0000 00
Debug:   4856 24265 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 4
Debug:   4857 24281 jlink.c:919 jlink_debug_buffer(): 0000 d4 ee 2c 01
6c 01 cf 00 0a 03 02 00 00 00 00 01
Debug:   4858 24281 jlink.c:919 jlink_debug_buffer(): 0010 78 01 cf 00 78

======> ERROR is below

Warning: 4859 24281 jtag.c:1217 jtag_check_value(): value captured
during scan didn't pass the requested check: captured: 0x04
check_value: 0x01 check_mask: 0x0f
Warning: 4860 24281 jtag.c:1177 jtag_read_buffer(): in_handler
reported a failed check
Debug:   4861 24281 target.c:2995 target_handle_event(): event: 13
reset-deassert-post - no action
Debug:   4862 24281 target.c:3859 jim_target(): Target command params:
Debug:   4863 24281 target.c:3860 jim_target(): target names
Debug:   4864 24281 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4865 24281 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4866 24281 jlink.c:919 jlink_debug_buffer(): 0000 09 00 00 00 01
Debug:   4867 24281 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4868 24281 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4869 24281 jlink.c:919 jlink_debug_buffer(): 0000 09 00 00 00 44
Debug:   4870 24281 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 32, result = 32
Debug:   4871 24281 jlink.c:919 jlink_debug_buffer(): 0000 cf 00 70 00
25 00 00 00 00 10 ac 04 00 00 00 00
Debug:   4872 24281 jlink.c:919 jlink_debug_buffer(): 0010 82 01 80 04
00 00 80 00 00 90 00 00 00 40 00 00
Debug:   4873 24281 jlink.c:879 jlink_usb_read(): jlink_usb_read, result = 14
Debug:   4874 24281 jlink.c:919 jlink_debug_buffer(): 0000 00 09 00 00
00 01 00 20 01 00 00 80 00 00
Debug:   4875 24281 jlink.c:893 jlink_usb_read_emu_result():
jlink_usb_read_result, result = 1
Debug:   4876 24281 jlink.c:919 jlink_debug_buffer(): 0000 00
Debug:   4877 24281 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4878 24281 jlink.c:919 jlink_debug_buffer(): 0000 12 00 00 00
02 00 00 00 06 00 02 00 3c 01
Debug:   4879 24281 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4880 24281 jlink.c:919 jlink_debug_buffer(): 0000 12 00 00 00
48 01 cf 00 2c 01 02 00 41 00
Debug:   4881 24281 target.c:1657 target_wait_state(): waiting for
target halted...
Debug:   4882 24281 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4883 24281 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4884 24281 jlink.c:919 jlink_debug_buffer(): 0000 12 00 00 00 41
Debug:   4885 24281 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4886 24281 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4887 24281 jlink.c:919 jlink_debug_buffer(): 0000 12 00 00 00 04
Debug:   4888 24281 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 32, result = 32
Debug:   4889 24281 jlink.c:919 jlink_debug_buffer(): 0000 cf 00 70 00
25 00 00 00 00 10 ac 04 00 00 00 00
Debug:   4890 24281 jlink.c:919 jlink_debug_buffer(): 0010 82 01 00 09
00 00 80 00 00 20 01 00 00 40 00 00
Debug:   4891 24297 jlink.c:879 jlink_usb_read(): jlink_usb_read, result = 14
Debug:   4892 24297 jlink.c:919 jlink_debug_buffer(): 0000 00 12 00 00
00 01 00 40 02 00 00 80 00 00
Debug:   4893 24297 jlink.c:893 jlink_usb_read_emu_result():
jlink_usb_read_result, result = 1
Debug:   4894 24297 jlink.c:919 jlink_debug_buffer(): 0000 00
Debug:   4895 24297 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4896 24297 jlink.c:919 jlink_debug_buffer(): 0000 24 00 00 00
42 01 cf 00 2c 01 02 00 41 00
Debug:   4897 24297 jlink.c:704 jlink_tap_execute(): pending scan
result, length = 38
Debug:   4898 24297 jlink.c:919 jlink_debug_buffer(): 0000 24 00 00 00
08 00 00 00 06 00 02 00 3c 01
Debug:   4899 24297 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4900 24297 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4901 24297 jlink.c:919 jlink_debug_buffer(): 0000 24 00 00 00 01
Debug:   4902 24297 jlink.c:194 jlink_execute_queue(): scan end in 8
Debug:   4903 24297 jlink.c:202 jlink_execute_queue(): scan input, length = 38
Debug:   4904 24297 jlink.c:919 jlink_debug_buffer(): 0000 24 00 00 00 44
Debug:   4905 24297 jlink.c:865 jlink_usb_write(): jlink_usb_write,
out_length = 32, result = 32
Debug:   4906 24297 jlink.c:919 jlink_debug_buffer(): 0000 cf 00 70 00
25 00 00 00 00 10 ac 04 00 00 00 00
Debug:   4907 24297 jlink.c:919 jlink_debug_buffer(): 0010 82 01 00 12
00 00 80 00 00 40 02 00 00 40 00 00
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to