I am getting a segfault running openocd. My machine is a Macbook pro retina (USB3) running Windows 7. I built opencd through cygwin.
Are there any known issues with my setup? How should I go about figuring out what’s wrong?
Dump with ‘-d 1’
$ openocd.exe -d 1 -f tcl/board/stm32f4discovery.cfg
Open On-Chip Debugger 0.6.1 (2013-10-31-11:29)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
User : 11 1 command.c:549 command_print(): debug_level: 3
Debug: 12 2 configuration.c:45 add_script_search_dir(): adding /home/Ivan/.openocd
Debug: 13 2 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/site
Debug: 14 2 configuration.c:45 add_script_search_dir(): adding /usr/local/share/openocd/scripts
Debug: 15 2 configuration.c:86 find_file(): found tcl/board/stm32f4discovery.cfg
Debug: 16 2 configuration.c:86 find_file(): found /usr/local/share/openocd/scripts/interface/stlink-v2.cfg
Debug: 17 2 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface stlink
Debug: 18 2 command.c:145 script_debug(): command - interface ocd_interface stlink
Debug: 20 2 command.c:369 register_command_handler(): registering ‘ocd_stlink_device_desc’…
Debug: 21 2 command.c:369 register_command_handler(): registering ‘ocd_stlink_serial’…
Debug: 22 2 command.c:369 register_command_handler(): registering ‘ocd_stlink_layout’…
Debug: 23 2 command.c:369 register_command_handler(): registering ‘ocd_stlink_vid_pid’…
Debug: 24 2 command.c:369 register_command_handler(): registering ‘ocd_stlink_api’…
Debug: 25 3 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink_layout usb
Debug: 26 3 command.c:145 script_debug(): command - stlink_layout ocd_stlink_layout usb
Debug: 28 3 stlink_interface.c:160 stlink_interface_handle_layout_command(): stlink_interface_handle_layout_command
Debug: 29 3 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink_device_desc ST-LINK/V2
Debug: 30 3 command.c:145 script_debug(): command - stlink_device_desc ocd_stlink_device_desc ST-LINK/V2
Debug: 32 3 stlink_interface.c:132 stlink_interface_handle_device_desc_command(): stlink_interface_handle_device_desc_command
Debug: 33 3 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink_vid_pid 0x0483 0x3748
Debug: 34 3 command.c:145 script_debug(): command - stlink_vid_pid ocd_stlink_vid_pid 0x0483 0x3748
Debug: 36 3 stlink_interface.c:188 stlink_interface_handle_vid_pid_command(): stlink_interface_handle_vid_pid_command
Debug: 37 3 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 1000
Debug: 38 3 command.c:145 script_debug(): command - adapter_khz ocd_adapter_khz 1000
Debug: 40 3 core.c:1625 jtag_config_khz(): handle jtag khz
Debug: 41 3 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 42 3 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 43 3 command.c:549 command_print(): adapter speed: 1000 kHz
Debug: 44 3 configuration.c:86 find_file(): found /usr/local/share/openocd/scripts/target/stm32f4x_stlink.cfg
Debug: 45 4 configuration.c:86 find_file(): found /usr/local/share/openocd/scripts/target/stm32_stlink.cfg
Debug: 46 4 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select stlink_swd
Debug: 47 4 command.c:145 script_debug(): command - ocd_transport ocd_transport select stlink_swd
Debug: 48 4 stlink_transport.c:179 stlink_transport_select(): stlink_transport_select
Debug: 49 4 command.c:369 register_command_handler(): registering ‘ocd_stlink’…
Debug: 50 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 51 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 52 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 53 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 54 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 55 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 56 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 57 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 58 4 command.c:369 register_command_handler(): registering ‘ocd_jtag’…
Debug: 59 4 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stlink newtap stm32f4x cpu -expected-id 0x2ba01477
Debug: 60 4 command.c:145 script_debug(): command - ocd_stlink ocd_stlink newtap stm32f4x cpu -expected-id 0x2ba01477
Debug: 61 4 stlink_tcl.c:101 jim_stlink_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 2 params
Debug: 62 4 stlink_tcl.c:111 jim_stlink_newtap_cmd(): Processing option: -expected-id
Debug: 63 5 core.c:1323 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 64 5 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target create stm32f4x.cpu stm32_stlink -chain-position stm32f4x.cpu
Debug: 65 5 command.c:145 script_debug(): command - ocd_target ocd_target create stm32f4x.cpu stm32_stlink -chain-position stm32f4x.cpu
Debug: 66 5 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas
Debug: 67 5 command.c:369 register_command_handler(): registering ‘ocd_arm’…
Debug: 68 5 command.c:369 register_command_handler(): registering ‘ocd_arm’…
Debug: 69 5 command.c:369 register_command_handler(): registering ‘ocd_arm’…
Debug: 70 5 command.c:369 register_command_handler(): registering ‘ocd_arm’…
Debug: 71 5 command.c:369 register_command_handler(): registering ‘ocd_arm’…
Debug: 72 5 command.c:369 register_command_handler(): registering ‘ocd_arm’…
Debug: 73 5 stm32_stlink.c:301 stm32_stlink_target_create(): stm32_stlink_target_create
Debug: 74 5 stm32_stlink.c:274 stm32_stlink_init_arch_info(): stm32_stlink_init_arch_info
Debug: 75 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 76 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 77 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 78 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 79 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 80 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 81 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 82 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 83 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 84 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 85 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 86 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 87 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 88 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 89 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 90 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 91 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 92 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 93 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 94 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 95 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 96 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 97 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 98 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 99 5 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 100 6 command.c:369 register_command_handler(): registering ‘ocd_stm32f4x.cpu’…
Debug: 101 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x10000 -work-area-backup 0
Debug: 102 6 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x10000 -work-area-backup 0
Debug: 103 6 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas
Debug: 104 6 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas
Debug: 105 6 target.c:1620 target_free_all_working_areas_restore(): freeing all working areas
Debug: 106 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 107 6 command.c:145 script_debug(): command - ocd_flash ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 109 6 command.c:369 register_command_handler(): registering ‘ocd_stm32f2x’…
Debug: 110 6 tcl.c:781 handle_flash_bank_command(): ‘stm32f2x’ driver usage field missing
Debug: 111 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config srst_only srst_nogate
Debug: 112 6 command.c:145 script_debug(): command - reset_config ocd_reset_config srst_only srst_nogate
User : 114 6 command.c:549 command_print(): srst_only separate srst_nogate srst_open_drain
Debug: 115 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 116 9 command.c:145 script_debug(): command - init ocd_init
Debug: 118 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 119 9 command.c:145 script_debug(): command - ocd_target ocd_target init
Debug: 121 9 target.c:1183 handle_target_init_command(): Initializing targets…
Debug: 122 9 stm32_stlink.c:291 stm32_stlink_init_target(): stm32_stlink_init_target
Debug: 123 9 command.c:369 register_command_handler(): registering ‘ocd_target_request’…
Debug: 124 9 command.c:369 register_command_handler(): registering ‘ocd_trace’…
Debug: 125 9 command.c:369 register_command_handler(): registering ‘ocd_trace’…
Debug: 126 9 command.c:369 register_command_handler(): registering ‘ocd_fast_load_image’…
Debug: 127 9 command.c:369 register_command_handler(): registering ‘ocd_fast_load’…
Debug: 128 9 command.c:369 register_command_handler(): registering ‘ocd_profile’…
Debug: 129 9 command.c:369 register_command_handler(): registering ‘ocd_virt2phys’…
Debug: 130 9 command.c:369 register_command_handler(): registering ‘ocd_reg’…
Debug: 131 10 command.c:369 register_command_handler(): registering ‘ocd_poll’…
Debug: 132 10 command.c:369 register_command_handler(): registering ‘ocd_wait_halt’…
Debug: 133 10 command.c:369 register_command_handler(): registering ‘ocd_halt’…
Debug: 134 10 command.c:369 register_command_handler(): registering ‘ocd_resume’…
Debug: 135 10 command.c:369 register_command_handler(): registering ‘ocd_reset’…
Debug: 136 10 command.c:369 register_command_handler(): registering ‘ocd_soft_reset_halt’…
Debug: 137 10 command.c:369 register_command_handler(): registering ‘ocd_step’…
Debug: 138 10 command.c:369 register_command_handler(): registering ‘ocd_mdw’…
Debug: 139 10 command.c:369 register_command_handler(): registering ‘ocd_mdh’…
Debug: 140 10 command.c:369 register_command_handler(): registering ‘ocd_mdb’…
Debug: 141 10 command.c:369 register_command_handler(): registering ‘ocd_mww’…
Debug: 142 10 command.c:369 register_command_handler(): registering ‘ocd_mwh’…
Debug: 143 10 command.c:369 register_command_handler(): registering ‘ocd_mwb’…
Debug: 144 10 command.c:369 register_command_handler(): registering ‘ocd_bp’…
Debug: 145 10 command.c:369 register_command_handler(): registering ‘ocd_rbp’…
Debug: 146 10 command.c:369 register_command_handler(): registering ‘ocd_wp’…
Debug: 147 10 command.c:369 register_command_handler(): registering ‘ocd_rwp’…
Debug: 148 10 command.c:369 register_command_handler(): registering ‘ocd_load_image’…
Debug: 149 10 command.c:369 register_command_handler(): registering ‘ocd_dump_image’…
Debug: 150 10 command.c:369 register_command_handler(): registering ‘ocd_verify_image’…
Debug: 151 10 command.c:369 register_command_handler(): registering ‘ocd_test_image’…
Debug: 152 10 command.c:369 register_command_handler(): registering ‘ocd_reset_nag’…
Debug: 153 10 command.c:369 register_command_handler(): registering ‘ocd_ps’…
Debug: 154 10 stlink_interface.c:91 stlink_interface_init(): stlink_interface_init
Debug: 155 10 stlink_layout.c:88 stlink_layout_init(): stlink_layout_init
Debug: 156 11 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 157 11 core.c:1595 adapter_khz_to_speed(): have interface set up
Debug: 158 11 stlink_interface.c:106 stlink_interface_speed(): stlink_interface_speed: ignore speed 1000
Debug: 159 11 core.c:1592 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 160 11 core.c:1595 adapter_khz_to_speed(): have interface set up
Info : 161 11 core.c:1399 adapter_init(): clock speed 1000 kHz
Debug: 162 11 openocd.c:132 handle_init_command(): Debug Adapter init complete
Debug: 163 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 164 11 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 166 11 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 167 11 stlink_transport.c:140 stlink_transport_init(): stlink_transport_init
Debug: 168 11 stlink_transport.c:157 stlink_transport_init(): current transport stlink_swd
Debug: 169 11 stlink_interface.c:41 stlink_interface_open(): stlink_interface_open
Debug: 170 11 stlink_layout.c:43 stlink_layout_open(): stlink_layout_open
Debug: 171 11 stlink_usb.c:1152 stlink_usb_open(): stlink_usb_open
Debug: 172 11 stlink_usb.c:1167 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748
libusb:warning [windows_get_device_list] ‘\.\USB#VID_0483&PID_3748#7&A6B7FD5&0&2’ was only detected in late pass (newly connected device?) - ignoring
libusb:warning [windows_get_device_list] ‘\.\USB#VID_04E8&PID_3313#Z6EKBKABA00690F.’ was only detected in late pass (newly connected device?) - ignoring
libusb:warning [windows_get_device_list] ‘\.\USB#VID_09AE&PID_0002#7&A6B7FD5&0&3’ was only detected in late pass (newly connected device?) - ignoring
libusb:warning [windows_get_device_list] ‘\.\USB#VID_17E9&PID_410D#6&6599BB&0&2’ was only detected in late pass (newly connected device?) - ignoring
libusb:warning [windows_get_device_list] ‘\.\USB#VID_1A7C&PID_0068#6&6599BB&0&4’ was only detected in late pass (newly connected device?) - ignoring
Segmentation fault (core dumped)