AnsweredAssumed Answered

STM32CubeMX code re-generation for SW4STM32 creates duplicated file links in .project

Question asked by gshera on Jul 26, 2015
Latest reply on Nov 2, 2015 by STM32Cube-T
When code is regenerated from STM32cubeMX (4.8.0 & 4.9.0) for SW4STM32 toolchain, eclipse file link entries in .project become duplicated at the end of the file instead of replaced or updated. 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. The workaround is to be sure to use version control, look at the changes to the link entries and manuallydelete the old file entries in the generated .project files to see what the differences are.

I have tried this on 2 different processors, the STM32F401RDTx and also with the default configuration for the STM32F429I-DISCO board.

Reproduction:
Start STM32CubeMX app (4.8.0 or 4.9.0)
New Project
Choose the STM32F429I-DISCO
Choose project->Generate Code
ProjectTab - project name is test
ProjectTab - ToolChain / IDE is SW4STM32
Code Generator Tab - Select Copy all used libraries into project folder
Code Generator Tab - Select Generate peripheral initialization as a pair of '.c/.h' files per IP
Code Generator Tab - Select Keep user code when regenerating
Code Generator Tab - Select Delete previously generated files when not re-generated
Choose OK. Close STM32CubeMX. 
Observe and backup the file  /test/test/SW4STM32/test Configuration/.project
Open STM32CubeMX app.
Open the test.ioc project
Choose project->generate code.
Observe additions to .project file.

Windows 7 x64.

Outcomes