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

wansuiye604 2012-04-12 10:28:28
在CCS上调试一个语音算法的代码(.c,.h),用的simulator模式,编译链接完毕以后,将声场的.out文件load以后在运行,就会提示:
Error:Illegal opcode (XXXX) at pc= 0x0000000c Illgal opcode at pc =0x0000000c和
Error:SIM may not be in stable,Advisable to correct the error before running这样类似的警告

下面是我尝试只测试打开语音的代码,也出现了相同的问题,不知道什么原因,可能是程序或是设置或是cmd文件,跪谢各位了,全部分奉上

int main( )
{
p563Results_struct tResults = {-1};


short int * speech_samples; /* Array of speech samples */
INT32 file_length; /* Number of samples in speech file */
INT32 num_read; /* number of elements read from file */

float h=0;
char pSpeechFilename[100];
char * argv[]={"dg105.wav"};

FILE *speech_file;
int PartitionNumber;
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 speech samples 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);

if(num_read != file_length)
{
printf( "Unable to read all the data from file\n" );
exit(-1);
}
printf("num_read=%d",num_read);
return 0;
}
...全文
694 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
coldsnow3 2012-07-28
  • 打赏
  • 举报
回复
堆栈 设置的足够大吗
Daisy_Sun 2012-07-27
  • 打赏
  • 举报
回复
同问!!环境是好的!
bjtea 2012-04-22
  • 打赏
  • 举报
回复
先用开发板随机带的例子编译、下载和运行,检验一下仿真环境是否已经正确搭好。
nuaamkx 2012-04-21
  • 打赏
  • 举报
回复
应该不是你源代码的问题,可能是哪里设置有误,GEL文件或者CMD文件。。。
net_friends 2012-04-16
  • 打赏
  • 举报
回复
这个还是自己慢慢debug

2,425

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 其他硬件开发
社区管理员
  • 其他硬件开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧