gcc - Calling fftR4() in c from assembly -


i trying asm fft implementation www.embeddedsignals.com work. running make gives error:

undefined reference fftr4(short*, short*, int) 

at top of asm have

.syntax unified .thumb .global fftr4   .type   fftr4, %function 

and there #define's associate c functions arguments registers followed macros fftr4 function uses. after that, fftr4 called

    .thumb_func fftr4:   stmfd   sp!, {r4-r11, lr}     mov     tmp0, #0            // bit reversed counter     mov     tmp1, #0     .word 0xf3a2fa92  //rbit r3,r2  //rbit r,n lsl     r,#3 

and c code follows:

void fftr4(short *y, short *x, int n);  short x[512];  short y[512];  int i;  void loop() {     (i=0;i<512;i++) x[i]=0;     (i=0;i<512;i=i+8)     { x[i+0]=16384; x[i+2]=16384;   x[i+4]=-16384;  x[i+6]=-16384;}      fftr4(y, x, 256);      serialusb.println(y[128]);     serialusb.println(y[129]);     serialusb.println(y[384]);     serialusb.println(y[385]);      // expected results:     //y[128]is 8191; y[129] -8190   y[384]is 8191; y[385]is 8191      //z[2n] 64 64 -64 -64 ..  z[2n+1] 0    +- 1 (noise)     while(1); } 

what needs done make fftr4 recognizable c file?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

.htaccess - Matching full URL in RewriteCond -