Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#65 problem with -mfloat-abi=hard

None
closed-fixed
None
5
2015-02-06
2013-11-12
Davide Faconti
No

I am using the plugin 1.1.5, Eclipse Kepler, Ubuntu 12.04, compiler arm-none-eabi-gcc.

When I enable the option hard floats (project STM32F4xxx), I get the following error:

Building target: test1.elf
Invoking: Cross ARM C++ Linker
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-impure.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-impure.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-mallocr.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-mallocr.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-mlock.o) does not
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -O1 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g -T libs.ld -T mem.ld -T sections.ld -nostartfiles -Xlinker --gc-sections -L"../ldscripts" -Wl,-Map,"test1.map" -o "test1.elf" ./src/main.o ./libs/misc/src/_write.o ./libs/misc/src/trace_impl.o ./libs/StdPeriph/src/misc.o ./libs/StdPeriph/src/stm32f4xx_adc.o ./libs/StdPeriph/src/stm32f4xx_can.o ./libs/StdPeriph/src/stm32f4xx_crc.o ./libs/StdPeriph/src/stm32f4xx_cryp.o ./libs/StdPeriph/src/stm32f4xx_cryp_aes.o ./libs/StdPeriph/src/stm32f4xx_cryp_des.o ./libs/StdPeriph/src/stm32f4xx_cryp_tdes.o ./libs/StdPeriph/src/stm32f4xx_dac.o ./libs/StdPeriph/src/stm32f4xx_dbgmcu.o ./libs/StdPeriph/src/stm32f4xx_dcmi.o ./libs/StdPeriph/src/stm32f4xx_dma.o ./libs/StdPeriph/src/stm32f4xx_dma2d.o ./libs/StdPeriph/src/stm32f4xx_exti.o ./libs/StdPeriph/src/stm32f4xx_flash.o ./libs/StdPeriph/src/stm32f4xx_fmc.o ./libs/StdPeriph/src/stm32f4xx_fsmc.o ./libs/StdPeriph/src/stm32f4xx_gpio.o ./libs/StdPeriph/src/stm32f4xx_hash.o ./libs/StdPeriph/src/stm32f4xx_hash_md5.o ./libs/StdPeriph/src/stm32f4xx_hash_sha1.o ./libs/StdPeriph/src/stm32f4xx_i2c.o ./libs/StdPeriph/src/stm32f4xx_iwdg.o ./libs/StdPeriph/src/stm32f4xx_ltdc.o ./libs/StdPeriph/src/stm32f4xx_pwr.o ./libs/StdPeriph/src/stm32f4xx_rcc.o ./libs/StdPeriph/src/stm32f4xx_rng.o ./libs/StdPeriph/src/stm32f4xx_rtc.o ./libs/StdPeriph/src/stm32f4xx_sai.o ./libs/StdPeriph/src/stm32f4xx_sdio.o ./libs/StdPeriph/src/stm32f4xx_spi.o ./libs/StdPeriph/src/stm32f4xx_syscfg.o ./libs/StdPeriph/src/stm32f4xx_tim.o ./libs/StdPeriph/src/stm32f4xx_usart.o ./libs/StdPeriph/src/stm32f4xx_wwdg.o ./libs/CMSIS/src/startup_cm.o ./libs/CMSIS/src/startup_stm32f4xx.o ./libs/CMSIS/src/system_stm32f4xx.o ./libs/CMSIS/src/vectors_stm32f4xx.o
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-mlock.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-reent.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-reent.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-sbrkr.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-sbrkr.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-freer.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libg.a(lib_a-freer.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libnosys.a(getpid.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libnosys.a(getpid.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libnosys.a(kill.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libnosys.a(kill.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: error: test1.elf uses VFP register arguments, /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libnosys.a(sbrk.o) does not
/usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /usr/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/libnosys.a(sbrk.o)
collect2: error: ld returned 1 exit status

Discussion

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • for Cortex-M4, when using the Float ABI: hard, it is necessary to select the FPU Type: fpv4-sp-d16.

    in future versions we'll try to automate it, but for now all we can do is add an entry in the FAQ.

     
  • could you try the new 1.1.6 beta from

    http://gnuarmeclipse.sourceforge.net/updates-test

    and let me know if the fpu type is automatically set to fpv4-sp-d16 when you change the float abi to hard or softfp?

     
  • Davide Faconti
    Davide Faconti
    2013-11-13

    FPU value is updated automatically and it compiles as expected. Thanks!!

     
    • status: open-accepted --> closed-fixed
     
  • fixed in 1.1.6

    thank you Davide for helping us improve the plug-in.