cancel
Showing results for 
Search instead for 
Did you mean: 

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.

GRoss.5
Associate II
 
3 REPLIES 3
Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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
Associate II

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

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