2020-02-19 01:55 PM
2020-02-20 01:55 AM
Apparently you're including some config file(s) twice. So, what's you command line for starting openocd precisely?
2020-02-20 02:34 AM
openocd -f interface/ftdi/test-Run.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
2020-02-20 02:37 AM
inside the file test-Run.cfg
2020-02-20 02:38 AM
openocd -f interface/ftdi/test-Run.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
2020-02-20 02:46 AM
Well, test-Run.cfg already includes stm32f4x.cfg, so including this again on the command line is clearly an error.
2020-02-20 10:25 AM
I do that but the open failed
2020-02-20 01:34 PM
Please add '-d3' to command line and post the relevant part of the log (the last 10 lines before the first error including the error message should be sufficient).
2020-02-26 07:40 AM
hello, this is the output:
Debug: 265 5 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 266 5 hla_transport.c:152 hl_transport_init(): hl_transport_init
Debug: 267 5 hla_transport.c:169 hl_transport_init(): current transport hla_swd
Debug: 268 5 hla_interface.c:42 hl_interface_open(): hl_interface_open
Debug: 269 5 hla_layout.c:40 hl_layout_open(): hl_layout_open
Debug: 270 5 stlink_usb.c:1642 stlink_usb_open(): stlink_usb_open
Debug: 271 5 stlink_usb.c:1659 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x374b serial:
Error: 272 6 stlink_usb.c:1672 stlink_usb_open(): open failed
Debug: 273 6 hla_layout.c:47 hl_layout_open(): failed
Debug: 274 6 command.c:626 run_command(): Command failed with error code -4
User : 275 6 command.c:687 command_run_line(): in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 506
in procedure 'ocd_bouncer'
Debug: 276 6 command.c:626 run_command(): Command failed with error code -4
Debug: 277 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_echo ** OpenOCD init failed **
Debug: 278 6 command.c:143 script_debug(): command - echo ocd_echo ** OpenOCD init failed **
User : 280 6 command.c:762 jim_echo(): ** OpenOCD init failed **
Debug: 281 6 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_shutdown error
Debug: 282 6 command.c:143 script_debug(): command - shutdown ocd_shutdown error
User : 284 6 server.c:627 handle_shutdown_command(): shutdown command invoked
Debug: 285 6 command.c:626 run_command(): Command failed with error code -4
User : 286 6 command.c:687 command_run_line():
Debug: 287 6 hla_interface.c:117 hl_interface_quit(): hl_interface_quit
2020-02-26 08:28 AM
This line shows that the stlink is connected and (to some extent) working properly, otherwise vendor and product id wouldn't show up:
Debug: 271 5 stlink_usb.c:1659 stlink_usb_open(): transport: 1 vid: 0x0483 pid: 0x374b serial:
And this line indicates some error with the stlink:
Error: 272 6 stlink_usb.c:1672 stlink_usb_open(): open failed
The precise cause isn't clear, some possibilities that came to my mind: