2019-01-30 04:34 PM
I got the latest CMSIS from github and tried using the DSP code on a STM32H743ZI chip. I call three APIs which are:
The code compiles fine with GCC but when it comes time to link I get a 'undefined reference to arm_bitreversal_32' error which is used in the arm_cfft_f32() call. I've been all over the internet and tried many things, none of which worked. The short list of things I've tried is:
Has anyone gotten GCC to link CMSIS DSP and run any FFT related code? I assume there are some compiler switches I'm missing, all of the files are there it just won't link. It seems many people all over the internet have had this problem and each 'solution' seems to be hyper tailored to that individual.
Not that this should make a difference but I'm developing my code in Visual Studio 17 with the VisualGDB plugin with my project being of type Embedded.
Solved! Go to Solution.
2019-01-31 09:55 AM
The issue was that MSBuild in VS2017 was ignoring the arm_bitreversal2.S file and not even bothering to compile it. To fix this issue I did the following:
Simple fix that solved all of my problems.
2019-01-30 04:47 PM
Ok so focus on making a function that's visible to the linker.
Why isn't arm_bitreversal2.S getting built? Makefile looking for *.s vs *.S ?
Why doesn't arm_bitreversal2.o contain an exportable symbol form of arm_bitreversal_32 ?
Look at the listing file. Look at the object via an objcopy type disassembly
If you can't figure out the why, how about explicitly putting the code in startup.S that you know the assembler is building.
2019-01-30 10:16 PM
> Has anyone gotten GCC to link CMSIS DSP and run any FFT related code? I assume there are some compiler switches I'm missing, all of the files are there it just won't link. It seems many people all over the internet have had this problem and each 'solution' seems to be hyper tailored to that individual.
I have used CMSIS DSP code, and especially the FFT functions, several times.
And since I use Crossworks which is not directly supported by ST's examples, I had to re-make every example, adding all the resources manually.
Is the respective source file really part of your project ?
Check the source for "suspicious" defines. The DSP code used to differ between M0, M3 and M4 variants.
2019-01-31 09:55 AM
The issue was that MSBuild in VS2017 was ignoring the arm_bitreversal2.S file and not even bothering to compile it. To fix this issue I did the following:
Simple fix that solved all of my problems.