cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Failed to execute MI command: load

I have been developing successfully with STM32CubeIDE for several years. My current project has been going ok, with lots of in-application debugging, until my latest revision. The debugger quits with the following error message:

----------------------------------

Error in final launch sequence:

Failed to execute MI command:

load C:\\Users\\feath\\OneDrive\\Documents\\Featherweight\\BlueRaven\\IDE_Workspace\\BlueRaven\\Debug\\BlueRaven.elf 

Error message from debugger back end:

You can't do that when your target is `exec'

Failed to execute MI command:

load C:\\Users\\feath\\OneDrive\\Documents\\Featherweight\\BlueRaven\\IDE_Workspace\\BlueRaven\\Debug\\BlueRaven.elf 

Error message from debugger back end:

You can't do that when your target is `exec'

Failed to execute MI command:

load C:\\Users\\feath\\OneDrive\\Documents\\Featherweight\\BlueRaven\\IDE_Workspace\\BlueRaven\\Debug\\BlueRaven.elf 

Error message from debugger back end:

You can't do that when your target is `exec'

You can't do that when your target is `exec'

--------------------------------------

I can revert to a previous revision of code, which is identical except for an unused index variable, and it debugs fine.

I have tried all combinations of unplugging/re-plugging, quits and computer restarts, and I consistently get the problem with my latest revision but not the previous rev.

I saved off the debugger log for the working case and the non-working case, and when I review them, there's nothing that jumps out at me as the problem for why the debugger gives up, but I don't know what most of the log entries mean.

Anyone have any insight?

For the moment I'm making a new branch from my previous revision and trying to work from there, but I'm afraid the same thing will pop up again.

6 REPLIES 6

Update: The second-most-recent code version has the same problem, and also going back a few versions. I basically can't use the IDE for any in-circuit debugging right now.

As another datapoint, when I run the same project from a different computer (the project is located in OneDrive), it debugs fine. Maybe I need to re-install STM32Cube_IDE?

Update: I re-installed STM32Cube_IDE, and voila, I can debug my project now. Then I had to go back and re-fix the icon size, and re-install EGIT. Unfortunately, the egit installation has not been successful. I tried uninstalling and re-installing, and I just have red x's where I should have the staging view, etc.

The problem is back again. I think I will write a support ticket.

The problem popped up again. I should have written down how I got past this in 2022.

I got past it today after numerous restarts, reboots, power cycling the STlink, changing USB ports, etc.  Several hours worth where it would work maybe 1 out of 5 tries.   Eventually it started working all the time again.    I think a common thread when this happens over the years is that I accidentally set too many breakpoints shortly before the failure starts happening.   Today a contributing factor may have been having too many USB ports open due to running a bunch of parallel STLinks on my production programming and test fixture.