why this error occurs?what other headers or libraries required??
screen shot is included for your reference.
thank you
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
why this error occurs?what other headers or libraries required??
screen shot is included for your reference.
thank you
after building of following code for sine wave
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\DSK6713.h"
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\DSK6713_AIC23.h"
#include <math.h>
#define Fs 32000 // Sampling frequency in Hz
#define f 5000 // Frequency in Hz
#define pi ( ( double )3.1415927 )
#define Vm 12659//Peak value of sine wave with 79uV resolution, 12659 for 1Vpp
float x[Fs/1000]; // Fs/1000 is length of sequence
DSK6713_AIC23_Config config = { \
0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
0x00ff, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
0x00ff, /* 3 DSK6713_AIC23_LEFTHPVOL right channel headphone volume */ \
0x0011, /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ \
0x0000, /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ \
0x0000, /* 6 DSK6713_AIC23_POWERDOWN Power down control */ \
0x0043, /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ \
0x0081, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ \
0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ \
};
void main()
{ int n;
float b;
int N=Fs/f;
double theta =2*pi*f/Fs;
DSK6713_AIC23_CodecHandle hCodec;
DSK6713_init(); //Initialize board support library
hCodec = DSK6713_AIC23_openCodec(0, &config); //Open the codec
DSK6713_AIC23_setFreq(hCodec, 4); //Set the sampling rate at 32 kHz
for(n=0;n<N;n++)
x[n]=sin(theta * n);
while(1)
{
for ( n = 0 ; n < N ; n++ )
{
b=Vm*x[n];
while (!DSK6713_AIC23_write(hCodec, b));
while (!DSK6713_AIC23_write(hCodec, b));
}
}
}
i am getting following error while compilation of sinewave.c as
#10010 errors encountered during linking; "sine_wave.out" not built sine_wave
<a href="file:/D:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain sine_wave
unresolved symbol _MCBSP_open, first referenced in ../dsk6713bsl.lib<dsk6713_aic23_opencodec.obj>
unresolved symbol _MCBSP_start, first referenced in ../dsk6713bsl.lib<dsk6713_aic23_opencodec.obj>
why it is so? any other file to be included?? can any one give some solution to this error please
thank you
Hi Abishek,
I will do two things here. It seems like you need whatever library/support package is necessary for MCBSP. So I will move this post to the device forum for you.
However, once you find out which includes are missing .... this wiki topic will help give you some ideas of how to add these and correct them so you don't get unresolved symbols. If you feel you should have all you need, you can use this wiki to just double check everything is in the correct place.
http://processors.wiki.ti.com/index.php/Include_paths_and_options
Best Regards,
Lisa
MCBSP_open comes from the CSL. You will need to add the include path to the compiler options. You'll need to add the library to the project as well, either through the linker options or by adding the file directly to the project.
i think i have included the files for CSL. what else is missing?
have a look on screen shot.
I don't see a screenshot. If it's "unresolved symbol" then that's a linker error. That means you have not correctly added the library to your project.
i have added all required libraries as can be seen in screenshot.shall i re-attach any library? which one?
Here are instructions for attaching images. None of yours have shown up yet.
sorry for previous mails without snapshots. actually i directly pasted it but it didnt show up.
program that i am trying to execute is:
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\DSK6713.h"
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\DSK6713_AIC23.h"
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\bios\include\csl_mcbsp.h"
#include <math.h>
#define Fs 32000 // Sampling frequency in Hz
#define f 5000 // Frequency in Hz
#define pi ( ( double )3.1415927 )
#define Vm 12659//Peak value of sine wave with 79uV resolution, 12659 for 1Vpp
float x[Fs/1000]; // Fs/1000 is length of sequence
DSK6713_AIC23_Config config = { \
0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
0x00ff, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
0x00ff, /* 3 DSK6713_AIC23_LEFTHPVOL right channel headphone volume */ \
0x0011, /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ \
0x0000, /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ \
0x0000, /* 6 DSK6713_AIC23_POWERDOWN Power down control */ \
0x0043, /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ \
0x0081, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ \
0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ \
};
void main()
{ int n;
float b;
int N=Fs/f;
double theta =2*pi*f/Fs;
DSK6713_AIC23_CodecHandle hCodec;
DSK6713_init(); //Initialize board support library
hCodec = DSK6713_AIC23_openCodec(0, &config); //Open the codec
DSK6713_AIC23_setFreq(hCodec, 4); //Set the sampling rate at 32 kHz
for(n=0;n<N;n++)
x[n]=sin(theta * n);
while(1)
{
for ( n = 0 ; n < N ; n++ )
{
b=Vm*x[n];
while (!DSK6713_AIC23_write(hCodec, b));
while (!DSK6713_AIC23_write(hCodec, b));
}
}
}
please look the problem and find me a solution for same
Look in the project pane. There is dsk6713bsl.lib but there is not any CSL library. If you don't add the library then it is impossible for the linker to get those symbols...
thank you for the reply. it really solved my problem.
one small problem i am having now is to where to look the output??in which graph??
i am using CCS v5.1 and new to DSP processors.
please help me to see the output of program.
program for sine wave
#include <math.h>
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\dsk6713.h"
#include "C:\Users\abhi\Downloads\DSK6713\DSK6713\c6000\dsk6713\include\dsk6713_aic23.h"
#define SINE_TABLE_SIZE 96
#define PI ( ( double )3.1415927 )
#define SINE_MAX 0x7FFE //Peak value of sine wave
int sinetable[SINE_TABLE_SIZE];
DSK6713_AIC23_Config config = { \
0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
0x00ff, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
0x00ff, /* 3 DSK6713_AIC23_RIGHTHPVOL Right channel headphone volume */ \
0x0011, /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ \
0x0000, /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ \
0x0000, /* 6 DSK6713_AIC23_POWERDOWN Power down control */ \
0x0043, /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ \
0x0081, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ \
0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ \
};
void InitSineTable( void )
{
int i;
double increment= 0;
double radian = 0;
increment = ( PI * 2 ) / SINE_TABLE_SIZE;
for ( i = 0 ; i < SINE_TABLE_SIZE ; i++ )
{
sinetable[i] = ( int )( sin( radian ) * SINE_MAX );
radian += increment;
}
}
void main()
{
int i;
DSK6713_AIC23_CodecHandle hCodec;
DSK6713_init();
InitSineTable();
hCodec = DSK6713_AIC23_openCodec(0, &config);
DSK6713_AIC23_setFreq(hCodec, 7); //Sampling rate 96 kHz
while(1)
{
for ( i = 0 ; i < SINE_TABLE_SIZE ; i++ )
{
while (!DSK6713_AIC23_write(hCodec, sinetable[i]));
while (!DSK6713_AIC23_write(hCodec, sinetable[i]));
}
}
}