cancel
Showing results for 
Search instead for 
Did you mean: 

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.

TKopp.67
Associate II

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

4 REPLIES 4
KnarfB
Principal III

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

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

TKopp.67
Associate II

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

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).