2

I am trying to calculate FFT on the stm32f4

The first errors I got were:

/home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:111: undefined reference to `arm_cfft_radix4_init_f32'
/home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:114: undefined reference to `arm_cfft_radix4_f32'
/home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:117: undefined reference to `arm_cmplx_mag_f32'
/home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:120: undefined reference to `arm_max_f32'

So I Thought I need to link the library because in the include files there are only .h files.

The libraries are in the same root folder so, the .h files (arm_math.h and core_cm4.h) are in the folder:

/home/mennesker/Workspace/stm/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Include/

The library arm_cortexM4b_math.lib is in folder:

/home/mennesker/Workspace/stm/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Lib/ARM/

I tried many different variantions of paths where to put the library to link with using -l arm_cortexM4b_math.lib as linker option or -l <path to file> /arm_cortexM4b_math.lib

But I still get the error:

/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find -larm_cortexM4b_math.lib

I don't know where the linker looks and how this linking really works

MVT
  • 137
  • 8
  • Use -L to set the library search path, -l to specify a library name – Sami Kuhmonen Mar 12 '16 at 13:09
  • Thank you for your answer, I tried that with the different cases of specifiing where the file is but than it gives an ld error and than the same undefined references – MVT Mar 12 '16 at 14:07

0 Answers0