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.

[参考译文] CCS/SECDEVTOOL-OMAPL138C6748:lcdk6748

Guru**** 2524550 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/817794/ccs-secdevtool-omapl138c6748-lcdk6748

器件型号:SECDEVTOOL-OMAPL138C6748

工具/软件:Code Composer Studio

我不熟悉 CCS。 我尝试执行循环卷积。

这是程序。

#include

int m、n、x[30]、h[30]、y[30]、i、j、temp[30]、k、x2[30]、a[30];

void main()

printf ("输入第一个序列的长度\n");
scanf("%d",&m);
printf ("输入第二个序列的长度\n");
scanf("%d",&n);
printf ("输入第一个序列\n");
for (i=0;<m;i++))

scanf ("%d"、&x[i]);

printf ("输入第二个序列\n");
对于(j=0;<n;j++)

scanf ("%d"、.h[j]);

if ((m-n)!=0)

if (m>n)(如果(m>n)

for (i=n;<m;i++)
h[i]=0;
N=m;

for (i=m;<n;i++)
X[i]=0;
M=n;

Y[0]=0;
a[0]= h[0];
for (j=1;<n;j++)
a[j]=h[n-j];

for (i=0;<n;i++))
y[0]+=x[i]*a[i];
对于(k=1;4、000 <n;k++)

y[k]=0;/*循环移位*/
for (j=1;<n;j++)
X2[j]=a[j-1];

X2[0]=a[n-1];
for (i=0;<n;i++))

a[i]=x2[i];
y[k]+=x[i]*x2[i];


printf ("循环卷积为\n");
for (i=0;<n;i++))
printf ("%d\t"、y[i]);

我遇到错误, #171需要声明

以及其他两个。

这是控制台

****为项目 cir_conv 构建配置调试****

"e:\\ccs\\ccsv7\\utils\\bin\\gmake"-k -j 2 all -O

'生成文件:"./main.c"'
'调用:C6000编译器'
"e:/CCS/ccsv7/tools/compiler/ti-cgt-c6000_8.2.2/bin/cl6x -mv6740 --include_path="C:/Users/DSP/workspace_v7/cir_conv --include_path="E:/CCS/ccsv7/tools/compiler/ti-cgt-c6000_8.2.2/include --define=C6748 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependence="main.d_raine.c"。

>>编译失败
subdir_rules.mk:9:目标'main.obj'的配方失败
"./main.c"、第40行:错误#171:需要声明
"./main.c"、第42行:错误#171:需要声明
"./main.c"、第49行:警告#12-D:解析在上一个语法错误后在此处重新启动
"./main.c"、第50行:错误#171:需要声明
"./main.c"、第56行:警告#12-D:解析在上一个语法错误后在此处重新启动
"../main.c"、第57行:错误#171:需要声明
"../main.c"、第59行:错误#171:需要声明
在编译"../main.c"时检测到5个错误。
gmake:***[main.obj]错误1.
gmake:目标"全部"不会由于错误而重新生成。

****构建完成****

我们非常感谢您的任何建议。

谢谢你。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大括号({}个字符)不平衡。  这个...

    [引用 user="Ria George]]for (j=1;<n;j++)
    a[j]=h[n-j];
    }[/报价]

    (笑声) 与 main 开始处的大括号匹配。  那么、后面的所有代码都在函数之外。   

    我建议您咨询附近的 C 专家来向您展示。  许多文本编辑器具有用于检查语法详细信息(如平衡大括号)的内置功能。

    谢谢、此致、

    乔治