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.

c6678 不能load memory?

您好,

C6678  ccsv5.5  XDS100v1  win10

我最近做图像处理的东西,想要把图像放入DSP进行处理。想要将图像.dat文件load memory,但是一直提示NSL报错。不知道是哪里的原因,请帮忙解答,谢谢。

下面是我读入图像的代码:

int main()
{

FILE *fid;
fid = fopen("E:\\ccs_workspace\\fast_rx_s_2\\test_double.dat", "rb");
if (fid == NULL)
{
printf("error on open file!\n");
}
printf("test console!\n");
double num[3];
fread(&num, sizeof(double), 3, fid);
int H = num[0];
int W = num[1];
int Dim = num[2];
double *pos = (double*)malloc(sizeof(double)*H*W*Dim);
//fread(pos, sizeof(double), H*W*Dim, fid);
//fclose(fid);

return 0;

}

想要在将数据读入pos作处理,但fread很慢,load memory 一直报错,是什么原因?谢谢