Skip to main content
GRoss.5
Associate II
Dec 21, 2021 11:49 PM UTC
Question

I would like to automate the CubeMX build. This is to support continuous integration via Jenkins. So far, cannot find the answers I'm looking for.

..

This topic has been closed for replies.

3 replies

Olivier GALLIEN
ST Technical Moderator
Dec 22, 2021 10:23 AM UTC

Hi @Community member,​ 

AFAIK CubeMX offer a CLI

refer to STM32CubeMX for STM32 configuration and initialization C code generation - User manual

Section

3.3.2 Running STM32CubeMX in command-line mode

Post redirect to STM32CubeMX topic for further support if needed

Olivier

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.
GRoss.5
GRoss.5Author
Associate II
Jan 5, 2022 6:39 PM UTC

Olivier,

Below is the batch file I am invoking from Jenkins to automate the CubeMX build. Following that is the CubeMX script file. When I run the batch file from the command file it works fine. Although I do get a progress bar during the "project generate" phase. Because I use the -q qualifier, I would not expect this progress bar. But when running from Jenkins I get the following:

0693W00000HpaEJQAZ.pngEverything seems to be working fine until "project generate". I terminate after a few minutes. Could it be that CubeMX is trying to display the progress bar?

Batch file:

java -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe" -q "C:\JenkinsBuilds\workspace\ICELL8_Firmware\ICELL8_FirmwareScript.txt"

"C:\Program Files\IAR Systems\Embedded Workbench 9.0\common\bin\iarBuild.exe" "C:\JenkinsBuilds\workspace\ICELL8_Firmware\EWARM\ICELL8_Firmware.ewp" -make "Release" -log info

Script file:

config load "C:\JenkinsBuilds\workspace\ICELL8_Firmware\ICELL8_Firmware.ioc"

project generate ./

exit

GRoss.5
GRoss.5Author
Associate II
Dec 22, 2021 11:51 PM UTC

Olivier,

Below is the batch file I am invoking from Jenkins to automate the CubeMX build. Following that is the CubeMX script file. When I run the batch file from the command file it works fine. Although I do get a progress bar during the "project generate" phase. Because I use the -q qualifier, I would not expect this progress bar. But when running from Jenkins I get the following:

0693W00000HpaEJQAZ.pngEverything seems to be working fine until "project generate". I terminate after a few minutes. Could it be that CubeMX is trying to display the progress bar?

Batch file:

java -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe" -q "C:\JenkinsBuilds\workspace\ICELL8_Firmware\ICELL8_FirmwareScript.txt"

"C:\Program Files\IAR Systems\Embedded Workbench 9.0\common\bin\iarBuild.exe" "C:\JenkinsBuilds\workspace\ICELL8_Firmware\EWARM\ICELL8_Firmware.ewp" -make "Release" -log info

Script file:

config load "C:\JenkinsBuilds\workspace\ICELL8_Firmware\ICELL8_Firmware.ioc"

project generate ./

exit