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.

the CIO buffer error



I want to read 5000 date from the file using the i/o function on the dsp 28335  in ccs3.3.but when the dsp reads the 4134th date, then an error appears .the main source code and the error is as follows:

 

The main source code :

fid = fopen("ztq.txt","r-");               ////open the file

setvbuf(fid,Sting,_IOFBF, sizeof(Sting));    ////set the buffer

  while(i!=5000)                     ////read the file

  {

   fscanf(fid,"%d",&ko);

   ab[i++]=ko;

  }

  fclose(fid);

 

the error:

The CIO command cmd:(255) in the CIO buffer at address (0xf000) was not recognize d. Please check the device and program memory maps.

The CMD file refered  by the error:

 

MEMORY

{

PAGE 0 :

PAGE 1 :

  RAML7      : origin = 0x00F000, length = 0x001000

}

 

SECTIONS

{

   .cio             : > RAML7,     PAGE = 1

}

The device and program memory maps refered  by the error:.

SECTION ALLOCATION MAP{

.cio       1    0000f000    00000120     UNINITIALIZED

             0000f000    00000120     rts2800_fpu32.lib : ankmsg.obj (.cio)

}

My question:

Why does it generates an error? What’s more, why can it read 4134 date and why  can’t  the other date be read?

Thank you for your answer.