cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX ignores some settings in .ioc file

Miles1
Associate III

There appears to be a bug in STM32CubeMX where some settings are not loaded when reopening the app and project, even though they were previously successfully written to the .ioc file. Default settings are always used instead, and then re-saving the project (without making any changes yourself) will write these undesired settings back to the .ioc file. These settings are:

  • Project Manager > Project > Firmware Location (custom path reset back to default path)
  • Project Manager > Project > Add library files as reference (reset back to copy)

Steps to reproduce:

  • Create a symlink to `STM32Cube/Repository` which is relative to the intended project workspace. This enables sharing projects among multiple developers, since CubeMX uses a relative path to the FW repo.
ln -s ~/STM32Cube/Repository ~/projects/demo/cube_repo
  • Launch CubeMX, and create a new project with the following settings:

0693W000003QU1DQAW.png

0693W000003QU1XQAW.png

  • Save and close CubeMX. This produces a .ioc file.
  • Track the .ioc file with version control (this gives us more info about the upcoming bug).
  • Reopen CubeMX and the previous project, note that the following settings have been reset:

0693W000003QU1cQAG.png

0693W000003QU1hQAG.png

  • Save the project. This updates the .ioc file, even though we did not intend to make any changes. Here is the `git diff` output showing what was reset in the .ioc file:
-ProjectManager.CustomerFirmwarePackage=../../cube_repo/STM32Cube_FW_F4_V1.25.0
+ProjectManager.CustomerFirmwarePackage=../../../../STM32Cube/Repository
 
-ProjectManager.LibraryCopy=2
+ProjectManager.LibraryCopy=1

System info:

  • OS : Ubuntu 20.04
  • STM32CubeMX version: 6.0.1

1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud ZEMMELI
ST Employee

Hello @Miles​ ,

Thanks for bringing this to our attention, Issues confirmed an they will be fixed.

Best Regards,

Khouloud

View solution in original post

2 REPLIES 2
Miles1
Associate III

This is also an issue when running STM32CubeMX in command line mode.

For example with this script (saved as mxcmd.txt):

config load /home/miles/projects/demo/cube_workspace/test1/test1.ioc    
project generate    
exit

And executed with:

/home/miles/STM32CubeMX/STM32CubeMX -q $(readlink -f mxcmd.txt)

It overwrites the .ioc file with the same changes as described in the previous message, and then generates project output with these undesired settings.

Two other annoyances with the CLI interface:

  • It launches a splash screen. This shouldn't happen for a CLI app. I'm concerned this will cause issues when running in a headless environment.
  • It requires an absolute path to the script. I'm using readlink as a workaround.
Khouloud ZEMMELI
ST Employee

Hello @Miles​ ,

Thanks for bringing this to our attention, Issues confirmed an they will be fixed.

Best Regards,

Khouloud