cancel
Showing results for 
Search instead for 
Did you mean: 

Building an STM32CubeIDE project using command line prompts from a Python application

furkan-senol
Visitor

Hi,

We are developing a desktop application on Python using Qt's PySide6 library and one of our goals is to build a STM32CubeIDE project from this application. I have read that we can achieve this via command line. I can successfully run command line prompts from Python but what I wanted to ask is that should we use `stm32cubeide` from command line, which makes STM32CubeIDE is a dependency for our project, or should we use another compiler like `gcc` or `eclipse` headless builds? These options could achieve what we are trying to do but I wanted to take your opinions on this matter.

Here are some of the examples I found so far in ST Community Forum and in web:
In this link for Eclipse headless builds we can achieve the build with something like:

$ eclipse \
--launcher.suppressErrors \
-nosplash \
-application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-data /path/to/workspace \
-cleanBuild "project/configuration"

 In another post in the forum it is mentioned that we can use `stm32cubeide` from command:

<stm32CubeIde Installation path>/STM32CubeIDE_1.19.0/stm32cubeide \
--launcher.suppressErrors \
-nosplash \
-application org.eclipse.cdt.managedbuilder.core.headlessbuild \
-data "./" \
-build helloWorld

Another thought is that to use make rules of makefile generated by STM32CubeIDE:

cd <ProjectPath>/Debug
# or
cd <ProjectPath>/Release

make all


Thanks and best regards,
Furkan

2 REPLIES 2
KnarfB
Super User

If you have existing STM32CubeIDE projects or expect your users to mix using STM32CubeIDE and your Python app, STM32CubeIDE could be the right choice. Otherwise, if STM32CubeIDE servers only as an ideally invisible backend, I would not use it because it is a huge dependency to maintain.

Look into the STM32Cube for Visual Studio Code and the toolset installed by the bundle manager. Its much easier to work with (and troubleshoot) CMake or even Makefile based projects generated by STM32CubeMX or home grown.

Note also that STM aims at supporting their entire product portfolio features like dual-core, trust-zone, RTOS support, middelewares, etc.. 

hth

KnarfB

 

Pavel A.
Super User

With the CubeIDE you can do  "eclipse headless build", because CubeIDE is a kind of Eclipse. This works with "managed" Eclipse (or CubeIDE) projects and ARM toolchains installed or registered with CubeIDE. The 'headless' command file is installed with CubeIDE.

If your project is "unmanaged" (has your own makefile) then you can run `make` directly. 

As a dependency, CubeIDE is not much more complex than others - except that it comes with Java runtime.