cancel
Showing results for 
Search instead for 
Did you mean: 

Fail to generate code with cubeMx 6.4

JulienD
Senior

Hello,

I'm generating code with CubeMx 6.4.0 with a command line.

The generation ends with an error even if the files seems to be correctly generated.

Here's the log and the ioc file.

Thanks

Julien

4 REPLIES 4

Hello @Julien D_Oevillers​ ,

First let me thank you for having reported.

Actually, I was unable to reproduce your issue from my side: no exceptions were thrown during code generation.

Hereafter how I 've did the test:

  • After downloading your .ioc file, I've created a script file (script.txt) containing the following commands:
config load <ioc_Location>\mainBoard.ioc
project generate
exit
  • Via command line window, I ran the command:
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX-6.4.0>jre\bin\java -jar STM32CubeMX.exe -q "<script_file_Location>\script.txt"

The project is generated correctly without any errors:

0693W00000HqOF7QAN.pngDid you do it differently or did I miss something ?

Thank you in advance.

Khouloud.

JulienD
Senior

Hello Khouloud

Thanks for your answer.

Script is correct. Here's what I'm using (generated with python with the following code) :

tempMxFile.write("config load \"" + self.iocFile + "\"\n")
  tempMxFile.write("project generate\n")
  tempMxFile.write("exit\n")

script is launched like this (python too) :

cubeMXPath = "C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeMX/STM32CubeMX.exe"
cubeMXJREPath = "C:/Program Files/STMicroelectronics/STM32Cube/STM32CubeMX/jre/bin/java.exe"
subprocess.run([cubeMXJREPath, "-jar", cubeMXPath, "-q", scriptFile], check=True)

Everything seems like you did....

  • Did you have a look to the code where the failure happens to try to get a clue?
  • Can you send the generated files? I would like to compare on my side.

Thanks

Julien

JulienD
Senior

0693W00000HqPgYQAV.pngI've just get the same result using gui.

Hi @Julien D_Oevillers​,

Oddly, I have always no problem with code generation using command window and also CubeMX GUI; the project is generated successfully without any displayed errors.

Noting that I'm using STM32CubeIDE as a toolchain because of the limited support of TrueSTUDIO.

You'll find attached the generated project from my side.

Khouloud.