.project file links duplicted during STM32CubeMX code regeneration
I have observed that when code is regenerated from STM32cubeMX (4.8.0) the .project link entries become duplicated at the end of the file instead of replaced. This does not yet cause a problem since eclipse appears to handle it by giving priority to the latter entries but if files have been removed in later configurations, the links in the project will still exists and be compiled.
I have tried this on 2 different processors including the default configuration for the STM32F429I-DISCO board.
For a particular project, the duplicated links have the correct file but the for the duplicated entries all had the same locationURI entry, causing in all files linking to a single file. This results in compilation failure. Additionally the order of the file entries was randomized preventing comparison with the committed .project file. The only solution was to remove the .project and .cproject files before code generation. This causes other problems such as total loss of project configuations and path setup to non-generated files.
Is there any way to prevent this?
My workflow is ensure eclipse is closed,
Open the .ioc file, make changes, in CubeMX,
Genenerate Code
Re-Open preovious workspace.
The project higherarchy follows the guide:
http://www.openstm32.org/Importing+a+STCubeMX+generated+project?structure=Documentation
I do not rename the project or generated files.