Skip to main content
Associate
April 16, 2025
Question

ST-LINK: "Failed to execute MI command" & "Error in initializing ST-LINK device

  • April 16, 2025
  • 3 replies
  • 963 views

We are using STM32CubeIDE to configure the STM32 controller. Previously, flashing the code to the board was working fine. Recently, while trying to debug, the IDE started showing this error: "Failed to execute MI command""Error in initializing ST-LINK device" We tried upgrading the ST-LINK driver, and the controller responded to the host. In STM32 ST-LINK Utility, we could select the External Loader, which means the connection seemed okay.However, when we tried to erase the flash using ST-LINK Utility, we got:
"Target not connected" We tried many solutions in STM32CubeIDE, but we could not identify the root cause. Could anyone please help us understand what might be going wrong?

3 replies

Peter BENSCH
Technical Moderator
April 16, 2025

Welcome @Naveen12, to the community!

Please add photos of the front and back of your ST-LINK here.

Regards
/Peter

Naveen12Author
Associate
April 16, 2025

image.pngimage (1).pngScreenshot 2025-04-16 181820.png

Mike_ST
Technical Moderator
April 16, 2025

Hello,

Please use STM32Cubeprogrammer, ST-Link utility is deprecated:

STM32CubeProgrammer 

The error message "No device found on target" indicates that the STM32H7 is probably not powered, or is in a state where it can't be accessed.

Please download the User Manual , and check the jumpers and solder bridges configuration.

 

Andrew Neil
Super User
April 16, 2025
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
April 16, 2025

@Naveen12 wrote:

 Recently, while trying to debug, the IDE started showing this error: 


So what did you change immediately before that started happening?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.