DSPRelated.com
Forums

Data transfer

Started by jayadevan June 2, 2006
hi
I am a student frm india.
I am doing a project of implementing image processing algorithm in CCS.the
hardware which i am working is DSK6711.
the first task which i had to do was to transfer the image into the SDRAM
of the h/w.

The code is:
#include<stdio.h>
#include<math.h>
main()
{
 unsigned char *red,*green,*blue;
 int i;
 FILE *fp;
 red=(unsigned char*)0X80001000;
 green=(unsigned char*)0X80003710;
 blue=(unsigned char*)0X80005e20;
 printf("Beginning to read RAW file");
 fp=fopen("apple1.RAW","rb");
 for(i=0;I<10000;i++)
  {
   *red=fgetc(fp);
   red++;
   *green=fgetc(fp);
   green++;
   *blue=fgetc(fp);
   blue++;
  }
fclose(fp);
printf("Image reading completed");
}

The code is compiled and built in CCS there is no error nor warnings.
But even the line 

printf("Beginning to read RAW file");

is not executing.
plz help me by sugesting new ways or providing any another code for the
same.



 




 

jayadevan wrote:
> But even the line > > printf("Beginning to read RAW file"); > > is not executing.
The printf in many libraries written for embedded systems (perhaps non-embedded as well) buffer the characters for output until it hits a newline. Thus, nothing is output to the device until it finds a '\n' character in the stream. Try: printf("Beginning to read RAW file\n"); ^^ and see if that helps with your debug. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (603) 226-0404 x536 The secret to enjoying your job is to have a hobby that's even worse - Calvin's Dad