Hi, TI
I have questions about how to use fopen function to write the data to a file.
I use IAR on the board MSP430f5438a.
In the project i have data to watch and i need to put them into a file.txt.
This is my code in Main function :
FILE *pFile ;
while((pFile = fopen("D:\\record.txt","w")) == NULL) ;
led_off(0) ;
//fwrite((char*)pucCC3000_Rx_Buffer, sizeof(char), 10, pFile) ;
//fprintf(pFile, "%d\n", 444) ;
//putc(pucCC3000_Rx_Buffer[0], pFile) ;
fwrite(pucCC3000_Rx_Buffer, sizeof(char), 10, pFile) ;
fclose(pFile) ;
At the first step i have a headache probelem that i cant creat and open the file record.txt. I cant find it in the path D.
i have tried to change the parameters in my project and it dosent work. The Header stdio.h i have added it.
The programm wait always in the while loop and pFile is always NULL.
Could someone help me or give me a guide ?
Thanks a lot for helping me