Menu

#72 Project setting of Float ABI and FPU type not restored correctly after Eclipse reopening

Next release
closed-fixed
None
5
2015-02-12
2014-01-09
AlexX
No

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"):

  1. "Toolchain default" and "fpv4-sp-d16"
  2. "Library (soft)" and "fpv4-sp-d16"
  3. "FP instructions (hard)" and "Toolchain default" (no FPU selected)

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:

  1. Create a project, add some files.
    (I created project for STM32F407/429 devices with Plugin Template files).
  2. Open "Project Properties->C/C++ Settings->Settings->Target Processor" and define "FP instructions (hard)" for Float ABI and "fpv4-sp-d16" for FPU type and save it.
  3. Save project. Build it.
  4. Close Eclipse.
  5. Open it again.
  6. Go to "Project Properties->C/C++ Settings->Settings->Target Processor" and check Float ABI and FPU type settings.
  7. If there are incorrect combination of these settings -> build fails.

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

Discussion

  • AlexX

    AlexX - 2014-01-09

    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.

     
  • Liviu Ionescu (ilg)

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • Liviu Ionescu (ilg)

    I confirm the bug, for (yet) unknown reasons, the some of the compiler options are not saved in .cproject, and, consequently, are not persistent.

     
  • Liviu Ionescu (ilg)

    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?

     
  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed-fixed
     
  • Liviu Ionescu (ilg)

    fixed in 1.8.1-201401111229