Search code examples
carmsignal-processingcortex-mcmsis

arm_rfft_init_q31: how is the cfft member initialized?


Trying to use some old code with a current CMSIS DSP library. Old code:

const unsiged fftlen=128;
arm_cfft_radix4_instance_q31 forward_cfft_instance = {0};
arm_rfft_instance_q31 forward_rfft_instance = {0};
arm_rfft_init_q31(&forward_rfft_instance, &forward_cfft_instance,fftlen, 0, 1);

The compiler tells me that the function arm_rfft_init_q31 does not accept my 2nd parameter, (_cfft_), anymore, in the current version of the DSP lib.

Since the rfft struct still has a pointer to a cfft instance, I wonder how this pointer is initialized these days?

I tried to find a relevant changelog entry that explains this to me, so far without luck.


Solution

  • Looking at the source (I did not know it was available) I find that the initialization function inserts a pointer to a global constant cfft struct that is apparently linked into the binary as needed.