Skip to main content
Associate
June 30, 2024
Solved

How do I use STM32Cube command-line toolset in Ubuntu?

I want to build my stm32cubeide code from CLI, and thought STM32CubeCLI https://www.st.com/en/development-tools/stm32cubeclt.html#documentation would be useful. However, its user manual https://www.st.com/resource/en/user_manual/um3088-stm32cube-commandline-toolset-quick-start-guide-stmicroelectronics.pdf only provides some simple examples in the case of Windows.

Does anyone know the information about the usage of STM32CubeCLI?

This topic has been closed for replies.
BarryWhit
BarryWhitBest answer
Lead
June 30, 2024

Your question was specifically about CubeIDE. But, if you do choose to go for CMake based project, and prefer CLI flows in general, be aware that there is also the (more recent) STM32 extension for VScode  which ST offers. They use CubeMX for code generation of CMake projects and VSCode as an IDE. You can certainly build CMake from command line, and you can still use CubeIDE for "debuggering". I haven't tried the extensions myself, but there are threads about them on this forum (and maybe knowledge base).

"- If someone's post helped resolve your issue, please thank them by clicking ""Accept as Solution"".- Please post an update with details once you've solved your issue. Your experience may help others."

6 replies

Pavel A.
June 30, 2024

You can build from CLI in two ways: use the "headless Eclipse CDT" command or use make or CMake. If you already have a CubeIDE project, the first method is preferred. Do you have any specific question or issue with the tools?

 

Associate
July 1, 2024

Thank you for your response!

I already have the STM32CubeIDE project and want to build the project using .project and .cproject files. Although I'm not sure how to use "headless Eclipse CDT" you suggested, is it possible to execute the build like this?

Pavel A.
July 1, 2024

Yes, it is exactly to build from command line. Just google and you'll find the details. Also read about this in the CubeIDE user manual.

BarryWhit
BarryWhitBest answer
Lead
June 30, 2024

Your question was specifically about CubeIDE. But, if you do choose to go for CMake based project, and prefer CLI flows in general, be aware that there is also the (more recent) STM32 extension for VScode  which ST offers. They use CubeMX for code generation of CMake projects and VSCode as an IDE. You can certainly build CMake from command line, and you can still use CubeIDE for "debuggering". I haven't tried the extensions myself, but there are threads about them on this forum (and maybe knowledge base).

"- If someone's post helped resolve your issue, please thank them by clicking ""Accept as Solution"".- Please post an update with details once you've solved your issue. Your experience may help others."
Associate
July 1, 2024

Thank you for your suggestion!

Actually, I don't use VScode, but I will consider it if there are no other options.