Tool/software: Code Composer Studio
Hi everyone, I got this error but I don't know what's wrong with my code. please help!
**** Build of configuration Debug for project try4 ****
"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
'Building target: try4.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.23/bin/cl6x" --abi=coffabi -g --display_error_number --diag_warning=225 --diag_wrap=off -z -m"try4.map" -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.23/lib" -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.23/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="try4_linkInfo.xml" --rom_model -o "try4.out" "./main.obj" "../C6713.cmd" -l"libc.a"
<Linking>
warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size
undefined first referenced
symbol in file
--------- ----------------
_length ./main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "try4.out" not built
>> Compilation failure
gmake: *** [try4.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****
Here is the code:
#include<stdio.h>
#include <math.h>
#include<signal.h>
void medianfilter(short* signal, int signalLength, short* output, int windowSize)
{
int i,j,k;
// Move window through all elements of the signal
for (i = 2; i < signalLength - 2; i++)
{
// Pick up window elements
float window[5];
for (j = 0; j < 5; j++)
{ window[j] = signal[i - 2 + j];
}
// Order elements (only half of them)
for (j = 0; j < 3; j++)
{
// Find position of minimum element
int min = j;
for (k = j + 1; k < 5; k++)
{ if (window[k] < window[min])
min = k;
}
// Put found minimum element in its place
float temp = window[j];
window[j] = window[min];
window[min] = temp;
}
// Get result - the middle element
output[i - 2] = window[2];
}
}
int main()
{
short inputSignal[102] = {0,2.8,3.24,5.374,5.2488,5.9049,6.3773,6.6962,7.8875,7.9736,6.9736,
7.9038,7.7783,6.6089,6.4055,6.1767,5.9297,6.6702,5.4034,6.1332,4.8631,4.5956,4.333,5.077,3.8288,
3.5895,3.3598,3.1401,2.9307,2.7319,2.5435,2.3654,2.1976,2.0396,1.8913,1.7522,1.622,1.5004,2.3868,
1.281,1.1825,1.0908,1.0057,0.92667,0.8534,0.78552,0.72268,0.66455,0.61082,0.56119,0.51538,0.47312,
0.43415,0.39825,0.36519,0.33476,1.3068,0.28101,0.25735,0.23561,0.21564,0.19731,0.18049,0.16506,0.15091,
1.1379,0.12606,0.11517,0.1052,0.096075,0.087721,0.080077,0.073084,0.066689,1.0608,0.055498,0.050614,0.046152,
0.042077,0.038354,0.034956,0.031854,0.029022,0.026438,1.0241,0.021931,0.01997,0.018182,0.016552,0.015066,
0.013712,0.012478,0.011353,0.010329,1.0094,0.0085466,
0.0077729,0.0070685,0.0064272,0.0058435,0.0053123,0.0048289};
int signalLength = length(inputSignal);
int windowSize3 =3; int windowSize5 = 5; int windowSize7 = 7;
short output3[102], output5[102], output7[102];
void medianfilter(short* inputSignal, int signalLength, short* output3, int windowSize3);
void medianfilter(short* inputSignal, int signalLength, short* output5, int windowSize5);
void medianfilter(short* inputSignal, int signalLength, short* output7, int windowSize7);
}