cancel
Showing results for 
Search instead for 
Did you mean: 

when i am debugging "Hello World" program to target board (Failed to excute mi command:load)

RNaga.4
Associate

Failed to execute MI command:

load "G:\\udemy\\embedded c\\my_workspace\\target\\001HelloWorld\\Debug\\001HelloWorld.elf"

Error message from debugger back end:

Error finishing flash operation

Failed to execute MI command:

load "G:\\udemy\\embedded c\\my_workspace\\target\\001HelloWorld\\Debug\\001HelloWorld.elf"

Error message from debugger back end:

Error finishing flash operation

Failed to execute MI command:

load "G:\\udemy\\embedded c\\my_workspace\\target\\001HelloWorld\\Debug\\001HelloWorld.elf"

Error message from debugger back end:

Error finishing flash operation

Error finishing flash operation  ""

2. here is console output    ""  STMicroelectronics ST-LINK GDB server. Version 5.8.0

Copyright (c) 2020, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    Logging Level       : 1

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Disabled

    SWD Debug         : Enabled

Waiting for debugger connection...

Debugger connected

Encountered Error when opening C:\ST\STM32CubeIDE_1.6.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.6.0.202101291314\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...  ""0693W00000FBxC8QAL.png0693W00000FBxC8QAL.png

4 REPLIES 4
KnarfB
Principal III

STM32CubeIDE is built upon Eclipse and uses gnu tools (linux like) under the hood. All path specs will be transformed between Windows style, Linux style and whatever style else. So, the golden rule is: do not use spaces, umlauts, and other "difficult" characters for the path of your project. Keep it short and use letters and digits only. I spotted a space in "embedded c" in your path. I know, such a rule sounds stupid in 2021, but...

happy programming

KnarfB

RNaga.4
Associate

I did not use spaces, umlauts and other "difficult character " for the path of my project. but still this problem occurse. please help me for this.

Hmm,

you did in the above screen dumps.

load "G:\\udemy\\embedded c\\my_workspace\\target\\001HelloWorld\\Debug\\001HelloWorld.elf

definitely containes a space char " ". If you have changed that, show the new error with its Details.

Here are some common pitfalls/suggestions:

  • change the USB cable and/or port
  • do not use a USB3 port if possible
  • do not use a USB hub, but a direct connection
  • Does the board LEDs light up/blink as expected? What board are you using?
  • try the STM32CubeProgrammer software. Can it connect to the board and read the flash?
  • Are you using a debug probe (which one?) or a board with integrated debug? What board are you using?
  • Board with on-board ST-LINK: Do you see the USB drive when you plug-in? The serial port? Like here: https://gitlab.com/stm32mcu/wiki/-/wikis/uploads/b5e0dfb1f8a2eb8ab1f86f63ee08f6f6/devmgmt.png If not: check/reinstall the ST-LINK drivers.
  • Anything special like custom board, custom power supply?
  • Try re-installing all software from scratch

hth

KnarfB

Cvan .7
Associate II

Hello,

I have exactly the same problem. Have you found a solution to this problem?

Thanks in advance.