Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble linking CMSIS / using arm_rfft_fast_f32 #547

Open
malloyca opened this issue Nov 5, 2022 · 0 comments
Open

Trouble linking CMSIS / using arm_rfft_fast_f32 #547

malloyca opened this issue Nov 5, 2022 · 0 comments

Comments

@malloyca
Copy link

malloyca commented Nov 5, 2022

Hello,

I've had a lot of trouble trying to link and use arm_rfft_fast_f32. The problem seems to be centered around the arm_bitreversal2.S file.

At first it wasn't linking, but I finally got things to compile by adding:
C_SOURCES = $(wildcard ../../libDaisy/Drivers/CMSIS/DSP/Source/*/*.c)
ASM_SOURCES = $(wildcard ../../libDaisy/Drivers/CMSIS/DSP/Source/*/*.s)
to the makefile and changing the filename to arm_bitreversal2.s since the makefile doesn't handle files with ".S" instead of ".s".

The program seems to compile successfully at this point, but nothing gets passed through the FFT/IFFT no matter what I do. Even a simple program like this in the audio callback will only pass audio through the right channel and there's nothing on the left.

for (size_t i = 0; i < size; i++){
	fft_buf_256[i] = in[0][i];
}
arm_rfft_fast_f32(&fft_256, fft_buf_256, fft_buff_256_inner, 0);
arm_rfft_fast_f32(&fft_256, fft_buff_256_inner, fft_buf_256, 1);

for (size_t i = 0; i < size; i++){
	out[0][i] = fft_buf_256[i];
	out[1][i] = in[1][i];
}

I'm declaring the FFT instance with:
arm_rfft_fast_instance_f32 fft_256;
and initializing with in main() with:
arm_rfft_fast_init_f32(&fft_256, 256);.

Am I missing something? Is there any reason why the CMSIS FFT shouldn't be working at this point? Could arm_bitreversal2.s not be building or linking correctly for some reason? I've not really use makefiles before so I admit that I'm taking tips from forums and trying to hack a solution together. I'm completely at a loss for what to try next to get this to work. Thank you for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant