本人新手,在CCS上进行512X512图像的小波变换,编译链接都正确,但是load数据运行时发生以下错误
Error: Illegal opcode (422a0000) at pc = 0x00000004 Illegal opcode at pc = 0x00000004
在线跪求哪位大神能帮忙看看,提提意见,感激涕零!!!
主程序如下:
main.cpp
#include<stdio.h>
#include<math.h>
#define bmpwidth 512
#define bmpheight 512
#define width 511
#define height 511
#define pi 3.1415926
void dwt_harr_1d(float *f,int n,int r);
void dwt_harr_2d(float *f,int r);
void dwt_harr_2d_abnormal(float *f,int r);
int main(void)
{
unsigned char *imbuf;
unsigned char *bmpout;
imbuf=(unsigned char *)0x84000000;
bmpout=(unsigned char *)0x85000000;
float *f=(float *) 0x90000000;
int x,y;
for(x=0;x<bmpwidth;x++)
{
for(y=0;y<bmpheight;y++)
{
f[y*bmpwidth+x]=(float)imbuf[y*bmpwidth+x];
}
}
dwt_harr_2d(f,1);
//一下对系数处理用bmp输出
// bmpout=new unsigned char[width*height];
for(x=0;x<width;x++)
{
for(y=0;y<height;y++)
{
bmpout[y*width+x]=(unsigned char)fabs(f[y*width+x]);
}
}
return 0;
}
C64xx_cov_lnk.cmd如下
-c
-heap 5000
-stack 5000
MEMORY
{
ON_CHIP : origin = 00000000h length = 00100000h
EMIFA_CE0 : origin = 80000000h length = 10000000h
EMIFA_CE1 : origin = 90000000h length = 10000000h
}
SECTIONS
{
.text > ON_CHIP
.stack > ON_CHIP
.bss > ON_CHIP
.cinit > EMIFA_CE1
.cio > EMIFA_CE0
.const > ON_CHIP
.data > ON_CHIP
.switch > ON_CHIP
.sysmem > ON_CHIP
.far > EMIFA_CE0
}