This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fopen function cannot be run

Hello
I am running a spi file I/O test. but I do not why I cannot process my fopen function. building target is good. please tell me if you hachar fileread(void) {

FILE *fp;//file pointer char readsample;
fp=fopen("C://work/firmware/0718_spi_fileio/Hello.txt","r");
//transfer file char to array
if(fp==NULL)//error;cannot find file { return(0); } else{ while ((readsample=fgetc(fp))!=EOF) { putchar(readsample); } fclose(fp); return(readsample); }
} ve any suggestion.