Project setting of Float ABI and FPU type not restored correctly after Eclipse reopening.
After setting up "Float ABI" and "FPU type" in "Project Properties / C/C++ Build / Settings / Target Processor", saving project, closing Eclipse and then open it again, setting are seems to be random.
This happens at least for STM32F407/429 devices and plugin built-in templates.
For example, I choose "FP instructions (hard)" for Float ABI and "fpv4-sp-d16" for FPU type. After closing Eclipse next time I reopen it and they could by set up in the following combinations ("Float ABI" and "FPU type"):
It results in errors during project compilation, because commands like these are being generated:
1. arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mfpu=fpv4-sp-d16 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall (...) 2. arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mfpu=fpv4-sp-d16 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall (...) 3. arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall (...)
Steps to reproduce:
Environtment:
Eclipse Standard/SDK Version: Kepler Service Release 1 Build id: 20130919-0819
C/C++ Development Tools 8.2.1.201309180223 org.eclipse.cdt.feature.group Eclipse CDT
GNU ARM C/C++ Cross Compiler Support 1.1.6.201312241058 ilg.gnuarmeclipse.managedbuild.cross.feature.group SourceForge Project
GNU ARM C/C++ STM32Fx Project Templates 1.1.5.201312241058 ilg.gnuarmeclipse.templates.stm.feature.group SourceForge Project
Windows 7 Ultimate x64
Update.
I also read the bug #65 "problem with -mfloat-abi=hard". I confirm, that FPU type "fpv4-sp-d16" appears automatically when I pick "FP instructions (hard)" option, but the problem is, that this setting is not recovered correctly, after closing and reopenenig of Eclipse.
Also I would like to mention, that in "Steps to reproduce" may be you should clean the project, after you reopen Eclipse, to get the errors during compilation.
Anyway, one can see the commands like "arm-none-eabi-gcc ... -mfloat-abi=soft -mfpu=fpv4-sp-d16 ..." or "arm-none-eabi-gcc ... -mfloat-abi=hard ..." (with no FPU type selected) and so on in Eclipse console, even without cleaning the project.
I confirm the bug, for (yet) unknown reasons, the some of the compiler options are not saved in .cproject, and, consequently, are not persistent.
Automatically changing the FPU type when the FPU ABI changed did not use the proper setOption() method, and the configuration was not marked as dirty, so the persistence was not assured.
A new beta version is available from:
http://gnuarmeclipse.sourceforge.net/updates-test
Could you give it a try?
fixed in 1.8.1-201401111229