It seems that arm11 in openocd is broken.

1. mrc/mcr are not working (try executing mcr/mrc commands in
c100helper.tcl).

2. memwrite burst is not working, see log below. Looks like a data fault
during execution. When memwrite burst works it gives DSCR=6006, when it
is broken DSCR=605a. This bug is intermittent but it does not seem to be
dependent on jtag_khz. 
I use it for flash write_image command. This command either fails on the
very first burst write or never fails (so it never fails on 2nd and
later burst writes). So it looks like the problem is on the download of
the code to the ram. 

I looked at arm11_dbgtap.c to if I can pinpoint the changes that broke
this but just way too much has changed since my working version (about a
year ago). 

Debug: 874 11683 command.c:133 script_debug(): command - ocd_command
ocd_command type ocd_arm11 memwrite burst enable
Debug: 875 11683 command.c:133 script_debug(): command - ocd_arm11
ocd_arm11 memwrite burst enable
Info : 877 11687 command.c:1556 handle_command_parse_bool(): memory
write burst mode is enabled
Debug: 878 11687 command.c:133 script_debug(): command - ocd_command
ocd_command type ocd_debug_level 3
Debug: 879 11687 command.c:133 script_debug(): command - debug_level
ocd_debug_level 3
User : 881 11689 command.c:539 command_print(): debug_level: 3
Debug: 882 11689 command.c:133 script_debug(): command - ocd_command
ocd_command type ocd_flash write_image ./images/u-boot.bin 0x20000000
Debug: 883 11689 command.c:133 script_debug(): command - ocd_flash
ocd_flash write_image ./images/u-boot.bin 0x20000000
Debug: 885 11691 configuration.c:87 find_file():
found ./images/u-boot.bin
Debug: 886 11691 configuration.c:87 find_file():
found ./images/u-boot.bin
Debug: 887 11692 target.c:1135 target_alloc_working_area(): MMU
disabled, using physical address for working memory 0x0a000000
Debug: 888 11692 target.c:1197 target_alloc_working_area(): allocated
new working area at address 0x0a000000
Debug: 889 11692 target.c:1314 target_write_buffer(): writing buffer of
96 byte at 0x0a000000
Debug: 890 11692 arm11.c:939 arm11_write_memory_inner(): ADDR 0a000000
SIZE 00000004  COUNT 00000018
Debug: 891 11717 target.c:1197 target_alloc_working_area(): allocated
new working area at address 0x0a000060
Debug: 892 11717 target.c:1314 target_write_buffer(): writing buffer of
32768 byte at 0x0a000060
Debug: 893 11717 arm11.c:939 arm11_write_memory_inner(): ADDR 0a000060
SIZE 00000004  COUNT 00002000
Debug: 894 15810 armv4_5.c:1117 armv4_5_run_algorithm_inner(): Running
algorithm
Debug: 895 15822 arm_dpm.c:184 dpm_read_reg(): READ: spsr_svc, 00000010
Debug: 896 15830 armv4_5.c:1200 armv4_5_run_algorithm_inner(): setting
core_mode: 0x13
Debug: 897 15830 breakpoints.c:102 breakpoint_add(): added hardware
breakpoint at 0x0a00005c of length 0x00000004, (BPID: 0)
Debug: 898 15830 arm11.c:473 arm11_resume(): target->state: halted
Debug: 899 15830 arm11.c:484 arm11_resume(): RESUME PC 0a000000!
Debug: 900 15854 arm11.c:526 arm11_resume(): Add BP 0 at 0a00005c
Debug: 901 15864 arm_dpm.c:223 dpm_write_reg(): WRITE: r1, 20000000
Debug: 902 15868 arm_dpm.c:223 dpm_write_reg(): WRITE: r2, 00004000
Debug: 903 15872 arm_dpm.c:223 dpm_write_reg(): WRITE: r3, 000000a0
Debug: 904 15876 arm_dpm.c:223 dpm_write_reg(): WRITE: r4, 00000080
Debug: 905 15880 arm_dpm.c:223 dpm_write_reg(): WRITE: r5, 002523d8
Debug: 906 15884 arm_dpm.c:223 dpm_write_reg(): WRITE: r8, 20000aaa
Debug: 907 15888 arm_dpm.c:223 dpm_write_reg(): WRITE: r9, aaaaaaaa
Debug: 908 15892 arm_dpm.c:223 dpm_write_reg(): WRITE: r10, 20000554
Debug: 909 15896 arm_dpm.c:223 dpm_write_reg(): WRITE: r11, 55555555
Debug: 910 15908 arm_dpm.c:223 dpm_write_reg(): WRITE: pc, 0a000000
Debug: 911 15912 arm_dpm.c:223 dpm_write_reg(): WRITE: r0, 0a000060
Debug: 912 15918 core.c:570 jtag_add_statemove(): cur_state=RUN/IDLE
goal_state=DRPAUSE
Debug: 913 15921 arm11.c:547 arm11_resume(): DSCR 0000605a
Debug: 914 15921 target.c:1031 target_call_event_callbacks(): target
event 4 (resumed)
Debug: 915 15924 target.c:2110 target_wait_state(): waiting for target
halted...
Debug: 916 16426 log.c:458 keep_alive(): keep_alive() was not invoked in
the 1000ms timelimit (4805). This may cause trouble with GDB
connections.
Error: 936 25926 target.c:2121 target_wait_state(): timed out while
waiting for target halted
Debug: 937 25926 breakpoints.c:127 breakpoint_free(): free BPID: 0 --> 0
Debug: 938 25926 cfi.c:1501 cfi_spansion_write_block(): status: 0x2523d8
Error: 939 25926 core.c:133 flash_driver_write(): error writing to flash
at address 0x20000000 at offset 0x00000000 (-902)
Debug: 940 25926 command.c:620 run_command(): Command failed with error
code -902
User : 941 25926 command.c:824 openocd_jim_vfprintf(): Command handler
execution failed
User : 944 25926 command.c:824 openocd_jim_vfprintf(): 
User : 947 25927 command.c:824 openocd_jim_vfprintf(): 
User : 949 25927 command.c:824 openocd_jim_vfprintf(): 
e...@mws:/tools/p4/sw/hub/openocd$ 


_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to