Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI C/C++ Compiler
Dear experts,
I have in trouble with using fopen function.
I'm trying to change flash writer not to use MMCSD. so I need to change the file open path from sd card to C drive.
But when I open the file, it returns NULL.
file type doesn't matter. bin and txt returns NULL. I also suspected wrong file path and folder permission but it doesn't work.
this is my environments.
AP: am437x
CCS Version: 6.1.2.00015
SDK: sysbios_ind_sdk_02.01.03.02
compiler: GNU v4.8.4 (Linaro)
REF project: qspi_app_flash_writer C:\ti\sysbios_ind_sdk_02.01.03.02\sdk\starterware\examples\qspi\flash_writer
file located in c:/flash/boot, and boot.txt for testing.
I just add stdio.h. Even though it is simple file operation as below, I have any clue to solve it.
if( (fp = fopen("C:\\flash\\boot","rb")) == NULL)
{
CONSOLEUtilsPrintf("\r\n 1. Unable to open file %s \r\n", fileName);
status = E_FAIL;
}
else
CONSOLEUtilsPrintf("\r\n 1. success \r\n");
if( (fp = fopen("C:\\flash\\boot.txt","r")) == NULL)
{
CONSOLEUtilsPrintf("\r\n 7. Unable to open file %s \r\n", fileName);
status = E_FAIL;
}
else
CONSOLEUtilsPrintf("\r\n 7. success \r\n");
Both operation return NULL.
Please give any guide.
Best Regards,
Jay.