cancel
Showing results for 
Search instead for 
Did you mean: 

How to import existing project compiling on a server with gcc and "homemade" makefile to CubeIDE in order to evaluate the debug possibilities. How ITM is better than Serial and which features uses SWO ?

TKopp.67
Associate II

Hello everyone,

I want to ask if there is a document or video that is a guide to import a non Cube project to CubeIDE. In my case, i have a well working project which is compiled with a home made makefile and gcc on my company's server. I want to do that to evaluates the different debug features.

Btw, i am not sure that i got all the advantages of the ITM compared to just a serial wire where you comfigure only TX pins. Also which features uses really the SWO pin ? Is this all the SWV functions or only the ITM ?

Thank you for your answers,

Best Regards,

Thomas Kopp

4 REPLIES 4
KnarfB
Principal III

If its just for testing: generate a new "dummy" project for your MCU chip with default settings. Create a new debug configuration for the new project, but change the .elf file to whatever you want to debug. The IDE will build the dummy, but debug the .elf you provided.

For your other questions check the "AN4989 Application note STM32 microcontroller debug toolbox". SWO requires a debug probe, does not exist in M0, and has less impact on the debuggee.

TKopp.67
Associate II

Hello,

First thanks for the answer.

I already did the step that you recommand, but i want to evaluate how easy or hard it's to import such project and makes it compiling and working inside the IDE. That's why i wanted to know if there is a document or procedure to do it, moreover that i uses external libraries.

And thanks for the AN4989, i will check it right now.

Have a nice day,

best Regards,

Thomas

Hello,

First thanks for the answer.

I already did the step that you recommand, but i want to evaluate how easy or hard it's to import such project and makes it compiling and working inside the IDE. That's why i wanted to know if there is a document or procedure to do it, moreover that i uses external libraries.

And thanks for the AN4989, i will check it right now.

Have a nice day,

best Regards,

Thomas

TKopp.67
Associate II

Hello again,

So i finally managed easily to import my project and compile it with my own makefile and libraries. But when i am running debug i get this 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.

I knew it couldn't be that easy :D

Does anyone have an idea of what is going on ?

Regards,

Thomas