AnsweredAssumed Answered

WARNING AND BUG REPORT: STM32CubeMX v4.14 Code generation to root folder for TrueStudio

Question asked by wired on Mar 25, 2016
Latest reply on Apr 19, 2016 by STM32Cube-T
For version 4.14.0 of the Cube (latest version as of this posting), I have a warning and a bug report. The warning is that if you use linked folders (i.e. do not check the box for Root Folder for code generation settings), pre-existing projects built with prior versions of the Cube are messed up because ST changed the folder structure. My project would no longer build simply from regenerating the code using all of the same options I had before.  I ended up getting URI scheme messages and it couldn't find project files.

I ended up doing this to get back to where I was:
    1) Duplicating my project in Cube under a different project name.
    2) Using Root Folder option this time (which is what I ultimately wanted to do).
    3) Creating the new project in TrueStudio.
    4) Copying all of my other files and project settings to the new project.

Note that because I ended up generating code to a different project, I lost all of the user-defined code that I had in my other auto-generated files.  You might have to copy those old files over the newly autogenerated ones to retain those modifications.  A cautionary note from ST regarding this folder structure change should be made available before people upgrade to this version.

Now for the bug report:

BUG REPORT: When you generate code to a root folder for TrueStudio, the Driver folder that is auto-generated by the Cube will become excluded from the project every time you regenerate code. You will get a warning message related to ResetHandler, and your code size will reflect only the Cube's initialization code.  You need to manually go to Exclude from Build on the Driver folder properties and 'unexclude' the folder.  How this version got released with this bug is beyond my understanding.

Outcomes