Skip to main content
TKopp.67
Associate III
January 21, 2021
Question

What is the good way to import an STM32 project that compiles on a server which uses a makefile and no IDE into STM32CubeIDE in order to debug it.

  • January 21, 2021
  • 2 replies
  • 1087 views

Hello everyone,

I want to debug an existing application (STM32F405) of my company which has been coded without IDE (so just makefile and gcc on our server) and using the stlink to flash.

I imported this project with the option "makefile project" on the CubeIDE and with small changes i made it compile. However i can't run debug and i get that error :

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.

Also i get an error which talks about mcu target not configured in build configuration but i don't see where i should select the target.

Anyway did someone dealed with that issue and fixed it ? I believed IF it's possible that i have to configure the build / debug configuration or sth else but i can't figure out what is exactly the problem.

Thanks in advance for your asnwer.

Best Regards,

Thomas

This topic has been closed for replies.

2 replies

KnarfB
Super User
January 21, 2021

Think that the "makefile project" is for native projects running on the host, not cross-debugging.

TKopp.67
TKopp.67Author
Associate III
January 21, 2021

Yeah thanks for the answer this is what i assumed after i got my error messages :grinning_face_with_sweat: but so what is the good way to do that ?

TKopp.67
TKopp.67Author
Associate III
January 21, 2021

In fact my question could be : how to convert an externally build project into an STM32CUBE project ?

TKopp.67
TKopp.67Author
Associate III
January 21, 2021

Now i succeeded ton compile it and start debugging session but can't add or edit my code while debugging (for example for live expression).