How to add arm_cfft_q31
I have a CubeMX generated project and need to made a FFT in Q31 format on a STM32F103RB nucleo board.
I have add this includes
#include <math.h>
#include 'arm_math.h'#include 'arm_const_structs.h'and add a defin ition for ARM_MATH_CM3
But as soon as I use
q15_t ADC_samples[2048];
arm_cfft_q15(&arm_cfft_sR_q31_len64, ADC_samples, 0, 1);I get this error:
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft '-D__weak=__attribute__((weak))' -DARM_MATH_CM3 '-D__packed=__attribute__((__packed__))' -DUSE_HAL_DRIVER -DSTM32F103xB -I'E:/Cartel_RGB/WS_F103/01_Cartel_F103/Inc' -I'E:/Cartel_RGB/Cartel_Lib' -I'E:/Cartel_RGB/WS_F103/01_Cartel_F103/Drivers/STM32F1xx_HAL_Driver/Inc' -I'E:/Cartel_RGB/WS_F103/01_Cartel_F103/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy' -I'E:/Cartel_RGB/WS_F103/01_Cartel_F103/Drivers/CMSIS/Device/ST/STM32F1xx/Include' -I'E:/Cartel_RGB/WS_F103/01_Cartel_F103/Drivers/CMSIS/Include' -Og -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF'Src/main.d' -MT'Src/main.o' -o 'Src/main.o' '../Src/main.c'
../Src/main.c:77:14: error: expected declaration specifiers or '...' before '&' token arm_cfft_q15(&arm_cfft_sR_q31_len64, ADC_samples, 0, 1); ^../Src/main.c:77:38: error: expected declaration specifiers or '...' before 'ADC_samples' arm_cfft_q15(&arm_cfft_sR_q31_len64, ADC_samples, 0, 1); ^../Src/main.c:77:51: error: expected declaration specifiers or '...' before numeric constant arm_cfft_q15(&arm_cfft_sR_q31_len64, ADC_samples, 0, 1); ^../Src/main.c:77:54: error: expected declaration specifiers or '...' before numeric constant arm_cfft_q15(&arm_cfft_sR_q31_len64, ADC_samples, 0, 1); ^make: *** [Src/main.o] Error 1Can some one explain how to add CMSIS-DSP lib to my project?
Thank