SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By Julien
#182226
Hi

I'm using nucleo F411 board. I succeed in running a led blink app with win7/64, stmWorkbench which includes openocd 0.9.
Now, I try to run the same app with the BlueNRG Shield. This have works for several days (and more than a blinking led app... !)
But today openOcd fires a Error : init mode failed. I unplugged / replug / reset / reboot the pc / upgrade STLink I always got
the same result : works without shield, fails with the shield. Even if it's a low energy device, I tried an external power supply ;
it's not better.

Here's the log:
Code: Select all
D:\tmp\test openocd>openocd.exe  -f nucleo_f411re.cfg -d3
Open On-Chip Debugger 0.9.0-dev-00101-g3a546c5 (2015-03-06-16:35)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
User : 13 3 command.c:546 command_print(): debug_level: 3
Debug: 14 6 options.c:98 add_default_dirs(): bindir=/usr/bin
Debug: 15 10 options.c:99 add_default_dirs(): pkgdatadir=/usr/share/openocd
Debug: 16 14 options.c:100 add_default_dirs(): run_prefix=D:/tmp/test openocd
Debug: 17 19 configuration.c:44 add_script_search_dir(): adding C:\Users\Ju\AppData\Roaming/OpenOCD
Debug: 18 25 configuration.c:44 add_script_search_dir(): adding D:/tmp/test openocd/usr/share/openocd/site
Debug: 19 32 configuration.c:44 add_script_search_dir(): adding D:/tmp/test openocd/usr/share/openocd/scripts
Debug: 20 42 configuration.c:84 find_file(): found nucleo_f411re.cfg
Debug: 21 47 configuration.c:84 find_file(): found stlink-v2-1.cfg
Debug: 22 51 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface hla
Debug: 23 56 command.c:145 script_debug(): command - interface ocd_interface hla
Debug: 25 61 command.c:366 register_command_handler(): registering 'ocd_hla_device_desc'...
Debug: 26 67 command.c:366 register_command_handler(): registering 'ocd_hla_serial'...
Debug: 27 72 command.c:366 register_command_handler(): registering 'ocd_hla_layout'...
Debug: 28 78 command.c:366 register_command_handler(): registering 'ocd_hla_vid_pid'...
Debug: 29 83 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 30 88 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla_layout stlink
Debug: 31 94 command.c:145 script_debug(): command - hla_layout ocd_hla_layout stlink
Debug: 33 99 hla_interface.c:176 hl_interface_handle_layout_command(): hl_interface_handle_layout_command
Debug: 34 106 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla_device_desc ST-LINK/V2-1
Debug: 35 113 command.c:145 script_debug(): command - hla_device_desc ocd_hla_device_desc ST-LINK/V2-1
Debug: 37 120 hla_interface.c:150 hl_interface_handle_device_desc_command(): hl_interface_handle_device_desc_command
Debug: 38 128 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla_vid_pid 0x0483 0x374b
Debug: 39 136 command.c:145 script_debug(): command - hla_vid_pid ocd_hla_vid_pid 0x0483 0x374b
Debug: 41 142 hla_interface.c:204 hl_interface_handle_vid_pid_command(): hl_interface_handle_vid_pid_command
Debug: 42 149 configuration.c:84 find_file(): found stm32f4x_stlink.cfg
Debug: 43 154 configuration.c:84 find_file(): found stm32_stlink.cfg
Debug: 44 158 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport select hla_swd
Debug: 45 164 command.c:145 script_debug(): command - ocd_transport ocd_transport select hla_swd
Debug: 46 171 hla_transport.c:187 hl_transport_select(): hl_transport_select
Debug: 47 175 command.c:366 register_command_handler(): registering 'ocd_hla'...
Debug: 48 180 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 49 185 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 50 190 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 51 195 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 52 200 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 53 205 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 54 209 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 55 214 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 56 219 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 57 224 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_hla newtap stm32f4x cpu -expected-id 0x2ba01477
Debug: 58 233 command.c:145 script_debug(): command - ocd_hla ocd_hla newtap stm32f4x cpu -expected-id 0x2ba01477
Debug: 59 240 hla_tcl.c:104 jim_hl_newtap_cmd(): Creating New Tap, Chip: stm32f4x, Tap: cpu, Dotted: stm32f4x.cpu, 2 params
Debug: 60 248 hla_tcl.c:114 jim_hl_newtap_cmd(): Processing option: -expected-id
Debug: 61 253 core.c:1322 jtag_tap_init(): Created Tap: stm32f4x.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 62 260 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target create stm32f4x.cpu hla_target -chain-position stm32f4x.
cpu
Debug: 63 271 command.c:145 script_debug(): command - ocd_target ocd_target create stm32f4x.cpu hla_target -chain-position stm32f4x.cpu
Debug: 64 281 target.c:1722 target_free_all_working_areas_restore(): freeing all working areas
Debug: 65 288 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 66 293 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 67 298 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 68 302 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 69 307 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 70 312 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 71 317 hla_target.c:367 adapter_target_create(): adapter_target_create
Debug: 72 322 hla_target.c:338 adapter_init_arch_info(): adapter_init_arch_info
Debug: 73 327 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 74 332 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 75 338 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 76 343 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 77 349 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 78 355 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 79 361 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 80 366 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 81 372 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 82 378 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 83 383 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 84 389 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 85 394 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 86 400 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 87 406 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 88 411 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 89 416 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 90 422 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 91 427 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 92 433 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 93 439 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 94 444 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 95 450 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 96 455 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 97 460 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 98 465 command.c:366 register_command_handler(): registering 'ocd_stm32f4x.cpu'...
Debug: 99 470 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-si
ze 0x20000 -work-area-backup 0
Debug: 100 481 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -work-area-phys 0x20000000 -work-area-size 0x20000
-work-area-backup 0
Debug: 101 492 target.c:1722 target_free_all_working_areas_restore(): freeing all working areas
Debug: 102 497 target.c:1722 target_free_all_working_areas_restore(): freeing all working areas
Debug: 103 503 target.c:1722 target_free_all_working_areas_restore(): freeing all working areas
Debug: 104 508 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 105 517 command.c:145 script_debug(): command - ocd_flash ocd_flash bank stm32f4x.flash stm32f2x 0 0 0 0 stm32f4x.cpu
Debug: 108 525 command.c:366 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 109 530 command.c:366 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 110 535 command.c:366 register_command_handler(): registering 'ocd_stm32f2x'...
Debug: 111 539 tcl.c:804 handle_flash_bank_command(): 'stm32f2x' driver usage field missing
Debug: 112 544 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config srst_only srst_nogate
Debug: 113 551 command.c:145 script_debug(): command - reset_config ocd_reset_config srst_only srst_nogate
User : 115 558 command.c:546 command_print(): srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Debug: 116 566 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 117 572 command.c:145 script_debug(): command - init ocd_init
Debug: 119 575 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 120 581 command.c:145 script_debug(): command - ocd_target ocd_target init
Debug: 122 585 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 123 591 command.c:145 script_debug(): command - ocd_target ocd_target names
Debug: 124 595 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 125 603 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu cget -event gdb-flash-erase-start
Debug: 126 611 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -event gdb-flash-erase-start reset init

Debug: 127 621 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -event gdb-flash-erase-start reset init
Debug: 128 630 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 129 638 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu cget -event gdb-flash-write-end
Debug: 130 645 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 131 655 command.c:145 script_debug(): command - ocd_stm32f4x.cpu ocd_stm32f4x.cpu configure -event gdb-flash-write-end reset halt
Debug: 132 664 target.c:1285 handle_target_init_command(): Initializing targets...
Debug: 133 668 hla_target.c:357 adapter_init_target(): adapter_init_target
Debug: 134 672 command.c:366 register_command_handler(): registering 'ocd_target_request'...
Debug: 135 677 command.c:401 register_command(): command 'trace' is already registered in '<global>' context
Debug: 136 684 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 137 688 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 138 693 command.c:366 register_command_handler(): registering 'ocd_fast_load_image'...
Debug: 139 698 command.c:366 register_command_handler(): registering 'ocd_fast_load'...
Debug: 140 703 command.c:366 register_command_handler(): registering 'ocd_profile'...
Debug: 141 708 command.c:366 register_command_handler(): registering 'ocd_virt2phys'...
Debug: 142 712 command.c:366 register_command_handler(): registering 'ocd_reg'...
Debug: 143 717 command.c:366 register_command_handler(): registering 'ocd_poll'...
Debug: 144 721 command.c:366 register_command_handler(): registering 'ocd_wait_halt'...
Debug: 145 726 command.c:366 register_command_handler(): registering 'ocd_halt'...
Debug: 146 731 command.c:366 register_command_handler(): registering 'ocd_resume'...
Debug: 147 735 command.c:366 register_command_handler(): registering 'ocd_reset'...
Debug: 148 740 command.c:366 register_command_handler(): registering 'ocd_soft_reset_halt'...
Debug: 149 745 command.c:366 register_command_handler(): registering 'ocd_step'...
Debug: 150 750 command.c:366 register_command_handler(): registering 'ocd_mdw'...
Debug: 151 754 command.c:366 register_command_handler(): registering 'ocd_mdh'...
Debug: 152 759 command.c:366 register_command_handler(): registering 'ocd_mdb'...
Debug: 153 763 command.c:366 register_command_handler(): registering 'ocd_mww'...
Debug: 154 768 command.c:366 register_command_handler(): registering 'ocd_mwh'...
Debug: 155 772 command.c:366 register_command_handler(): registering 'ocd_mwb'...
Debug: 156 777 command.c:366 register_command_handler(): registering 'ocd_bp'...
Debug: 157 781 command.c:366 register_command_handler(): registering 'ocd_rbp'...
Debug: 158 786 command.c:366 register_command_handler(): registering 'ocd_wp'...
Debug: 159 790 command.c:366 register_command_handler(): registering 'ocd_rwp'...
Debug: 160 795 command.c:366 register_command_handler(): registering 'ocd_load_image'...
Debug: 161 800 command.c:366 register_command_handler(): registering 'ocd_dump_image'...
Debug: 162 805 command.c:366 register_command_handler(): registering 'ocd_verify_image'...
Debug: 163 810 command.c:366 register_command_handler(): registering 'ocd_test_image'...
Debug: 164 816 command.c:366 register_command_handler(): registering 'ocd_reset_nag'...
Debug: 165 820 command.c:366 register_command_handler(): registering 'ocd_ps'...
Debug: 166 825 command.c:366 register_command_handler(): registering 'ocd_test_mem_access'...
Debug: 167 830 hla_interface.c:108 hl_interface_init(): hl_interface_init
Debug: 168 834 hla_layout.c:85 hl_layout_init(): hl_layout_init
Info : 169 838 core.c:1374 adapter_init(): This adapter doesn't support configurable speed
Debug: 170 842 openocd.c:132 handle_init_command(): Debug Adapter init complete
Debug: 171 847 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 172 852 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 174 857 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 175 861 hla_transport.c:148 hl_transport_init(): hl_transport_init
Debug: 176 865 hla_transport.c:165 hl_transport_init(): current transport hla_swd
Debug: 177 870 hla_interface.c:44 hl_interface_open(): hl_interface_open
Debug: 178 873 hla_layout.c:42 hl_layout_open(): hl_layout_open
Debug: 179 877 stlink_usb.c:1593 stlink_usb_open(): stlink_usb_open
Debug: 180 880 stlink_usb.c:1608 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x374b
Info : 181 932 stlink_usb.c:471 stlink_usb_version(): STLINK v2 JTAG v23 API v2 SWIM v9 VID 0x0483 PID 0x374B
Info : 182 939 stlink_usb.c:1719 stlink_usb_open(): using stlink api v2
Debug: 183 943 stlink_usb.c:653 stlink_usb_init_mode(): MODE: 0x02
Info : 184 948 stlink_usb.c:503 stlink_usb_check_voltage(): Target voltage: 3.262673
Debug: 185 952 stlink_usb.c:708 stlink_usb_init_mode(): MODE: 0x02
Debug: 186 956 stlink_usb.c:426 stlink_usb_error_check(): status error: 20 ('unknown')
Error: 187 961 stlink_usb.c:1739 stlink_usb_open(): init mode failed
Debug: 188 964 hla_layout.c:49 hl_layout_open(): failed
Debug: 189 967 command.c:628 run_command(): Command failed with error code -4
User : 190 971 command.c:666 command_run_line(): in procedure 'init'
in procedure 'ocd_bouncer'
in procedure 'transport'
Debug: 191 977 command.c:628 run_command(): Command failed with error code -4
User : 192 981 command.c:666 command_run_line(): in procedure 'init'
Debug: 193 985 hla_interface.c:116 hl_interface_quit(): hl_interface_quit

Does anybody have an idea of what may happen ?
Thanks
Julien
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]