Skip to main content
AMuth.3
Associate III
September 19, 2022
Solved

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

  • September 19, 2022
  • 1 reply
  • 2381 views

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.

This topic has been closed for replies.
Best answer by Pavel A.

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.

1 reply

Petr DAVID
ST Employee
September 20, 2022

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.

Pavel A.
Pavel A.Answer
Super User
September 20, 2022

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.

AMuth.3
AMuth.3Author
Associate III
September 22, 2022

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.:smiling_face_with_smiling_eyes: