打印

CCS调试时遇到的小问题 憋了好多天了 跪谢各位

[复制链接]
1968|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
wansuiye|  楼主 | 2012-4-12 11:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
CCS上调试一个语音算法的代码(.c,.h),用的6446 simulator模式,编译链接完毕以后,将声场的.out文件load以后在运行,就会提示:
Error:Illegal opcode (XXXX) at pc= 0x0000000c  Illgal opcode at pc =0x0000000c

  Error:SIMmay not be in stable,Advisable to correct the error before running这样类似的警告

下面是我尝试只测试打开语音的代码,也出现了相同的问题,不知道什么原因,可能是程序或是设置或是cmd文件,跪谢各位了,全部分奉上
int main( )
{
short int * speech_samples; /* Array of speechsamples */
INT32 file_length;/* Number of samples in speech file */
INT32 num_read; /*number of elements read from file */
charpSpeechFilename[100];
  char *argv[]={"dg105.wav"};
FILE *speech_file;
  intPartitionNumber;
FLOAT PredictedMos;
strcpy(pSpeechFilename,argv[0]);
/* open speech file*/
if((speech_file =fopen(pSpeechFilename, "rb")) == NULL )
{
printf("Cannot open file %s\n", pSpeechFilename ) ;
exit(-1) ;
}
/* Read speechsamples from file */
fseek(speech_file,0 , SEEK_END) ;
file_length =(ftell(speech_file))/(sizeof(short int)) ;
fseek(speech_file,0 , SEEK_SET) ;
speech_samples =(short int *)calloc(file_length, sizeof(short int)) ;
num_read =fread(speech_samples, sizeof(short int), file_length, speech_file);

printf"num_read=%d",num_read;
  return 0;
}

相关帖子

沙发
wansuiye|  楼主 | 2012-4-13 12:12 | 只看该作者
没人知道吗。。。

使用特权

评论回复
板凳
五谷道场| | 2012-4-13 19:38 | 只看该作者
芯片是哪个型号啊,CCS是哪个版本?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

2

帖子

0

粉丝