AnsweredAssumed Answered

STM32F4Discovery can't Connect to Target

Question asked by Twinkle Berry on Aug 5, 2015
Latest reply on Aug 6, 2015 by Clive One
I have trouble uploading firmware with openocd to a motor controller called VESC (open source) containing the stm32f405rgt6 chip using the discovery board for the st-link/v2. In the past, I have uploaded firmware with no problems with openocd-0.7.0 since works fine until I had the connection issue to VESC. I am currently using Openocd-0.10.0-dev. All of this takes place in linux. On window's, stm32f4Discovery board works fine, but can't connect to VESC over SWD. 



ybmatt@ubuntu:~/BLDC/bldc-firmware$ openocd -f interface/stlink-v2.cfg -c "set WORKAREASIZE 0x2000" -f target/stm32f4x_stlink.cfg -c "program build/BLDC_4_ChibiOS.elf verify reset" -d3
Open On-Chip Debugger 0.10.0-dev-00002-g79fdeb3 (2015-08-05-08:57)
Licensed under GNU GPL v2
For bug reports, read
User : 13 3 command.c:546 command_print(): debug_level: 3
Debug: 14 3 options.c:98 add_default_dirs(): bindir=/bin
Debug: 15 3 options.c:99 add_default_dirs(): pkgdatadir=/share/openocd
Debug: 16 3 options.c:100 add_default_dirs(): run_prefix=
Debug: 17 3 configuration.c:44 add_script_search_dir(): adding /home/ybmatt/.openocd
Debug: 18 3 configuration.c:44 add_script_search_dir(): adding /share/openocd/site
Debug: 19 3 configuration.c:44 add_script_search_dir(): adding /share/openocd/scripts
Debug: 20 3 configuration.c:84 find_file(): found /share/openocd/scripts/interface/stlink-v2.cfg
Debug: 21 4 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface hla
Debug: 22 4 command.c:145 script_debug(): command - interface ocd_interface hla
Debug: 24 4 command.c:366 register_command_handler(): registering 'ocd_hla_device_desc'...
Debug: 25 4 command.c:366 register_command_handler(): registering 'ocd_hla_serial'...
Debug: 26 4 command.c:366 register_command_handler(): registering 'ocd_hla_layout'...
Debug: 27 4 command.c:366 register_command_handler(): registering 'ocd_hla_vid_pid'...
Debug: 28 4 command.c:366 register_command_handler(): registering 'ocd_hla_command'...
Debug: 29 4 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla_layout stlink
Debug: 30 4 command.c:145 script_debug(): command - hla_layout ocd_hla_layout stlink
Debug: 32 4 hla_interface.c:241 hl_interface_handle_layout_command(): hl_interface_handle_layout_command
Debug: 33 4 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla_device_desc ST-LINK/V2
Debug: 34 4 command.c:145 script_debug(): command - hla_device_desc ocd_hla_device_desc ST-LINK/V2
Debug: 36 4 hla_interface.c:215 hl_interface_handle_device_desc_command(): hl_interface_handle_device_desc_command
Debug: 37 4 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla_vid_pid 0x0483 0x3748
Debug: 38 4 command.c:145 script_debug(): command - hla_vid_pid ocd_hla_vid_pid 0x0483 0x3748
Debug: 40 4 hla_interface.c:269 hl_interface_handle_vid_pid_command(): hl_interface_handle_vid_pid_command
User : 41 4 command.c:677 command_run_line(): 0x2000User : 42 4 command.c:679 command_run_line():
Debug: 43 4 configuration.c:84 find_file(): found /share/openocd/scripts/target/stm32f4x_stlink.cfg
Debug: 44 5 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_echo WARNING: target/stm32f4x_stlink.cfg is deprecated, please switch to target/stm32f4x.cfg
Debug: 45 5 command.c:145 script_debug(): command - echo ocd_echo WARNING: target/stm32f4x_stlink.cfg is deprecated, please switch to target/stm32f4x.cfg
User : 47 5 command.c:764 jim_echo(): WARNING: target/stm32f4x_stlink.cfg is deprecated, please switch to target/stm32f4x.cfg
Debug: 48 5 configuration.c:84 find_file(): found /share/openocd/scripts/target/stm32f4x.cfg
Debug: 49 5 configuration.c:84 find_file(): found /share/openocd/scripts/target/swj-dp.tcl
Debug: 50 5 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 51 5 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Info : 52 5 transport.c:287 jim_transport_select(): auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Debug: 53 5 hla_transport.c:193 hl_transport_select(): hl_transport_select
Debug: 54 5 command.c:366 register_command_handler(): registering 'ocd_hla'...
Debug: 55 5 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 56 5 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 57 5 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 58 5 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 59 6 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 60 6 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 61 6 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 62 6 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 63 6 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 64 6 command.c:366 register_command_handler(): registering 'ocd_jtag_ntrst_delay'...
Debug: 65 6 configuration.c:84 find_file(): found /share/openocd/scripts/mem_helper.tcl
Debug: 66 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_add_usage_text mrw address
Debug: 67 6 command.c:145 script_debug(): command - add_usage_text ocd_add_usage_text mrw address
Debug: 69 6 command.c:1100 help_add_command(): added 'mrw' help text
Debug: 70 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_add_help_text mrw Returns value of word in memory.
Debug: 71 6 command.c:145 script_debug(): command - add_help_text ocd_add_help_text mrw Returns value of word in memory.
Debug: 73 6 command.c:1113 help_add_command(): added 'mrw' help text
Debug: 74 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_add_usage_text mmw address setbits clearbits
Debug: 75 6 command.c:145 script_debug(): command - add_usage_text ocd_add_usage_text mmw address setbits clearbits
Debug: 77 6 command.c:1100 help_add_command(): added 'mmw' help text
Debug: 78 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 79 6 command.c:145 script_debug(): command - add_help_text ocd_add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 81 6 command.c:1113 help_add_command(): added 'mmw' help text
Debug: 82 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 83 6 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 84 7 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 85 7 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 86 7 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 87 7 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 88 7 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 89 7 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 90 7 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla newtap stm32f4x cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x2ba01477
Debug: 91 7 command.c:145 script_debug(): command - ocd_hla ocd_hla newtap stm32f4x cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x2ba01477
Debug: 92 7 hla_tcl.c:116 jim_hl_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 8 params
Debug: 93 7 hla_tcl.c:126 jim_hl_newtap_cmd(): Processing option: -irlen
Debug: 94 7 hla_tcl.c:126 jim_hl_newtap_cmd(): Processing option: -ircapture
Debug: 95 7 hla_tcl.c:126 jim_hl_newtap_cmd(): Processing option: -irmask
Debug: 96 7 hla_tcl.c:126 jim_hl_newtap_cmd(): Processing option: -expected-id
Debug: 97 7 core.c:1302 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 98 7 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 99 7 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 100 7 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target create stm32f4x.cpu cortex_m -endian little -chain-position stm32f4x.cpu
Debug: 101 7 command.c:145 script_debug(): command - ocd_target ocd_target create stm32f4x.cpu cortex_m -endian little -chain-position stm32f4x.cpu
Info : 102 7 target.c:5178 target_create(): The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Debug: 103 7 target.c:1837 target_free_all_working_areas_restore(): freeing all working areas
Debug: 104 7 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 105 7 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 106 7 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 107 8 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 108 8 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 109 8 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 110 8 command.c:366 register_command_handler(): registering 'ocd_tpiu'...
Debug: 111 8 command.c:366 register_command_handler(): registering 'ocd_itm'...
Debug: 112 8 command.c:366 register_command_handler(): registering 'ocd_itm'...
Debug: 113 8 hla_target.c:353 adapter_target_create(): adapter_target_create
Debug: 114 8 hla_target.c:324 adapter_init_arch_info(): adapter_init_arch_info
Debug: 115 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 116 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 117 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 118 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 119 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 120 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 121 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 122 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 123 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 124 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 125 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 126 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 127 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 128 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 129 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 130 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 131 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 132 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 133 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 134 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 135 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 136 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 137 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 138 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 139 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 140 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 141 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 142 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 143 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 144 8 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 145 9 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 146 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x2000 -work-area-backup 0
Debug: 147 9 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x2000 -work-area-backup 0
Debug: 148 9 target.c:1837 target_free_all_working_areas_restore(): freeing all working areas
Debug: 149 9 target.c:1837 target_free_all_working_areas_restore(): freeing all working areas
Debug: 150 9 target.c:1837 target_free_all_working_areas_restore(): freeing all working areas
Debug: 151 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 152 9 command.c:145 script_debug(): command - ocd_flash ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 154 9 command.c:366 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 155 9 command.c:366 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 156 9 command.c:366 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 157 9 tcl.c:824 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 158 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 2000
Debug: 159 9 command.c:145 script_debug(): command - adapter_khz ocd_adapter_khz 2000
Debug: 161 9 core.c:1629 jtag_config_khz(): handle jtag khz
Debug: 162 9 core.c:1596 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 163 9 core.c:1596 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 164 9 command.c:546 command_print(): adapter speed: 2000 kHz
Debug: 165 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_adapter_nsrst_delay 100
Debug: 166 9 command.c:145 script_debug(): command - adapter_nsrst_delay ocd_adapter_nsrst_delay 100
User : 168 9 command.c:546 command_print(): adapter_nsrst_delay: 100
Debug: 169 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 170 9 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 171 9 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config srst_nogate
Debug: 172 10 command.c:145 script_debug(): command - reset_config ocd_reset_config srst_nogate
User : 174 10 command.c:546 command_print(): none separate
Debug: 175 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select
Debug: 176 10 command.c:145 script_debug(): command - ocd_transport ocd_transport select
Debug: 177 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -event examine-end
    # DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
    mmw 0xE0042004 0x00000007 0
 
    # Stop watchdog counters during halt
    # DBGMCU_APB1_FZ = DBG_IWDG_STOP | DBG_WWDG_STOP
    mww 0xE0042008 0x00001800
 
Debug: 178 10 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -event examine-end
    # DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
    mmw 0xE0042004 0x00000007 0
 
    # Stop watchdog counters during halt
    # DBGMCU_APB1_FZ = DBG_IWDG_STOP | DBG_WWDG_STOP
    mww 0xE0042008 0x00001800
 
Debug: 179 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -event trace-config
    # Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
    # change this value accordingly to configure trace pins
    # assignment
    mmw 0xE0042004 0x00000020 0
 
Debug: 180 10 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -event trace-config
    # Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
    # change this value accordingly to configure trace pins
    # assignment
    mmw 0xE0042004 0x00000020 0
 
Debug: 181 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 182 10 command.c:145 script_debug(): command - init ocd_init
Debug: 184 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 185 10 command.c:145 script_debug(): command - ocd_target ocd_target init
Debug: 187 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 188 10 command.c:145 script_debug(): command - ocd_target ocd_target names
Debug: 189 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 190 11 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 191 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -event gdb-flash-erase-start reset init
Debug: 192 11 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -event gdb-flash-erase-start reset init
Debug: 193 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 194 11 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 195 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 196 11 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 197 11 target.c:1313 handle_target_init_command(): Initializing targets...
Debug: 198 11 hla_target.c:343 adapter_init_target(): adapter_init_target
Debug: 199 11 command.c:366 register_command_handler(): registering 'ocd_target_request'...
Debug: 200 11 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 201 11 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 202 11 command.c:366 register_command_handler(): registering 'ocd_fast_load_image'...
Debug: 203 11 command.c:366 register_command_handler(): registering 'ocd_fast_load'...
Debug: 204 11 command.c:366 register_command_handler(): registering 'ocd_profile'...
Debug: 205 11 command.c:366 register_command_handler(): registering 'ocd_virt2phys'...
Debug: 206 11 command.c:366 register_command_handler(): registering 'ocd_reg'...
Debug: 207 11 command.c:366 register_command_handler(): registering 'ocd_poll'...
Debug: 208 11 command.c:366 register_command_handler(): registering 'ocd_wait_halt'...
Debug: 209 11 command.c:366 register_command_handler(): registering 'ocd_halt'...
Debug: 210 11 command.c:366 register_command_handler(): registering 'ocd_resume'...
Debug: 211 11 command.c:366 register_command_handler(): registering 'ocd_reset'...
Debug: 212 11 command.c:366 register_command_handler(): registering 'ocd_soft_reset_halt'...
Debug: 213 11 command.c:366 register_command_handler(): registering 'ocd_step'...
Debug: 214 11 command.c:366 register_command_handler(): registering 'ocd_mdw'...
Debug: 215 11 command.c:366 register_command_handler(): registering 'ocd_mdh'...
Debug: 216 11 command.c:366 register_command_handler(): registering 'ocd_mdb'...
Debug: 217 12 command.c:366 register_command_handler(): registering 'ocd_mww'...
Debug: 218 12 command.c:366 register_command_handler(): registering 'ocd_mwh'...
Debug: 219 12 command.c:366 register_command_handler(): registering 'ocd_mwb'...
Debug: 220 12 command.c:366 register_command_handler(): registering 'ocd_bp'...
Debug: 221 12 command.c:366 register_command_handler(): registering 'ocd_rbp'...
Debug: 222 12 command.c:366 register_command_handler(): registering 'ocd_wp'...
Debug: 223 12 command.c:366 register_command_handler(): registering 'ocd_rwp'...
Debug: 224 12 command.c:366 register_command_handler(): registering 'ocd_load_image'...
Debug: 225 12 command.c:366 register_command_handler(): registering 'ocd_dump_image'...
Debug: 226 12 command.c:366 register_command_handler(): registering 'ocd_verify_image'...
Debug: 227 12 command.c:366 register_command_handler(): registering 'ocd_test_image'...
Debug: 228 12 command.c:366 register_command_handler(): registering 'ocd_reset_nag'...
Debug: 229 12 command.c:366 register_command_handler(): registering 'ocd_ps'...
Debug: 230 12 command.c:366 register_command_handler(): registering 'ocd_test_mem_access'...
Debug: 231 12 hla_interface.c:111 hl_interface_init(): hl_interface_init
Debug: 232 12 hla_layout.c:85 hl_layout_init(): hl_layout_init
Debug: 233 12 core.c:1596 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 234 12 core.c:1599 adapter_khz_to_speed(): have interface set up
Info : 235 12 stlink_usb.c:1568 stlink_speed(): Unable to match requested speed 2000 kHz, using 1800 kHz
Debug: 236 12 core.c:1596 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 237 12 core.c:1599 adapter_khz_to_speed(): have interface set up
Info : 238 12 stlink_usb.c:1568 stlink_speed(): Unable to match requested speed 2000 kHz, using 1800 kHz
Info : 239 12 core.c:1384 adapter_init(): clock speed 1800 kHz
Debug: 240 12 openocd.c:137 handle_init_command(): Debug Adapter init complete
Debug: 241 12 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 242 12 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 244 12 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 245 12 hla_transport.c:154 hl_transport_init(): hl_transport_init
Debug: 246 12 hla_transport.c:171 hl_transport_init(): current transport hla_swd
Debug: 247 12 hla_interface.c:44 hl_interface_open(): hl_interface_open
Debug: 248 12 hla_layout.c:42 hl_layout_open(): hl_layout_open
Debug: 249 12 stlink_usb.c:1602 stlink_usb_open(): stlink_usb_open
Debug: 250 12 stlink_usb.c:1619 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x3748 serial:
Info : 251 18 stlink_usb.c:523 stlink_usb_version(): STLINK v2 JTAG v24 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : 252 18 stlink_usb.c:1730 stlink_usb_open(): using stlink api v2
Debug: 253 20 stlink_usb.c:722 stlink_usb_init_mode(): MODE: 0x02
Info : 254 25 stlink_usb.c:555 stlink_usb_check_voltage(): Target voltage: 2.873518
Debug: 255 25 stlink_usb.c:777 stlink_usb_init_mode(): MODE: 0x01
Debug: 256 27 stlink_usb.c:402 stlink_usb_error_check(): unknown/unexpected STLINK status code 0x9
Error: 257 27 stlink_usb.c:1739 stlink_usb_open(): init mode failed (unable to connect to the target)
Debug: 258 27 hla_layout.c:49 hl_layout_open(): failed
Debug: 259 27 command.c:628 run_command(): Command failed with error code -4
User : 260 27 command.c:689 command_run_line(): in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 473
in procedure 'ocd_bouncer'
Debug: 261 28 command.c:628 run_command(): Command failed with error code -4
Debug: 262 28 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_echo ** OpenOCD init failed **
Debug: 263 28 command.c:145 script_debug(): command - echo ocd_echo ** OpenOCD init failed **
User : 265 28 command.c:764 jim_echo(): ** OpenOCD init failed **
Debug: 266 28 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_shutdown error
Debug: 267 28 command.c:145 script_debug(): command - shutdown ocd_shutdown error
User : 269 28 server.c:608 handle_shutdown_command(): shutdown command invoked
Debug: 270 28 command.c:628 run_command(): Command failed with error code -4
User : 271 28 command.c:689 command_run_line():
Debug: 272 28 hla_interface.c:119 hl_interface_quit(): hl_interface_quit
ybmatt@ubuntu:~/BLDC/bldc-firmware$

Outcomes