Search code examples
cfftcortex-mcmsis

How to link arm_cortexM4l_math.lib in Openstm32


I've included CMSIS_5 library, but I don't know how to link arm_cortexM4l_math.lib to my stm32 project for FFT.

My board is stm32f407-DISCOVERY and I'm using Openstm32.


Solution

  • Problem was resolved in a few simple steps.

    I noticed that when I create a project, I can choose to export options for separated directory of standard stm32 peripherals.

    1. Select export to a separate directory of standard stm32 libraries. (When I chose this solution, showed two folders next to my project: stm32f407_stdperiph_lib and STM32F4xx_DSP_StdPeriph_Lib_V1.8.0)

    2. stm32f407_stdperiph_lib was linked immediately after the project was created.

    3. STM32F4xx_DSP_StdPeriph_Lib_V1.8.0 - This library is only added next to my project directory, but wasn't linked

    4. Link to STM32F4xx_DSP_StdPeriph_Lib_V1.8.0:

    5. In PropertiesSettingsMCCC GCC CompilerIncludes

    6. I added:

      "$ {Workspace_loc: /STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS  /Device/ST/STM32F4xx/}
      "$ {Workspace_loc: /STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/}"
      "$ {Workspace_loc: /STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/CMSIS/DSP_Lib/Source/}"
      
    7. Add preprocessor in MCCC GCC Compiler:

      • In PropertiesSettingsMCCC GCC CompilerPreprocessor

    add ARM_MATH_CM4

    1. Copy the whole Source directory from DSP_Lib to the src directory of the project

    2. Build