Am 22.07.2011 11:42, schrieb Andreas Fritiofson:
Stepping is still slow on Windows.
Stepping speed is not affected much by these patches since it depends
largely on latency, not throughput. These patches fixes a throughput
problem. Cortex-M3 stepping is really dependent on latency because, for
some reason, each register is read atomically upon debug entry, plus one
atomic restore of a debug register (for DCC purposes) per register. Just
reading core registers takes ~0.3 s on my linux system using the primer.
Besides the RLink I also have an Olimex ARM-USB-OCD adpater. On Windows,
stepping with the Olimex is considerably faster than with the RLink. On
Linux both adapters are on par. I'm Using the same STM32 board and
OCD-Version in all cases, so the cause for the slow stepping must be
related to the RLink driver.
I have now also applied the RLink "RLink interface speedup and fixes"
patch series and run into some problems:
On Linux with the standalone RLink I get:
Open On-Chip Debugger 0.5.0-dev-00959-gd6c42bf-dirty (2011-07-21-23:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/__doxygen/bugs.html
<http://openocd.berlios.de/doc/doxygen/bugs.html>
Warn : Adapter driver 'rlink' did not declare which transports it
allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : clock speed 375 kHz
Error: Read of endpoint 2 returned -75, expected 17
Error: dtc_run_download: Value too large for defined data type
Patches 1/7 to 4/7 work ok, the problem is caused by patch 5/7
On Windows using the embedded RLink, OpenOCD:
Open On-Chip Debugger 0.5.0-dev-snapshot (2011-07-21-07:10)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/__doxygen/bugs.html
<http://openocd.berlios.de/doc/doxygen/bugs.html>
Warn : Adapter driver 'rlink' did not declare which transports it
allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Error: USB read error: libusb0-dll:err [_usb_reap_async] timeout error
in procedure 'init'
Can you post debug logs (add -d on command line)?
At the moment I can provide you the debug log on Windows. Linux log will
follow.
Open On-Chip Debugger 0.5.0-dev-snapshot (2011-07-21-07:10)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
User : 11 0 command.c:557 command_print(): debug_level: 3
Debug: 12 0 configuration.c:45 add_script_search_dir(): adding tcl
Debug: 13 0 configuration.c:45 add_script_search_dir(): adding w:\openocd\src\..
Debug: 14 16 configuration.c:45 add_script_search_dir(): adding
w:/openocd/src/../share/openocd/scripts
Debug: 15 16 configuration.c:87 find_file(): found tcl/interface/rlink.cfg
Debug: 16 16 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_interface rlink
Debug: 17 16 command.c:151 script_debug(): command - interface ocd_interface
rlink
Warn : 19 16 adapter.c:167 handle_interface_command(): Adapter driver 'rlink'
did not declare which transports it allows; assuming legacy JTAG-only
Info : 20 16 transport.c:123 allow_transports(): only one transport option;
autoselect 'jtag'
Debug: 21 16 command.c:364 register_command_handler(): registering
'ocd_jtag_flush_queue_sleep'...
Debug: 22 16 command.c:364 register_command_handler(): registering
'ocd_jtag_rclk'...
Debug: 23 16 command.c:364 register_command_handler(): registering
'ocd_jtag_ntrst_delay'...
Debug: 24 16 command.c:364 register_command_handler(): registering
'ocd_jtag_ntrst_assert_width'...
Debug: 25 16 command.c:364 register_command_handler(): registering
'ocd_scan_chain'...
Debug: 26 16 command.c:364 register_command_handler(): registering
'ocd_jtag_reset'...
Debug: 27 16 command.c:364 register_command_handler(): registering
'ocd_runtest'...
Debug: 28 16 command.c:364 register_command_handler(): registering
'ocd_irscan'...
Debug: 29 16 command.c:364 register_command_handler(): registering
'ocd_verify_ircapture'...
Debug: 30 16 command.c:364 register_command_handler(): registering
'ocd_verify_jtag'...
Debug: 31 16 command.c:364 register_command_handler(): registering
'ocd_tms_sequence'...
Debug: 32 16 command.c:364 register_command_handler(): registering
'ocd_wait_srst_deassert'...
Debug: 33 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 34 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 35 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 36 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 37 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 38 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 39 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 40 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 41 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 42 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 43 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 44 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 45 16 command.c:364 register_command_handler(): registering 'ocd_jtag'...
Debug: 46 16 command.c:364 register_command_handler(): registering 'ocd_svf'...
Debug: 47 16 command.c:364 register_command_handler(): registering 'ocd_xsvf'...
Debug: 48 16 configuration.c:87 find_file(): found tcl/board/stm3210c_eval.cfg
Debug: 49 16 configuration.c:87 find_file(): found tcl/target/stm32.cfg
Debug: 50 16 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_adapter_khz 1000
Debug: 51 16 command.c:151 script_debug(): command - adapter_khz
ocd_adapter_khz 1000
Debug: 53 16 core.c:1639 jtag_config_khz(): handle jtag khz
Debug: 54 16 core.c:1602 adapter_khz_to_speed(): convert khz to interface
specific speed value
Debug: 55 16 core.c:1602 adapter_khz_to_speed(): convert khz to interface
specific speed value
User : 56 16 command.c:557 command_print(): 1000 kHz
Debug: 57 16 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_adapter_nsrst_delay 100
Debug: 58 16 command.c:151 script_debug(): command - adapter_nsrst_delay
ocd_adapter_nsrst_delay 100
User : 60 16 command.c:557 command_print(): adapter_nsrst_delay: 100
Debug: 61 16 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_jtag_ntrst_delay 100
Debug: 62 16 command.c:151 script_debug(): command - jtag_ntrst_delay
ocd_jtag_ntrst_delay 100
User : 64 32 command.c:557 command_print(): jtag_ntrst_delay: 100
Debug: 65 32 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_jtag newtap stm32 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id
0x3ba00477
Debug: 66 32 command.c:151 script_debug(): command - ocd_jtag ocd_jtag newtap
stm32 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x3ba00477
Debug: 67 32 tcl.c:575 jim_newtap_cmd(): Creating New Tap, Chip: stm32, Tap:
cpu, Dotted: stm32.cpu, 8 params
Debug: 68 32 tcl.c:592 jim_newtap_cmd(): Processing option: -irlen
Debug: 69 32 tcl.c:592 jim_newtap_cmd(): Processing option: -ircapture
Debug: 70 32 tcl.c:592 jim_newtap_cmd(): Processing option: -irmask
Debug: 71 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 72 32 core.c:1337 jtag_tap_init(): Created Tap: stm32.cpu @ abs position
0, irlen 4, capture: 0x1 mask: 0xf
Debug: 73 32 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_jtag newtap stm32 bs -irlen 5 -expected-id 0x06412041 -expected-id
0x06410041 -expected-id 0x16410041 -expected-id 0x06420041 -expected-id
0x06414041 -expected-id 0x06418041 -expected-id 0x06430041
Debug: 74 32 command.c:151 script_debug(): command - ocd_jtag ocd_jtag newtap
stm32 bs -irlen 5 -expected-id 0x06412041 -expected-id 0x06410041 -expected-id
0x16410041 -expected-id 0x06420041 -expected-id 0x06414041 -expected-id
0x06418041 -expected-id 0x06430041
Debug: 75 32 tcl.c:575 jim_newtap_cmd(): Creating New Tap, Chip: stm32, Tap:
bs, Dotted: stm32.bs, 16 params
Debug: 76 32 tcl.c:592 jim_newtap_cmd(): Processing option: -irlen
Debug: 77 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 78 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 79 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 80 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 81 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 82 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 83 32 tcl.c:592 jim_newtap_cmd(): Processing option: -expected-id
Debug: 84 32 core.c:1337 jtag_tap_init(): Created Tap: stm32.bs @ abs position
0, irlen 5, capture: 0x1 mask: 0x3
Debug: 85 32 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_target create stm32.cpu cortex_m3 -endian little -chain-position
stm32.cpu
Debug: 86 32 command.c:151 script_debug(): command - ocd_target ocd_target
create stm32.cpu cortex_m3 -endian little -chain-position stm32.cpu
Debug: 87 32 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 88 32 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 89 32 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 90 32 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 91 32 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 92 32 command.c:364 register_command_handler(): registering 'ocd_arm'...
Debug: 93 32 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 94 32 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 95 32 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 96 32 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 97 32 command.c:364 register_command_handler(): registering 'ocd_dap'...
Debug: 98 32 command.c:364 register_command_handler(): registering
'ocd_cortex_m3'...
Debug: 99 32 command.c:364 register_command_handler(): registering
'ocd_cortex_m3'...
Debug: 100 32 command.c:364 register_command_handler(): registering
'ocd_cortex_m3'...
Debug: 101 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 102 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 103 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 104 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 105 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 106 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 107 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 108 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 109 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 110 32 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 111 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 112 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 113 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 114 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 115 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 116 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 117 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 118 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 119 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 120 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 121 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 122 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 123 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 124 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 125 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 126 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 127 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 128 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 129 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 130 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 131 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 132 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 133 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 134 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 135 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 136 47 command.c:364 register_command_handler(): registering
'ocd_stm32.cpu'...
Debug: 137 47 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_stm32.cpu configure -work-area-phys 0x20000000 -work-area-size 0x8000
-work-area-backup 0
Debug: 138 47 command.c:151 script_debug(): command - ocd_stm32.cpu
ocd_stm32.cpu configure -work-area-phys 0x20000000 -work-area-size 0x8000
-work-area-backup 0
Debug: 139 47 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_flash bank stm32.flash stm32x 0x08000000 0 0 0 stm32.cpu
Debug: 140 47 command.c:151 script_debug(): command - ocd_flash ocd_flash bank
stm32.flash stm32x 0x08000000 0 0 0 stm32.cpu
Debug: 142 47 command.c:364 register_command_handler(): registering
'ocd_stm32x'...
Debug: 143 47 command.c:364 register_command_handler(): registering
'ocd_stm32x'...
Debug: 144 47 command.c:364 register_command_handler(): registering
'ocd_stm32x'...
Debug: 145 47 command.c:364 register_command_handler(): registering
'ocd_stm32x'...
Debug: 146 47 command.c:364 register_command_handler(): registering
'ocd_stm32x'...
Debug: 147 47 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_cortex_m3 reset_config sysresetreq
Debug: 148 47 command.c:151 script_debug(): command - ocd_cortex_m3
ocd_cortex_m3 reset_config sysresetreq
User : 150 47 command.c:557 command_print(): cortex_m3 reset_config sysresetreq
Debug: 151 47 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_init
Debug: 152 63 command.c:151 script_debug(): command - init ocd_init
Debug: 154 63 command.c:151 script_debug(): command - ocd_command ocd_command
type ocd_target init
Debug: 155 63 command.c:151 script_debug(): command - ocd_target ocd_target init
Debug: 157 63 target.c:1005 handle_target_init_command(): Initializing
targets...
Debug: 158 63 command.c:364 register_command_handler(): registering
'ocd_target_request'...
Debug: 159 63 command.c:364 register_command_handler(): registering
'ocd_trace'...
Debug: 160 63 command.c:364 register_command_handler(): registering
'ocd_trace'...
Debug: 161 63 command.c:364 register_command_handler(): registering
'ocd_fast_load_image'...
Debug: 162 63 command.c:364 register_command_handler(): registering
'ocd_fast_load'...
Debug: 163 63 command.c:364 register_command_handler(): registering
'ocd_profile'...
Debug: 164 63 command.c:364 register_command_handler(): registering
'ocd_virt2phys'...
Debug: 165 63 command.c:364 register_command_handler(): registering 'ocd_reg'...
Debug: 166 63 command.c:364 register_command_handler(): registering
'ocd_poll'...
Debug: 167 63 command.c:364 register_command_handler(): registering
'ocd_wait_halt'...
Debug: 168 63 command.c:364 register_command_handler(): registering
'ocd_halt'...
Debug: 169 63 command.c:364 register_command_handler(): registering
'ocd_resume'...
Debug: 170 63 command.c:364 register_command_handler(): registering
'ocd_reset'...
Debug: 171 63 command.c:364 register_command_handler(): registering
'ocd_soft_reset_halt'...
Debug: 172 63 command.c:364 register_command_handler(): registering
'ocd_step'...
Debug: 173 63 command.c:364 register_command_handler(): registering 'ocd_mdw'...
Debug: 174 63 command.c:364 register_command_handler(): registering 'ocd_mdh'...
Debug: 175 63 command.c:364 register_command_handler(): registering 'ocd_mdb'...
Debug: 176 63 command.c:364 register_command_handler(): registering 'ocd_mww'...
Debug: 177 63 command.c:364 register_command_handler(): registering 'ocd_mwh'...
Debug: 178 63 command.c:364 register_command_handler(): registering 'ocd_mwb'...
Debug: 179 63 command.c:364 register_command_handler(): registering 'ocd_bp'...
Debug: 180 63 command.c:364 register_command_handler(): registering 'ocd_rbp'...
Debug: 181 63 command.c:364 register_command_handler(): registering 'ocd_wp'...
Debug: 182 63 command.c:364 register_command_handler(): registering 'ocd_rwp'...
Debug: 183 63 command.c:364 register_command_handler(): registering
'ocd_load_image'...
Debug: 184 63 command.c:364 register_command_handler(): registering
'ocd_dump_image'...
Debug: 185 63 command.c:364 register_command_handler(): registering
'ocd_verify_image'...
Debug: 186 63 command.c:364 register_command_handler(): registering
'ocd_test_image'...
Debug: 187 63 command.c:364 register_command_handler(): registering
'ocd_reset_nag'...
Debug: 188 125 rlink.c:1565 rlink_init(): Opened device, pHDev = 00eb3560
Debug: 189 125 rlink.c:1585 rlink_init(): interface claimed!
Error: 190 407 rlink.c:1628 rlink_init(): USB read error: libusb0-dll:err
[_usb_reap_async] timeout error
Debug: 191 407 command.c:638 run_command(): Command failed with error code -4
User : 192 407 command.c:679 command_run_line(): in procedure 'init'
Peter
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development