cancel
Showing results for 
Search instead for 
Did you mean: 

Prebuild and post build step deleted when the project is regenerated from CubeMx

Paolo Andreuzza
Associate II

I've created a project in the STM32CubeIDE environment, using the STM32CubeMX integrated configurator (STM32CubeIDE Version: 1.0.2, STM32CubeMX Version: 5.3.0).

I have added in project configuration a prebuild step that calls bat file that collect some information from the source control management tool, and put them in some #define in an include file, and a post build step that calls an other bat file to rework the just created binary file.

At this point, if I change something in the CubeMX (just an IO config is enought, for example) and I regenerate the code, the pre build and post build settings are deleted.

This is a very annoying beheviour, because it doesn't allow to automate the workflow. Are there any workarounds to bypass this beheviour?

thank you

Paolo

P.S. I've realized just now that exist an other post for the same issue for stand alone version of CubeMX and ATOLLIC TrueStudio here: https://community.st.com/s/question/0D50X0000A4mi6iSQA/stm32cube-v50-overwrites-postbuild-steps-when-generating-truestudio-project-files

18 REPLIES 18

Yes. this is a very big issue!

It seems that all the project settings are reset to default (and so linker scripts), and this make the tool almost unusable, even more if you have a high level of project's customization.

I hope ST releases quickly a fixed version .

I think I wrote in another thread that this is fixed in our current unreleased weekly build already. However, the other features bundled with it is not ready for release just yet. It will be released soon.

Paolo Andreuzza
Associate II

Version 1.1.0 of STM32CubeIDE seems to work correctly.

Thank you

I'm glad to hear it. It was listed as a fixed issue in the release note as:

"71371 - Pre- and post-build steps, build configuration, and non-STM32CubeMX generated files inside project and others get deleted when project is regenerated."

So hopefully it stays fixed as well. The MX team, like I suspected, prioritized this very highly to get the fix in ASAP.

If you run into anything like this in 1.1.0 then please @ me on the forum.

Paolo Andreuzza
Associate II

Ok. Thank you again!

MChri
Associate

Has this issue been fixed yet? I have been using SW4STM32 to avoid this problem, but I would really rather use STM32CubeIDE if it worked properly...

Paolo Andreuzza
Associate II

yes, this issue been fixed. It works from STM32CubeIDE version 1.1.0.

Paolo

Still not fixed.

It just happened to me.

All the include paths were remove.

I didn't check whether it also deleted / cleared the protected user code blocks

Nice that the same bug still exists since 2019. Free tool that costs more on lost working time than a license for whatever. :\ I am fixing my include paths and libraries the second time now.