Part Number: TMS320C5517
Tool/software: TI C/C++ Compiler
Hello,
I am trying to use the HWA FFT in the C5517 of the DSP Shield (https://web.stanford.edu/group/kovacslab/cgi-bin/index.php?page=dsp-shield
<Linking> undefined first referenced symbol in file --------- ---------------- hwafft_8pts(long *, long *, unsigned short, unsigned short) main.obj hwafft_br(long *, long *, unsigned short) main.obj error: unresolved symbols remain error: errors encountered during linking; "main.out" not built
-stack 0x2000 /* PRIMARY STACK SIZE */
-sysstack 0x1000 /* SECONDARY STACK SIZE */
-heap 0x6400 /* HEAP AREA SIZE */
MEMORY
{
PAGE 0:
VEC(RWX) : origin = 0000100h length = 000200h
DATA0(RWX) : origin = 0000300h length = 05D00h
DATA1(RWX) : origin = 0006000h length = 0A000h
SARAM0(RX) : origin = 0010000h length = 038000h
SARAM1(RW) : origin = 0048000h length = 002000h
SARAM2(RW) : origin = 004A000h length = 002000h
SARAM3(RW) : origin = 004C000h length = 002000h
SDRAM(RW) : origin = 0050000h length = 800000h
}
SECTIONS
{
vectors : > VEC ALIGN = 256
.text : > SARAM0 ALIGN = 4
.data : > SARAM0
.cinit : > SARAM0
.switch : > SARAM0
.stack : > DATA1
.sysstack : > DATA1
.bss : > SARAM0 , fill =0
.sysmem : > DATA1
.const : > SARAM0
.cio : > SARAM0
.extmem : > SDRAM
USB_buffer1 : > SARAM1
USB_buffer2 : > SARAM2
USB_buffer3 : > SARAM3 , fill =0
GROUP: align(32)
{
.const:twiddle32
.const:twiddle
audio_buffers
fft_buf
} > DATA0
}
/* HWAFFT Routines ROM Addresses */
/* C5517 (Phoenix 2.1) */
_hwafft_br = 0x00fefefc;
_hwafft_8pts = 0x00feff10;
_hwafft_16pts = 0x00feffff;
_hwafft_32pts = 0x00ff0155;
_hwafft_64pts = 0x00ff045e;
_hwafft_128pts = 0x00ff05f3;
_hwafft_256pts = 0x00ff0804;
_hwafft_512pts = 0x00ff0a02;
_hwafft_1024pts = 0x00ff0c7c;
#include "tistdtypes.h"
#include "hwafft.h"
const int FFT_LEN = 64;
Int32 data[2 * FFT_LEN] = {0};
Int32 scratch[2 * FFT_LEN] = {0};
Int32 data_br[2 * FFT_LEN] = {0};
Uint16 fft_flag;
Uint16 scale_flag;
Uint16 out_sel;
Int32 *result;
int main( void )
{
fft_flag = FFT_FLAG;
scale_flag = SCALE_FLAG;
// data = <1024-point Complex input>;
/* Bit-Reverse 1024-point data, Store into data_br, data_br aligned to
12-least significant binary zeros*/
hwafft_br(data, data_br, DATA_LEN_1024); /* bit-reverse input data,
Destination buffer aligned */
/* Compute 1024-point FFT, scaling enabled. */
out_sel = hwafft_8pts(data_br, scratch, fft_flag, scale_flag);
if (out_sel == OUT_SEL_DATA)
{
result = data;
}
else
{
result = scratch;
}
}