cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting the following error when tried to debug with STM32Cube IDE during startup.

AMuth.3
Associate II

Hi,

I get the following error when I tried to debug my custom application.

Error in final launch sequence:
 
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 126.
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 126.
During startup program exited with code 126.

What are the general possible reasons for this error, so that I can try to fix that?

Adding more details. I am using STM32F4 Discovery board.

Please reply.

1 ACCEPTED SOLUTION

Accepted Solutions

Nope, this specific issue is not mentioned there.

But a good job,@Sara BEN HADJ YAHYA​ 

IIRC the "final launch sequence" does the actual setup of the CPU context before releasing it.

Failure there can mean that the debugger cannot make sense of the two first vector table entries (initial SP, PC) or cannot read the vectors.

View solution in original post

3 REPLIES 3
Petr DAVID
ST Employee

Hello Amuth.3,

ST prepared this article regarding issues with debugging. There are listed most common problems and appropriate solutions. This article could be found here. I hope you will find it useful.

Nope, this specific issue is not mentioned there.

But a good job,@Sara BEN HADJ YAHYA​ 

IIRC the "final launch sequence" does the actual setup of the CPU context before releasing it.

Failure there can mean that the debugger cannot make sense of the two first vector table entries (initial SP, PC) or cannot read the vectors.

Hi @Pavel A.​ 

Thanks it worked. The problem was I adapted STM32L4 project to use in STM32F4 project. As it was the beginning stage I didnot ensure all the vectors to be correctly modified. I thought when I am about to use those vectors I shall correct those. But as you said in the second option that cannot read vectors, I changed all the vectors and it started running. Thanks a lot.😊