cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE - import existing Eclipse project; add debug

Andrew Neil
Evangelist III

Basically the same question as here:

https://community.st.com/s/question/0D53W00000Y2lIsSAJ/cant-usecreate-debug-config-for-oss7-stack

but making it generic - hopefully reaching a wider audience.

See also:

https://community.st.com/s/question/0D53W00000ZUp9hSAD/how-to-debug-a-makefile-project-in-cubeide

As it stands, it seems that importing a "plain, vanilla" Eclipse project into STM32 Cube IDE does not give the CubeIDE the metadata it needs for its Debug Configurations (among other things?) to work - and I can't see any way to add that metadata.

Similarly for a makefile project.

So the question is: how can we import a "plain vanilla" Eclipse (or makefile) Project into CubeIDE and get the debug to work?

6 REPLIES 6
mattias norlander
ST Employee

Hi Andrew,

What you are looking to do is not possible in the current version of STM32CubeIDE...

That said your timing is pretty good.

In the upcoming release we introduce "beta support" for plain/vanilla Eclipse/CDT projects.

When I say Beta it means roughly:

  • There are still some dirty-hacks required when importing some projects to set the MCU.
  • This feature has not been thoroughly validated by us.
    • A Pro/con of being Eclipse-based is that the end-user is able to do A LOT. And we cannot validate everything. That said, we don't want to block users from useful features that adds value!

But, we consider this "new" feature to add sufficient end-user value to introduce it already now instead of delaying for a later release. Since it is beta, it will also not be documented yet in the User Guide.

I can share in this thread how this project type compares to the existing "STM32Cube" and the "Empty" projects:

  • PRO: In CubeIDE the Eclipse/CDT projects support are the only project type supporting different MCU per build configuration - allowing one project to target multiple MCUs. Means that the application life-cycle management is more convenient
  • PRO: Eclipse Marketplace provides many 3rd party plug-ins, soem of these may only work if the project is a native Eclipse/CDT project. Hence we expect that the 3rd party plug-in ecosystem works best with this project type.
  • PRO: CMake can generate Eclipse / CDT project files, it should therefore be possible to also use CMake with STM32CubeIDE. Not well tested by us, but feel free to try.
  • PRO:Some people want to use CubeMX and only generate a Makefile, not a whole STM32CubeIDE project. This use case can also be enabled with the native Eclipse/CDT projects.
  • CON: This project type is completely empty (even more empty than the "Empty" project type :-D). YOU have to add all the code you need. There is no startup code, linker script, HAL / LL / BSP / ...
  • CON: CubeMX does not support generating Eclipse/CDT vanilla projects, so if you want CubeMX to manage the resources inside the project, then in MX choose Toolchain/IDE == Makefile. And use the Makefile if you want, or add your own...

There are probably more interesting use cases that I don't have on top of my mind right now.

I guess this post only answers "what" can be done in the upcoming STM32CubeIDE 1.6.0.

It does not cover "how" to setup use case A or B... We can post a bit later on that or provide a separate Knowledge Article.

We are happy to listen to your feedback on this once you have given it a shot!

Thanks for that; all sounds very encouraging - looking forward to giving it a try!

😁

Do you have a timeframe estimate - this quarter? next quarter? next year ... ?

The project in my previous post was, indeed, created by CMake.

Current release is 1.5.1. @mattias norlander​ is discussing about 1.6.0 release.

As embedded world event ( https://www.embedded-world.de/en/become-participant?gclid=EAIaIQobChMItZfdj8nu7gIVAZ_VCh2iEQyfEAAYAiAAEgIl8PD_BwE ) is quite close to us I guess this quarter is good option 😉

Andrew Neil
Evangelist III

Cross referencing another problem with 1.5.1 importing a "plain vanilla" Eclipse (or makefile) Project:

https://community.st.com/s/question/0D53W00000aqNBiSAM/cubeide-imported-eclipse-c-project-incorrectly-defines-cplusplus

That generalised thread suggests that CubeIDE v1.6.0 should handle importing "plain vanilla" Eclipse Projects better.

This thread has an example of using CubeIDE v1.6.0: https://community.st.com/s/question/0D53W00000aqNBiSAM/cubeide-imported-eclipse-c-project-incorrectly-defines-cplusplus

Shame that the forum doesn't support linking to a specific post:

  • The post in that thread by mattias norlander (ST Employee) dated March 4, 2021 at 3:30 PM gives instructions;
  • mine dated 11 March 13:25 gives the outcome - it does, indeed, seem to work.

Actually, it only works for a makefile project - it still doesn't work for an Eclipse project.