Hi. I’m trying to get OpenOCD v0.7.0 to connect to an STM32F407Discovery on a Windows 7 box. After failing with OpenOCD 0.6 and zagad driver, I uninstalled the ST-Link driver & installed STM32 ST-Link Utility v2.4.0, which installed its driver & connects to the board just fine and displays memory. It warned of old link firmware and I updated the link firmware. It still works fine.
I’ve tried openOCD from both a cygwin & command shell.I’d welcome any pointers to what might be wrong. FYI, the free IAR toolset is installed, but not active.
Edit: ChibiStudio & OpenOCD work fine from my WinXP box - I can set breakpoints, & openocd announces it has 6 breakpoints - it all works. So now I know the STM32F4 board & USB cable are good. Something about the Win7 box is apparently preventing openocd from connecting
Thanks very much in advance
Paul
Here’s the short error log:
bash-4.1$ ./openocd-0.7.0-dev-121112115725.exe -f stm32f4discovery.cfg
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
srst_only separate srst_nogate srst_open_drain
Info : clock speed 1000 kHz
libusbx: info [cache_config_descriptors] could not access configuration descriptor (dummy) for '\\.\USB#VID_0424&PID_2514#6&7F1249
C&0&6': [31] A device attached to the system is not functioning.
libusbx: warning [init_device] could not get node connection information for device '\\.\USB#VID_0483&PID_3748#6&2BEF1459&0&4': [8
7] The parameter is incorrect.
libusbx: info [cache_config_descriptors] could not access configuration descriptor (dummy) for '\\.\USB#VID_138A&PID_003C#0030DEB9
8F89': [31] A device attached to the system is not functioning.
Error: open failed
in procedure 'transport'
in procedure 'init'
bash-4.1$ ./openocd-0.7.0-dev-121112115725.exe -v
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Here’s debug level 2
bash-4.1$ ./openocd-0.7.0-dev-121112115725.exe -f stm32f4discovery.cfg -d 2
Open On-Chip Debugger 0.7.0-dev-00079-g08ddb19 (2012-11-12-17:14)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
User : 11 13 command.c:549 command_print(): debug_level: 3
Debug: 12 31 configuration.c:45 add_script_search_dir(): adding C:/Users/bouchier/Downloads/openocd-0.7.0-dev-121112115725/openocd
-0.7.0-dev-121112115725/bin/..
Debug: 13 74 configuration.c:45 add_script_search_dir(): adding C:/Users/bouchier/Downloads/openocd-0.7.0-dev-121112115725/openocd
-0.7.0-dev-121112115725/bin/../share/openocd/scripts
Debug: 14 136 configuration.c:45 add_script_search_dir(): adding C:/Users/bouchier/Downloads/openocd-0.7.0-dev-121112115725/openoc
d-0.7.0-dev-121112115725/bin/../scripts
Debug: 15 198 configuration.c:86 find_file(): found stm32f4discovery.cfg
Debug: 16 232 configuration.c:86 find_file(): found C:/Users/bouchier/Downloads/openocd-0.7.0-dev-121112115725/openocd-0.7.0-dev-1
21112115725/bin/../scripts/interface/stlink-v2.cfg
Debug: 17 287 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface stlink
Debug: 18 312 command.c:145 script_debug(): command - interface ocd_interface stlink
Debug: 20 332 command.c:369 register_command_handler(): registering 'ocd_stlink_device_desc'...
Debug: 21 370 command.c:369 register_command_handler(): registering 'ocd_stlink_serial'...
Debug: 22 393 command.c:369 register_command_handler(): registering 'ocd_stlink_layout'...
Debug: 23 414 command.c:369 register_command_handler(): registering 'ocd_stlink_vid_pid'...
Debug: 24 437 command.c:369 register_command_handler(): registering 'ocd_stlink_api'...
Debug: 25 460 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink_layout usb
Debug: 26 493 command.c:145 script_debug(): command - stlink_layout ocd_stlink_layout usb
Debug: 29 522 stlink_interface.c:160 stlink_interface_handle_layout_command(): stlink_interface_handle_layout_command
Debug: 30 556 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink_device_desc ST-LINK/V2
Debug: 31 582 command.c:145 script_debug(): command - stlink_device_desc ocd_stlink_device_desc ST-LINK/V2
Debug: 33 610 stlink_interface.c:132 stlink_interface_handle_device_desc_command(): stlink_interface_handle_device_desc_command
Debug: 34 642 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink_vid_pid 0x0483 0x3748
Debug: 35 681 command.c:145 script_debug(): command - stlink_vid_pid ocd_stlink_vid_pid 0x0483 0x3748
Debug: 37 715 stlink_interface.c:188 stlink_interface_handle_vid_pid_command(): stlink_interface_handle_vid_pid_command
Debug: 38 747 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 1000
Debug: 39 770 command.c:145 script_debug(): command - adapter_khz ocd_adapter_khz 1000
Debug: 41 796 core.c:1625 jtag_config_khz(): handle jtag khz
Debug: 42 817 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 43 846 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 44 868 command.c:549 command_print(): adapter speed: 1000 kHz
Debug: 45 889 configuration.c:86 find_file(): found C:/Users/bouchier/Downloads/openocd-0.7.0-dev-121112115725/openocd-0.7.0-dev-1
21112115725/bin/../scripts/target/stm32f4x_stlink.cfg
Debug: 46 939 configuration.c:86 find_file(): found C:/Users/bouchier/Downloads/openocd-0.7.0-dev-121112115725/openocd-0.7.0-dev-1
21112115725/bin/../scripts/target/stm32_stlink.cfg
Debug: 47 1002 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select stlink_swd
Debug: 48 1031 command.c:145 script_debug(): command - ocd_transport ocd_transport select stlink_swd
Debug: 49 1056 stlink_transport.c:179 stlink_transport_select(): stlink_transport_select
Debug: 50 1085 command.c:369 register_command_handler(): registering 'ocd_stlink'...
Debug: 51 1110 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 52 1132 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 53 1155 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 54 1181 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 55 1214 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 56 1238 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 57 1263 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 58 1280 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 59 1302 command.c:369 register_command_handler(): registering 'ocd_jtag'...
Debug: 60 1335 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink newtap stm32f4x cpu -expected-id 0x
2ba01477
Debug: 61 1383 command.c:145 script_debug(): command - ocd_stlink ocd_stlink newtap stm32f4x cpu -expected-id 0x2ba01477
Debug: 62 1421 stlink_tcl.c:101 jim_stlink_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 2 param
s
Debug: 63 1470 stlink_tcl.c:111 jim_stlink_newtap_cmd(): Processing option: -expected-id
Debug: 64 1504 core.c:1323 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 65 1542 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target create stm32f4x.cpu stm32_stlink -c
hain-position stm32f4x.cpu
Debug: 66 1603 command.c:145 script_debug(): command - ocd_target ocd_target create stm32f4x.cpu stm32_stlink -chain-position stm3
2f4x.cpu
Debug: 67 1640 target.c:1631 target_free_all_working_areas_restore(): freeing all working areas
Debug: 68 1676 command.c:369 register_command_handler(): registering 'ocd_arm'...
Debug: 69 1703 command.c:369 register_command_handler(): registering 'ocd_arm'...
Debug: 70 1724 command.c:369 register_command_handler(): registering 'ocd_arm'...
Debug: 71 1747 command.c:369 register_command_handler(): registering 'ocd_arm'...
Debug: 72 1780 command.c:369 register_command_handler(): registering 'ocd_arm'...
Debug: 73 1801 command.c:369 register_command_handler(): registering 'ocd_arm'...
Debug: 74 1819 stm32_stlink.c:301 stm32_stlink_target_create(): stm32_stlink_target_create
Debug: 75 1848 stm32_stlink.c:274 stm32_stlink_init_arch_info(): stm32_stlink_init_arch_info
Debug: 76 1880 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 77 1906 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 78 1931 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 79 1966 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 80 2006 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 81 2029 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 82 2051 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 83 2074 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 84 2096 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 85 2116 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 86 2148 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 87 2172 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 88 2203 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 89 2225 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 90 2248 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 91 2269 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 92 2296 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 93 2325 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 94 2356 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 95 2387 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 96 2421 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 97 2449 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 98 2472 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 99 2495 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 100 2520 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 101 2552 command.c:369 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 102 2589 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -work-area-phys 0x
20000000 -work-area-size 0x10000 -work-area-backup 0
Debug: 103 2657 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -wo
rk-area-size 0x10000 -work-area-backup 0
Debug: 104 2699 target.c:1631 target_free_all_working_areas_restore(): freeing all working areas
Debug: 105 2730 target.c:1631 target_free_all_working_areas_restore(): freeing all working areas
Debug: 106 2754 target.c:1631 target_free_all_working_areas_restore(): freeing all working areas
Debug: 107 2779 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash bank stm32f4x.flash stm32f2x 0 0 0
0 stm32f4x.cpu
Debug: 108 2818 command.c:145 script_debug(): command - ocd_flash ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 109 2866 log.c:422 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (2344). This may cause trouble with G
DB connections.
Debug: 112 2918 command.c:369 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 113 2944 tcl.c:781 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 114 2971 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config srst_only srst_nogate
Debug: 115 3009 command.c:145 script_debug(): command - reset_config ocd_reset_config srst_only srst_nogate
User : 117 3043 command.c:549 command_print(): srst_only separate srst_nogate srst_open_drain
Debug: 118 3078 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 119 3113 command.c:145 script_debug(): command - init ocd_init
Debug: 121 3134 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 122 3163 command.c:145 script_debug(): command - ocd_target ocd_target init
Debug: 124 3187 target.c:1194 handle_target_init_command(): Initializing targets...
Debug: 125 3221 stm32_stlink.c:291 stm32_stlink_init_target(): stm32_stlink_init_target
Debug: 126 3248 command.c:369 register_command_handler(): registering 'ocd_target_request'...
Debug: 127 3280 command.c:369 register_command_handler(): registering 'ocd_trace'...
Debug: 128 3307 command.c:369 register_command_handler(): registering 'ocd_trace'...
Debug: 129 3334 command.c:369 register_command_handler(): registering 'ocd_fast_load_image'...
Debug: 130 3363 command.c:369 register_command_handler(): registering 'ocd_fast_load'...
Debug: 131 3385 command.c:369 register_command_handler(): registering 'ocd_profile'...
Debug: 132 3415 command.c:369 register_command_handler(): registering 'ocd_virt2phys'...
Debug: 133 3443 command.c:369 register_command_handler(): registering 'ocd_reg'...
Debug: 134 3472 command.c:369 register_command_handler(): registering 'ocd_poll'...
Debug: 135 3498 command.c:369 register_command_handler(): registering 'ocd_wait_halt'...
Debug: 136 3531 command.c:369 register_command_handler(): registering 'ocd_halt'...
Debug: 137 3558 command.c:369 register_command_handler(): registering 'ocd_resume'...
Debug: 138 3591 command.c:369 register_command_handler(): registering 'ocd_reset'...
Debug: 139 3616 command.c:369 register_command_handler(): registering 'ocd_soft_reset_halt'...
Debug: 140 3654 command.c:369 register_command_handler(): registering 'ocd_step'...
Debug: 141 3676 command.c:369 register_command_handler(): registering 'ocd_mdw'...
Debug: 142 3704 command.c:369 register_command_handler(): registering 'ocd_mdh'...
Debug: 143 3737 command.c:369 register_command_handler(): registering 'ocd_mdb'...
Debug: 144 3763 command.c:369 register_command_handler(): registering 'ocd_mww'...
Debug: 145 3785 command.c:369 register_command_handler(): registering 'ocd_mwh'...
Debug: 146 3816 command.c:369 register_command_handler(): registering 'ocd_mwb'...
Debug: 147 3847 command.c:369 register_command_handler(): registering 'ocd_bp'...
Debug: 148 3866 command.c:369 register_command_handler(): registering 'ocd_rbp'...
Debug: 149 3886 command.c:369 register_command_handler(): registering 'ocd_wp'...
Debug: 150 3906 command.c:369 register_command_handler(): registering 'ocd_rwp'...
Debug: 151 3938 command.c:369 register_command_handler(): registering 'ocd_load_image'...
Debug: 152 3964 command.c:369 register_command_handler(): registering 'ocd_dump_image'...
Debug: 153 3990 command.c:369 register_command_handler(): registering 'ocd_verify_image'...
Debug: 154 4014 command.c:369 register_command_handler(): registering 'ocd_test_image'...
Debug: 155 4043 command.c:369 register_command_handler(): registering 'ocd_reset_nag'...
Debug: 156 4074 command.c:369 register_command_handler(): registering 'ocd_ps'...
Debug: 157 4103 stlink_interface.c:91 stlink_interface_init(): stlink_interface_init
Debug: 158 4130 stlink_layout.c:88 stlink_layout_init(): stlink_layout_init
Debug: 159 4147 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 160 4177 core.c:1595 adapter_khz_to_speed(): have interface set up
Debug: 161 4198 stlink_interface.c:106 stlink_interface_speed(): stlink_interface_speed: ignore speed 1000
Debug: 162 4226 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 163 4250 core.c:1595 adapter_khz_to_speed(): have interface set up
Info : 164 4271 core.c:1399 adapter_init(): clock speed 1000 kHz
Debug: 165 4295 openocd.c:132 handle_init_command(): Debug Adapter init complete
Debug: 166 4319 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 167 4350 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 168 4373 log.c:422 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (1507). This may cause trouble with G
DB connections.
Debug: 171 4425 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 172 4445 stlink_transport.c:140 stlink_transport_init(): stlink_transport_init
Debug: 173 4466 stlink_transport.c:157 stlink_transport_init(): current transport stlink_swd
Debug: 174 4486 stlink_interface.c:41 stlink_interface_open(): stlink_interface_open
Debug: 175 4509 stlink_layout.c:43 stlink_layout_open(): stlink_layout_open
Debug: 176 4537 stlink_usb.c:1152 stlink_usb_open(): stlink_usb_open
Debug: 177 4553 stlink_usb.c:1167 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748
libusbx: info [cache_config_descriptors] could not access configuration descriptor (dummy) for '\\.\USB#VID_0424&PID_2514#6&7F1249
C&0&6': [31] A device attached to the system is not functioning.
libusbx: warning [init_device] could not get node connection information for device '\\.\USB#VID_0483&PID_3748#6&2BEF1459&0&4': [8
7] The parameter is incorrect.
libusbx: info [cache_config_descriptors] could not access configuration descriptor (dummy) for '\\.\USB#VID_138A&PID_003C#0030DEB9
8F89': [31] A device attached to the system is not functioning.
Error: 178 5175 stlink_usb.c:1170 stlink_usb_open(): open failed
Debug: 179 5196 stlink_layout.c:50 stlink_layout_open(): failed
Debug: 180 5217 command.c:631 run_command(): Command failed with error code -4
User : 181 5241 command.c:669 command_run_line(): in procedure 'transport'
Debug: 182 5261 command.c:631 run_command(): Command failed with error code -4
User : 183 5289 command.c:669 command_run_line(): in procedure 'init'
Debug: 184 5312 stlink_interface.c:99 stlink_interface_quit(): stlink_interface_quit
bash-4.1$