cancel
Showing results for 
Search instead for 
Did you mean: 

Running STM32CubeMX without GUI

ANath.1
Associate III

Hi All,
I am trying to setup a build pipeline for the STM32 platform to be able to compile projects in an automated fashion. So far, I have an .ioc file which I use the to generate the project using the STM32CubeMX commands which are invoked via the script in the cli mode. The flow works on an Ubuntu machine which supports GUI. However, when I try to containerize the flow into a docker container, the build breaks as the STM32CubeMX tries to render a progress bar for the Loading IOC step followed by a Rendering UI progress bar. It is not possible to load display components on the docker and hence STM32CubeMX code generation fails. Is there any way to launch STM32CubeMX in a headless non-gui mode so that we can run this on headless machines?

ANath1_0-1717562433830.png

This is the UI that pops up.
The following is the contents of my script file

config load <filename>.ioc
project name app
project toolchain STM32CubeIDE
project path <path>
SetCopyLibrary copy all
SetStructure Advanced
project generate
exit

 Command to invoke STM32CubeMX:

java -jar <path_to_CubeMX>/STM32CubeMX -q <scriptfile>

Thanks,

Abhijit Nathwani

4 REPLIES 4
Ghofrane GSOURI
ST Employee

Hello @ANath.1 

Thanks a lot for having reported.

Issue has been raised to our dev team in order to fix the issue.

Internal ticket number:   183448 (This is an internal tracking number and is not accessible or usable by customers).

I will keep you posted with updates

THX

Ghofrane

Hi @Ghofrane GSOURI 
Thank you for the response. Request you to kindly keep updating the thread here with updates to the issue.

Thanks,

Abhijit Nathwani

BarryWhit
Senior

@ANath.1 , please see discussion in Project generation from command line, headless for a possible solution.

- If you feel a post has answered your question, please click "Accept as Solution".
- Once you've solved your issue, please consider posting a summary with any additional details you've learned. Your new knowledge may help others in the future.

Hi Ghofrane,

I'd like to +1 this request. Having tools that can run sensibly in a headless environment is a very common requirement in a professional environment these days. The STM32 tools are almost there, and are much better than some others I have used.

Thanks,

Andrew