cancel
Showing results for 
Search instead for 
Did you mean: 

Generating makefiles without STM32IDE

Claydonkey
Senior

So I've moved away from eclipse and the CubeMX IDE. 
I am using sublime as my editor and I am enjoying a great deal of success and I would recommend to anyone using cubemx to migrate to a non java based IDE/editor  - I compile the makefiles generated from CubeMX IDE and upload using STM32_Programmer_CLI directly from sublime.
Therefore, as I want to forgo eclipse (except for debugging, the build analyser, and a few nice tools within) 
My questions are:

How does CUBEMX generate the makefiles. (I assume it requires the .mxproject and or .cproject files but I would be happy to edit those myself if required)

Can I run a command/script to achieve the same end? 

If not, it appears that CUBEMX only updates the makefiles when you perform a build. Can I at least stop compilation when running Debug/Build?

Thanks for any suggestions
+ sorry for initially posting this in the wrong part of the forum

5 REPLIES 5
Peter BENSCH
ST Employee

You are confusing CubeMX and CubeIDE:

  • STM32CubeMX, which is also available as stand-alone software, only does the configuration and can then generate make files or the projects for various compilers
  • STM32CubeIDE is the complete package, which also contains the compiler, debugger, etc. in addition to CubeMX

Actually, it should be enough if you only install CubeMX and use its generated source code and e.g. the makefile - unless you don't want to use a Java-based tool at all.

Hope that helps?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks Peter. Sorry about the incorrect name of the IDE.:(
Doesn't CubeMx (not CubeIDE in this instance) only generate your first draught (from an .ioc file)?
Then any changes are handled in STM32IDE, no?
What if I am continuously change the codebase? (I don't use .ioc anymore)

Thanks for the support


@Claydonkey wrote:

Then any changes are handled in STM32IDE, no?


Depends what you mean by "changes".

If you go back to CubeMX (or the equivalent within CubeIDE), make changes there, and re-generate then that will update the existing project.

Other changes to the project, eg, adding/removing/reorganising source files) are handled by CubeIDE.

Thanks for the reply Andrew. I don't think CubeMX is the solution as I won't be generating from ioc files. As far as I can see in CubeMX, it loads projects as ioc files. So by that reckoning it generates boilerplate to get you up and running.
It seems to me that I will look at the makefiles and probably will write a cmake based on that. https://github.com/ObKo/stm32-cmake looks promising. 

Lo and behold. CubeMX can now generate CMake. But it's still "beta quality".

https://community.st.com/t5/stm32cubemx-mcus/build-a-cmake-project-generated-from-cubemx-6-11-0/td-p/662545