Skip to main content
Visitor II
November 5, 2020
Solved

Cannot Link MC Lib into STM32CubeIDE project.

  • November 5, 2020
  • 5 replies
  • 4054 views

Hi Everyone.

I have created a STM32CubeIDE project for the L476 Nucleo.

I'm having huge issues trying to link the "MotionMC_CM4F_wc32_ot.a" library into my project.

The images are 1) of my file tree structure, and 2) the statement entered into the linker settings

trying to copy exactly as possible from the STM32 eCompass example. 

Below is the error I'm receiving, I don't like pasting such long strings in these types of questions

but I'm lost to a solution.

c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: MotionMagCal.elf uses VFP register arguments, F:\emb\ARM\ST\CubeIde\L4\L476\IMU\MagCal\MotionMagCal\Middlewares\ST\STM32_MotionMC_Library\Lib\MotionMC_CM4F_wc32_ot.a(motion_mc.o) does not

c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file F:\emb\ARM\ST\CubeIde\L4\L476\IMU\MagCal\MotionMagCal\Middlewares\ST\STM32_MotionMC_Library\Lib\MotionMC_CM4F_wc32_ot.a(motion_mc.o)

Can someone please help? Why is this such a problem?

The example project provided with MEMS1 work fine, always has? why?

    This topic has been closed for replies.
    Best answer by kvresto

    Hi Miroslav.

    I think you mean to double check I made the correct changes. I went back and compared all changes

    I made to be the same as the settings in the MEMS1 example project.

    After that I had the idea of cleaning the project and deleting the debug directory. I rebuilt the project and it worked.

    Selecting "Mix HW/SW implementation" in C/C++ Build -> Settings -> Tool Settings -> Floating-Point ABI

    fixed my issue.

    cheers.

    5 replies

    ST Employee
    November 5, 2020

    The libraries in MEMS1 package are compiled with softfp compiler option. In STM32CubeIDE you have to select Mix HW/SW implementation in C/C++ Build -> Settings -> Tool Settings -> Floating-Point ABI.

    kvrestoAuthor
    Visitor II
    November 6, 2020

    Hi Miroslav, thanks for responding.

    I completed the settings as you suggested, and included an image, but I'm getting even more errors this time.

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim_ex.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/app_x-cube-mems1.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/app_x-cube-mems1.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/com.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/com.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/demo_serial.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/demo_serial.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/iks01a2_mems_control.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/iks01a2_mems_control.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/iks01a2_mems_control_ex.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/iks01a2_mems_control_ex.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/main.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/main.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/motion_mc_manager.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/motion_mc_manager.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/serial_protocol.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/serial_protocol.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/stm32l4xx_hal_msp.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/stm32l4xx_hal_msp.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/stm32l4xx_it.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/stm32l4xx_it.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/stm32l4xx_nucleo.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/stm32l4xx_nucleo.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/stm32l4xx_nucleo_bus.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/stm32l4xx_nucleo_bus.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/syscalls.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/syscalls.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/sysmem.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/sysmem.o

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: error: Src/system_stm32l4xx.o uses VFP register arguments, MotionMagCal.elf does not

    c:\st\stm32cubeide_1.3.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.4.0.202007081208\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file Src/system_stm32l4xx.o

    collect2.exe: error: ld returned 1 exit status

    make: *** [makefile:55: MotionMagCal.elf] Error 1

    In the image it shows the two check boxes at the bottom selected, but I've tried all combinations.

    ST Employee
    November 6, 2020

    It seems like different settings for different files in your project. Can you please double check it?

    If you don't find the solution, you can share with me your project.

    kvrestoAuthorAnswer
    Visitor II
    November 8, 2020

    Hi Miroslav.

    I think you mean to double check I made the correct changes. I went back and compared all changes

    I made to be the same as the settings in the MEMS1 example project.

    After that I had the idea of cleaning the project and deleting the debug directory. I rebuilt the project and it worked.

    Selecting "Mix HW/SW implementation" in C/C++ Build -> Settings -> Tool Settings -> Floating-Point ABI

    fixed my issue.

    cheers.

    ST Employee
    November 9, 2020

    OK, good to hear the issue is fixed.