cancel
Showing results for 
Search instead for 
Did you mean: 

does not start in interactive command-line mode or script mode

FS.1
Associate III

When I try (as stated in the CubeMX handbook Section 3.3.2)

cd "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\"
java.exe -jar STM32CubeMX.exe -i

or

java -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe" -q cubeMxGenerate

with cubeMXGenerate just containing

config load myconfig.ioc

the GUI comes up all the time.

I would expect that the command-line mode would work without a GUI and thus can be run on a CI server for example. Is that a known issue to be fixed?

8 REPLIES 8
Khouloud ZEMMELI
ST Employee

Hello @FS.1​ ,

Thank you for your post,

I'll check the point and I'll get back to you.

Khouloud

Khouloud ZEMMELI
ST Employee

Hi again @FS.1​ ,

I have checked from my side using the latest CubeMX version (6.3.0) and I cannot reproduce the issue.

Could you please switch to the latest release and tell me if it works fine for your or not?

Otherwise, could you please give me more details about your machine and share the script used with your ioc file?

Thanks, Khouloud

Hi,

thanks for testing.

I just upgraded to 6.3.0 and

java -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe" -i

starts CubeMX GUI in version 6.3.0.

No interactive console.

Java ist the following:

> java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

Hello @FS.1​ 

Please use the following command :

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX>jre\bin\java.exe -jar STM32CubeMX.exe -q  your_script

Thanks, Khouloud

FS.1
Associate III

Hi,

running

PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX> .\jre\bin\java.exe -jar STM32CubeMX.exe -i

just runs CubeMX UI and not the interactive command-line as stated in the handbook.

Running

PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX> .\jre\bin\java.exe -jar STM32CubeMX.exe -q C:\path\to\project\cubeMxGenerate

does not work because the IOC file lies in C:\path\to\project\ just like the script I want to run.

Running

PS C:\C:\path\to\project> & 'C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\jre\bin\java.exe' -jar 'C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe' -q .\cubeMxGenerate

kind of works but still shows a "created with an older version, what do you want to do?" window.

Is it possible to do the "continue" or "migrate" automatically?

Also, the command ends with OK but apparently does not return and has to be finished with Ctrl+C ... so it cannot be run automatically from another script or a CI system.

As it stands now, CubeMX is not ready for CI business. In command-line oder script mode it should never open any windows.

Cheers

FS.1
Associate III

Also, running

 swmgr refresh
 swmgr install stm32cube_f4_1.5.0 ask

within the script opens a progress bar window and while the package is installed, the MainUpdater times out 15 times and then gives up.

Command-line mode is completely untested and unusable. :(

Cheers

George Small
Associate II

Any update on this? I'd like to use this feature as well but am having the same issue. I'm testing on version 6.3.0.

George Small
Associate II

Anyone...?