Fail to generate code with cubeMx 6.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 1:16 AM
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
- Labels:
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 3:48 AM
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:
Did you do it differently or did I miss something ?
Thank you in advance.
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 6:41 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-03 6:58 AM
I've just get the same result using gui.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-04 6:37 AM
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.
