2019-09-17 03:33 PM
I am trying to debug my hardware for the first time. I was working in TrueStudio 9.3.0 as I had started this project in it before STM32CubeIDE came out. When I started to try to debug my program to day I got an error. OK, maybe I should try STM32CubeIDE instead. Loaded this up and got the project migrated with no problem. But when I go into the debugger it generates the same error and exits. I am not sure where to start to track this down. The console shows this:
STMicroelectronics ST-LINK GDB server. Version 5.2.3
Copyright (c) 2019, 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
Debugger connection lost.
Shutting down...
The detailed error message gives me this:
Error in final launch sequence:
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
Remote communication error. Target disconnected.: Success.
Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
Remote communication error. Target disconnected.: Success.
Remote communication error. Target disconnected.: Success.
I am using an ST-LINK\V2. I can download the program just fine using STM32CubeProg so I know the ST-LINK and the interface is working correctly. Where do I go next to figure this out? Thanks.
2020-03-30 04:55 AM
2020-03-31 04:32 AM
I solved my problem. Firstly, I deleted Keil IDE and then upload it again. Secondly, I downloaded necessary packs and driver. Thus , I solved problem :)
2020-05-14 05:04 AM
I am getting exactly the same problem. A program using the Nucleo-64 with STM32L073RZ gives no problems, another program, even a blank new project, with Nucleo-64 with STM32L476RG gives
"Failed to execute MI command:
target remote localhost:61234
Error message from debugger back end:
Remote communication error. Target disconnected.: Success.
Failed to execute MI command:
target remote localhost:61234"
2020-10-01 12:59 PM
I am using STM32CubeIDE 1.4.2, a Nucleo STM32F072RB, and the ST-LINK GDB server debugger.
I had a project that worked fine. I created a new project to test a weird issue I was having with the other project, and had no problems (no error, no weirdness). When I went back to the original project - I started getting this error about the .elf file. I tried everything - I spent more than half a day on the #$%^ing thing.
What ended up working for me (your results may vary) was copying the STM32F072RBTX_FLASH.ld file from the working project to the broken project. My original project never had it (I checked my git history), but for some reason when I copied it from the working project to the broken project - problem fixed.
I'm not sure whether that's THE fix, or one element in everything else. The original project had a .cfg file the new project never had, and I definitely cleared out files created by debugging to reset them. None of those on their own fixed it.
I think some setting was changed when I created the new project and it affected the original.
Good luck!
2021-03-09 07:16 AM
Erasing the whole flash using Stm32Cubeporgrammer has helped me to solve this problem
2021-06-08 07:26 AM
Hello, I hope someone had an answer to this problem since it was posted a year ago. I am currently trying to program an STEVAL-ESC001v1 board with an STLINK V2 ISOL probe. The IDE I use is the STM32CubeIDE. Before that, I used a regular STLINK V2 probe and the debugging of my program worked perfectly. Ever since I switched to the STLINK V2 ISOL (for isolation from power), I have been getting these errors on the console :
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
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Debugger connection lost.
Shutting down...
I tried using the STM32CubeProgrammer software, but It seems like the ISOL probe doesn't recognize the target :
Can anyone help me out with this issue ? Thank you very much
2021-12-13 06:49 AM
Thanks! Your first hint had solved the problem on my HW-setup (ST-Link V3 on STM32U5 board). After setting the ST-Link speed at min. (constant value, not auto), the problem did not occur, so far.
2023-12-16 07:23 AM
I too am getting the same problem.
The things I have noticed are:
1. A lot of us are getting this problem.
2. Those lucky enough to solve it did it entirely with no help from STM.
3. The solutions they found seem weird, random and all over the place with no consistent pattern.
For me, I had a perfectly healthy project with lots of files. My Windows10 PC died and I replaced it with Windows 11.
When I ran STM CubeIDE, I was forced into upgrading the project.
Details of error message "Failed to execute MI command" are next to useless:
Error in final launch sequence:
Failed to execute MI command:
load ...\\SDV1B\\Debug\\SDV1B.elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load ...\\SDV1B\\Debug\\SDV1B.elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load ...\\SDV1B\\Debug\\SDV1B.elf
Error message from debugger back end:
Error finishing flash operation
Error finishing flash operation
2023-12-16 08:47 AM
@BillE After upgrade of Windows, please check the USB connection to the board (the drivers... you know). Use the CubeProgrammer, as other people did above, or other program that works with ST-LINK. Validate that it can connect to the board and load a program.