cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx 4.17 does not handle -q or -s switch

JulienD
Senior
Posted on November 28, 2016 at 15:38

Hi,

I recently discovered in UM1718 that CubeMX can work with a command line. That's a cool feature for continuous integration. But it seems that the command line switch are not handled. If I use -s or -q followed by a script name, I get something like this: systemId: file:/D:/Dev/Pic/Msa/devices/diamond%20ST/scripts/cubeMxGenerate.txt; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. command:

java -jar ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' –q scripts\cubeMxGenerate.txt

error:

systemId: file:/D:/Dev/...T/scripts/cubeMxGenerate.txt; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

if instead I call:

java -jar ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' –q conf.ioc

It works but does not run a script.... Does the syntax has changed or is it a bug? Thanks Julien #cubemx-script
7 REPLIES 7
Imen.D
ST Employee
Posted on November 28, 2016 at 17:14

Dear User,

I have tested and checked the command line, but I'm not able to reproduce this issue with STM32CubeMx v4.18.0

Try using short path and name for <script filename>, like:

java -jar ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' -q C:\cube.txt

Please, keep us informed about your progress.

Best Regards

STM32.forum

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JulienD
Senior
Posted on November 28, 2016 at 17:47

Hum, where is 4.18?

''check for update'' returns nothing and when I download 4.18 from the website,

the installer contains a setup labeled  4.17...

Imen.D
ST Employee
Posted on November 28, 2016 at 18:08

Dear JulienD,

The new release 4.18.0 is available on the web via this

http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.html

, but not yet visible on the CubeMx tool, it takes some time.

This is due to the synchronization issue between CubeMx tool and the update in the web.

Your issue is reported internally to our CubeMx team for more investigation.

We apologize for any inconvenience this may cause and thank you for your understanding.

Best Regards

STM32.forum
When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JulienD
Senior
Posted on November 28, 2016 at 18:11

and with a short path:

D:\Dev\Pic\Msa\devices\diamond ST>java -jar ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' -q d:\cube.txt
Using Application install path:C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX
Compatibility file has been processed (38 Rules)
HeapMemory: 257425408
Using Application install path:C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX
loadPluginJar : clock
loadPluginJar : add clock
loadPluginJar : filemanager
loadPluginJar : add filemanager
loadPluginJar : ipmanager
loadPluginJar : add ipmanager
loadPluginJar : pinoutconfig
InternalPropertyChange: ChangeKeepUser dont care
loadPluginJar : add pinoutconfig
loadPluginJar : power
loadPluginJar : add power
loadPluginJar : projectmanager
loadPluginJar : add projectmanager
loadPluginJar : updater
Updater Check For Update Now.
[IoConfig] Change Default Database Version : DB.4.0.170
[IoConfig] Change Database Version : DB.4.0.170
loadPluginJar : add updater
PluginManage : ReOrganize retry [3x]
End of CheckServer Thread
setPackage(No Configuration,No Configuration)
loadIPPluginJar : adc C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\adc.jar
loadIPPluginJar : add adc
loadIPPluginJar : can C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\can.jar
loadIPPluginJar : add can
loadIPPluginJar : comp C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\comp.jar
loadIPPluginJar : add comp
loadIPPluginJar : dfsdm C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\dfsdm.jar
loadIPPluginJar : add dfsdm
loadIPPluginJar : dma C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\dma.jar
loadIPPluginJar : add dma
loadIPPluginJar : fatfs C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\fatfs.jar
loadIPPluginJar : add fatfs
loadIPPluginJar : fmc C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\fmc.jar
loadIPPluginJar : add fmc
loadIPPluginJar : freertos C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\freertos.jar
loadIPPluginJar : add freertos
loadIPPluginJar : genericplugin C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\genericplugin.jar
loadIPPluginJar : add genericplugin
loadIPPluginJar : gpio C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\gpio.jar
loadIPPluginJar : add gpio
loadIPPluginJar : i2c C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\i2c.jar
loadIPPluginJar : add i2c
loadIPPluginJar : i2s C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\i2s.jar
loadIPPluginJar : add i2s
loadIPPluginJar : ltdc C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\ltdc.jar
loadIPPluginJar : add ltdc
loadIPPluginJar : nvic C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip
vic.jar
loadIPPluginJar : add nvic
loadIPPluginJar : opamp C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\opamp.jar
loadIPPluginJar : add opamp
loadIPPluginJar : plateformsettings C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\plateformsettings.jar
loadIPPluginJar : add plateformsettings
loadIPPluginJar : quadspi C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\quadspi.jar
loadIPPluginJar : add quadspi
loadIPPluginJar : sai C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\sai.jar
loadIPPluginJar : add sai
loadIPPluginJar : spi C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\spi.jar
loadIPPluginJar : add spi
loadIPPluginJar : tim C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\tim.jar
loadIPPluginJar : add tim
loadIPPluginJar : tsc C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\tsc.jar
loadIPPluginJar : add tsc
loadIPPluginJar : usart C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\plugins\ip\usart.jar
loadIPPluginJar : add usart
[IoConfig] Change Database Path : C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX//db/
[IoConfig] Change Database Version : DB.4.0.170
setPackage(No Configuration,No Configuration)
[IoConfig] Change Database Path : C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX//db/
[IoConfig] Change Database Version : DB.4.0.170
setPackage(No Configuration,No Configuration)
Begin LoadConfig() Used Memory: 20908664 Bytes (206045184)
Change cursor
[Fatal Error] cube.txt:1:1: Content is not allowed in prolog.
Cannot open configuration file : d:\cube.txt.
cannot parse input file.
com.altova.SourceInstanceUnavailableException: cannot parse input file.
at com.altova.xml.XmlTreeOperations.loadDocument(XmlTreeOperations.java:109)
at com.st.microxplorer.altova.db_V2.mcus.mcus2.loadFromFile(mcus2.java:23)
at com.st.microxplorer.db.ApiDbMcuV2.loadMcuConfig(ApiDbMcuV2.java:243)
at com.st.microxplorer.db.ApiDbMcu.loadConfig(ApiDbMcu.java:490)
at com.st.microxplorer.mcu.Mcu$McuDBLoader.startLoad(Mcu.java:336)
at com.st.microxplorer.mcu.Mcu.startLoadConfig(Mcu.java:1329)
at com.st.microxplorer.plugins.filemanager.engine.OpenFileManager.LoadConfig(OpenFileManager.java:258)
at com.st.microxplorer.plugins.filemanager.engine.OpenFileManager.loadConfigurationFile(OpenFileManager.java:200)
at com.st.microxplorer.plugins.filemanager.engine.MainFileManager.userLoadConfig(MainFileManager.java:222)
at com.st.microxplorer.plugins.filemanager.FileManagerView.getSpecificTask(FileManagerView.java:175)
at com.st.microxplorer.maingui.MainFrame.LoadConfiguration(MainFrame.java:245)
at com.st.microxplorer.maingui.STM32CubeMX.run(STM32CubeMX.java:139)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; systemId: file:/d:/cube.txt; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at com.altova.xml.XmlTreeOperations.loadDocument(XmlTreeOperations.java:104)
... 25 more
Nov 28, 2016 6:09:41 PM com.st.microxplorer.db.ApiDbMcu loadConfig
SEVERE: null
com.st.microxplorer.db.DbException: Cannot open configuration file : d:\cube.txt.[cannot parse input file.]
at com.st.microxplorer.db.ApiDbMcuV2.loadMcuConfig(ApiDbMcuV2.java:264)
at com.st.microxplorer.db.ApiDbMcu.loadConfig(ApiDbMcu.java:490)
at com.st.microxplorer.mcu.Mcu$McuDBLoader.startLoad(Mcu.java:336)
at com.st.microxplorer.mcu.Mcu.startLoadConfig(Mcu.java:1329)
at com.st.microxplorer.plugins.filemanager.engine.OpenFileManager.LoadConfig(OpenFileManager.java:258)
at com.st.microxplorer.plugins.filemanager.engine.OpenFileManager.loadConfigurationFile(OpenFileManager.java:200)
at com.st.microxplorer.plugins.filemanager.engine.MainFileManager.userLoadConfig(MainFileManager.java:222)
at com.st.microxplorer.plugins.filemanager.FileManagerView.getSpecificTask(FileManagerView.java:175)
at com.st.microxplorer.maingui.MainFrame.LoadConfiguration(MainFrame.java:245)
at com.st.microxplorer.maingui.STM32CubeMX.run(STM32CubeMX.java:139)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
InternalPropertyChange: loadConfigFail don't care

JulienD
Senior
Posted on November 28, 2016 at 19:01

If I download the file with the link you gave me. I get a zip file which contains a setup labeled 4.16.1....

If I try with this one :

http://www.st.com/en/development-tools/stm32cubemx.html

I get a zip file which contains a setup labeled 4.17...

Another try?   :D

JulienD
Senior
Posted on December 06, 2016 at 18:31

Dear Imen

I've just downloaded the 4.18 version but I still have the same messy behaviour.

I tried with windows 7 pro SP1 and 8.1.

Best regards

Julien

JulienD
Senior
Posted on December 06, 2016 at 19:04

All right, I found what happened. The '-' sign was copied from the windows console and looked like a '-' but

was not a '-' char. That's why the switch was not interpreted.

Julien