Skip to main content
Visitor II
May 15, 2024
Question

How to compile arm_math.h source in STM32CubeIDE?

  • May 15, 2024
  • 1 reply
  • 1943 views

Hello All,  

   I am trying to include arm_math.h for STM32F401RE project, I have all the source file of math.h 

However when I try to build it. I am getting multiple defination  error at linking stage.

NNada1_0-1715784456438.png

Can anyone suggest me how to solve this?

 I am not trying to add the lib. But I want to understand how to add the source files of arm_math.h.

Thank you

 

    This topic has been closed for replies.

    1 reply

    Super User
    May 15, 2024

    When you get a 'Multiple Definition' error, it tells you where both of the definitions are - so remove one!

    Copy & paste the complete error as text rather than an image.

    NNada.1Author
    Visitor II
    May 15, 2024

    @Andrew Neil 

    Hello Andrew, 

      you are right. However when I search for the mentioned function, there is only one defination. 

     

     

    D:/Newton/Courses/Digital Signal Processing/Coding/HAL_WITH_ARM_MATH_H/Debug/..

    /Drivers/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q31.c:211:

    multiple definition of `arm_split_rfft_q31';

    ./Drivers/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.o:

    D:/Newton/Courses/Digital Signal Processing/Coding/HAL_WITH_ARM_MATH_H/Debug/

    ../Drivers/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q31.c:211:

    first defined here

     

     

    Here is the error. I am not able to make any sense out of it. Could you please help me with it?

    Super User
    May 15, 2024
    D:/Newton/Courses/Digital Signal Processing/Coding/HAL_WITH_ARM_MATH_H/Debug/../Drivers/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q31.c:211:
    
    multiple definition of `arm_split_rfft_q31';
    
    ./Drivers/CMSIS/DSP/Source/TransformFunctions/TransformFunctions.o:
    
    D:/Newton/Courses/Digital Signal Processing/Coding/HAL_WITH_ARM_MATH_H/Debug/../Drivers/CMSIS/DSP/Source/TransformFunctions/arm_rfft_q31.c:211:
    
    first defined here

    So it's telling you that you have multiple definitions of arm_split_rfft_q31

    And it tells you that one definition is in the file TransformFunctions.o

    And the other definition is in the file arm_rfft_q31.c at line 211

     

    Now TransformFunctions.o is a pre-built binary file, and arm_rfft_q31.c is a C source file

     

    You need to choose either one or the other - you can't have both in your Project!