cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE changes "Preprocessor" and "Include paths" settings whenever the code is updated

irene
Associate II

I created a new project on STM32CubeIDE and I'm using the code generated by the software itself when I set the MCU pinout configuration using the Device Configuration Tool (.ioc file, aka the STM32CubeMX interface). Whenever I modify the pinout (i.e. the .ioc file), the generated code is updated, but file settings are refreshed. Therefore, every time I modify the pinout I have to set up again all the settings, like Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Preprocessor and Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Include paths.

Is this a bug or is there a way to set up "fixed" settings?

I'm using STM32CubeIDE Version 1.0.2.

15 REPLIES 15
Markus GIRDLAND
ST Employee

This was reported in another thread so I wrote a ticket for it and it seems to be fixed in the latest build (unreleased). So this should be fixed in the next version of CubeIDE.

irene
Associate II

Thank you so much!

Thanks. Also settings like compiler optimization and linker file general settings (location of .ld script) are overwritten sometimes, when regenerating.

Does the fix prove solutions for these problems aswell?

Yes, it does 😊

Cartu38 OpenDev
Lead II

Definitively a bug.

Sounds some improvements have been done Thanks STM32CubeIDE V1.1.0 just released on st.com

I am using the stm32CubeIde v1.5.0 and the issue seems not solved yet.

If I create a new test project from scratch with the ide and then regenerate the code I get include path unchanged (and that's good) , but the preprocessor defines appear in a sparse order. This only happens if I add my new defines, not if I let the default ones. Any ideas?

Secondly, on my project started years ago and migrated to work with the latest framwork, things go even worse, since also the include paths get scrambled and even new wrong duplicated items are added and I have to remove them manually. Any ideas?

About both troubles could you possibly share snapshots of before and after code generation (Eclipse proect properties build settings UI snapshots) ?

Depending of either bug or common behavior.

Please find a snapshot of include paths. On the left (before), on the right (after the code generation)

Bug and not bug possibly here according you're snapshot.

1) Not a bug if I consider your first comment about ordering and duplicates.

According snapshot you don't have duplicates .... as example 'Core/Inc' is not same as '../Core/Inc' ...

As not duplicate no ordering issue according to me ... original material is preserved as it is and new material is added as post directives (all are not reordred / mixed / jeopardized)

2) Then possibly a bug because why to you get such almost duplicated includes directives ? (Back almost because 'Core/Inc' is not same as '../Core/Inc')

I guess you have to understand why 2). Do you have renamed, moved on file system or ... your project at a time ? According common project structure '../' are good ones to me