CMSIS DSP Errors

Hi,
I am using the arm_math.h library to build my first FFT spectrum analyser. I’ve used the instructions in this thread too import the mbed-dsp libraries. When I compile my program, it fails at 12% with the following message:

[Error] main.cpp@78,5: no matching function for call to ‘arm_rfft_fast_f32’
[ERROR] .\main.cpp:78:5: error: no matching function for call to ‘arm_rfft_fast_f32’
arm_rfft_fast_f32(&fft_handler, &FFT_inputBuffer, &FFT_outputBuffer, 0);
^~~~~~~~~~~~~~~~~
./mbed-dsp/cmsis_dsp\arm_math.h:2233:6: note: candidate function not viable: no known conversion from ‘float (*)[2048]’ to ‘float32_t *’ (aka ‘float *’) for 2nd argument; remove &
void arm_rfft_fast_f32(
^
1 error generated.

This is a curious error as when I begin to type “arm_rfft…” MBED Studio offers an auto fill as such : “arm_rfft_fast_f32(arm_rfft_fast_instance_f32 *S, float32_t *p, float32_t *pOut, uint8_t ifftFlag)” , which suggests that there is indeed a function of that name and parameters included in my program. The compiler also seems to not like my use of pointers, suggesting that I remove the ‘&’. Following this advice, I am still met with the following erros:

[Error] main.cpp@78,5: no matching function for call to ‘arm_rfft_fast_f32’
[ERROR] .\main.cpp:78:5: error: no matching function for call to ‘arm_rfft_fast_f32’
arm_rfft_fast_f32(fft_handler, FFT_inputBuffer, FFT_outputBuffer, 0);
^~~~~~~~~~~~~~~~~
./mbed-dsp/cmsis_dsp\arm_math.h:2233:6: note: candidate function not viable: no known conversion from ‘arm_rfft_fast_instance_f32’ to ‘arm_rfft_fast_instance_f32 *’ for 1st argument; take the address of the argument with &
void arm_rfft_fast_f32(
^
1 error generated.

I have posted my code on GitHub so that you may have a closer inspection of my work.

Many thanks,
Andy

You almost got there… try changing

arm_rfft_fast_f32(fft_handler, FFT_inputBuffer, FFT_outputBuffer, 0);

to

arm_rfft_fast_f32(&fft_handler, FFT_inputBuffer, FFT_outputBuffer, 0);

The pain of coming so close yet still being so far on my attempt is real! Thank you for your help, your recommendation worked wonderfully and compiled without any issues, now I can start debugging :slight_smile: