cancel
Showing results for 
Search instead for 
Did you mean: 

CMSIS-DSP rfft init throwing an error

NicRoberts
Senior II

STM32WB55

arm_rfft_fast_instance_f32 fft_instance;
arm_rfft_fast_init_f32(&fft_instance, NUM_SAMP);


I'm trying to use the rfft_fast function from the arm_math.h library

But when I compile I get...

 

../STM32_WPAN/App/custom_app.c:122:24: error: expected declaration specifiers or '...' before '&' token
122 | arm_rfft_fast_init_f32(&fft_instance, NUM_SAMP);
| ^
../STM32_WPAN/App/custom_app.c:69:25: error: expected declaration specifiers or '...' before numeric constant
69 | #define NUM_SAMP 256

 

I looked at the docs & many examples of the init function, the usage is always as above. Compiles fine if I comment out the init function but obviously that is of no use to me.

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

You can't call functions directly like this at the global scope. This needs to be within a function such as main().

If that's not it, include the full custom_app.c file that throws this error.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Super User

You can't call functions directly like this at the global scope. This needs to be within a function such as main().

If that's not it, include the full custom_app.c file that throws this error.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks, getting lost in my own code here...