Showing results for 
Search instead for 
Did you mean: 

Code generation from STM32CubeIDE's CubeMX plugin only generates EWARM not STM32CubeIDE project files

Associate III


I am working on an STM32H7-based project which I am trying to migrate from the DISCOVERY evaluation hardware to custom board. A colleague of mine has created a new `.ioc` file with a newer version of CubeMX than the standalone vesion I have currently installed. Due to lack of admin rights I have to use the CubeMX plugin inside of the STM32CubeIDE until my IT department installs a new standalone version - as the `.ioc` file cannot be loaded with an older version.

I can manually create a new STM32 project from that `.ioc` file and generate an STM32CubeIDE project. Then navigating to the "Project Manager" tab only shows "STM32CubeIDE" in the "Toolchain / IDE" dropdown menu which is even grayed out.

However, I'd like to automate stuff. I've written a Windows batch script which executes a CubeMX script that can basically be narrowed down to the following lines:

SET JAVA_EXE=C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\\jre\bin\java.exe
SET CUBEMX_EXE=C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\\STM32CubeMX.jar
REM Reference CubeMX script files from the same folder as this Windows batch script (%~dp0)
SET CUBEMX_SCRIPT_APP=%~dp0CubeMXScriptApp.txt

The script file itself is also quite simple:

config load ../../CubeMX/CubeMX_Application/STM32H7xxValidationVerification_90fd6ed_HW_Test.ioc
project toolchain "STM32CubeIDE"
project generate ../../CubeMX/CubeMX_Application

(In earlier versions of the script the line containing "project toolchain" was missing. I don't see any difference.)

But: I get code generated for EWARM. Plus: the following changes in the `.ioc` file (the toolchain line modified and the `isbadioc` line removed):

- ProjectManager.TargetToolchain=STM32CubeIDE
+ ProjectManager.TargetToolchain=EWARM V8.50
- isbadioc=false

I've also tried to just open CubeMX from command line as an intermediate step and then generate code from the `.ioc` file manually (discarding the changes made by CubeMX). Start CubeMX:

"C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\\jre\bin\java.exe" -jar "C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\\STM32CubeMX.jar"

Then "File" > "Load Project ..." > file select ... loads the `.ioc` file without any errors.

Then navigating to the "Project Manager" tab only gives me the options "EWARM" + "MDK-ARM" and "Makefile" (but not "STM32CubeIDE") in the "Toolchain / IDE". So I guess this is related to the runtime environment... - maybe some environment variable(s) missing?

Please understand that I cannot provide the full `.ioc` file here due to IP/ ongoing development reasons - but I am happy to share snippets.

Are there any specific messages I should search for in the command line output?

Cartu38 OpenDev
Lead II

@mwb​ possibly all is as simple as you cannot pick a piece of a product hoping it will work without any trouble. What do you think about ? My 2 cents is if ST's software tool product like any other whatever provider most probably they are functional only if their integrity is preserved.

My advice would be to wait for your IT department install.