Skip to main content
BBurs.1
Associate
June 4, 2020
Question

Is it possible to clean and build a STM32CubeIDE project from the command line, e.g. from a bash script? Preferrably without GUI... You can do it with Eclipse but it doesn't seems to work for CubeIDE.

  • June 4, 2020
  • 5 replies
  • 2860 views

..

This topic has been closed for replies.

5 replies

TDK
Super User
June 4, 2020

Of course. The IDE is just calling the compiler and linker. If you call the same commands with the same environment, it'll work. Might take some work to get set up correctly.

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
Super User
June 4, 2020

Isn't there an option to generate a makefile?

JW

BBurs.1
BBurs.1Author
Associate
June 4, 2020

Well, thats my problem, the makefile is auto-generated in the Debug directory. That directory you don't want to check in to git. So if you check out the project first time, there is no makefile. First you have to open CubeMX and build the project. There is an option for Eclipse (eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\workspace -build MyProject/Debug) but it doesn't seems to work for CubeMX.

And of course, there is the option to write your own makefile as TDK suggested but I try easier options first....

alister
Senior III
June 4, 2020

Google Eclipse headless build

BBurs.1
BBurs.1Author
Associate
June 5, 2020

Forget it, I go for the makefile solution.

Thx for the replies...