Problem with the CMSIS DSP Library
Answer
10/16/15 8:55 AM
Hi,

I'm currently trying to conduct a FFT on my XDK with some sample data. I'm planning to use the CMSIS DSP Library. The "arm_math.h" is available through "SDK\lib\EMLib\CMSIS\Include". When calling a FFT-function, I get an undefined reference error.

Could someone tell me, which file(s) I have to include through "Project" > "Properties" to get the FFT working?
Thanks for your help.

Andreas
0 (0 Votes)
Problem with the CMSIS DSP Library
Answer
10/16/15 9:41 AM as a reply to Andreas F..
Hi Andreas,

could you please provide us with some sample code and links to the Library you are trying to use so we can try to reproduce your problem.

Could someone tell me, which file(s) I have to include through "Project" > "Properties" to get the FFT working? 

You got the toolchain included, right?

- Florian

0 (0 Votes)
Problem with the CMSIS DSP Library
Answer
10/21/15 9:32 AM as a reply to Florian Harr.
Hi Florian,

here is my sample code:

/* system header files */
#include <stdint.h>
/* additional interface header files */
#include "OS_operatingSystem_ih.h"
/* own header files */
#include "APT_appTemplate_ih.h"
#include "APT_appTemplate_ch.h"

#define ARM_MATH_CM3
#include "arm_math.h"

void SSU_initSystem(OS_timerHandle_tp xTimer)
{
    (void) (xTimer);

    arm_rfft_fast_instance_f32 S;
    unsigned long FFTLENGTH = 32;
    arm_rfft_fast_init_f32(&S, FFTLENGTH);
    
     /*float32_t FFTINPUT[32] = {
             0.0000,0.7325,1.2266,1.3377,
             1.0687,0.5649,0.0503,-0.2655,
            -0.2707,0.0090,0.4299,0.7984,
            0.9558,0.8447,0.5287,0.1580,
            -0.1000,-0.1349,0.0608,0.3922,
            0.7072,0.8641,0.7908,0.5114,
            0.1293,-0.2222,-0.4373,-0.4781,
            -0.3798,-0.2235,-0.0898,-0.0196};
     float32_t FFTOUTPUT[16] = {0.0};*/                    /*sample data for testing*/    
     
     /*arm_rfft_fast_f32(&S,&FFTINPUT,&FFTOUTPUT,0);*/    /*execute the FFT*/
}

I downloaded the CMSIS DSP Library (http://www.keil.com/pack/doc/CMSIS/DSP/html/index.html), included the provided .h files and linked the library ("libarm_cortexM3l_math.a" is provided for GCC; also tried the "arm_cortexM3l_math.lib") through the project properties. I also changed the toolchain to use GCC Complier and GCC Linker. I tried different combinations of the toolchain, included paths (e.g. excluding the "arm_math.h" from \SDK\lib\EMLib\CMSIS\Include\) etc. However, I always get the "undefined reference to `arm_rfft_fast_init_f32'" error,

How do I properly include the library?
Thanks for your help.

Andreas

--
The Libraray can be downloaded here:
http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php?tab=Download+CMSIS

0 (0 Votes)
Problem with the CMSIS DSP Library
Answer
10/27/15 1:20 PM as a reply to Andreas F..
Andreas, 

from what I've looked up, it looks like you must be missing a header.

Anyway, to get that library, I had to register and wait for activation to actually get the library.

Once I have it, I'll update my response here.

- Florian
0 (0 Votes)