I am using the 'Arm Workbench IDE 4.0'. And I can compile the file access functions
like Following. But when run the image using the 'RealView Debugger v4.0', I can't
find out the xxx.txt file withing the system and ARM tool's directory.
FILE *pFile=NULL;
pFile = fopen(50, (char*)"c:\\temp\\xxx.txt", "wt"); // 50 is file identifier
rv=ferror(pFile);
rv=fprintf(pFile, "test\n");
if(pFile){
fclose(pFile);
pFile = NULL;}
I could have used the 'printf' with debugger tool's stdio so I think that there may be method for file management.
Can I use the file management functions?
And if so how?
Actually above code is obtained from some website. But it can be compiled and pFile pointer value is non-NULL when I confirm with debugger.
But I can't find the file location of xxx.txt. The problem is how can I access the host file system with RVDS. With firmware itself, verification
process is too hard for that the memory space is too short.
How can I access the host file system with RVDS firmware?
Does your build give any warnings? Does your actual code have #include <stdio.h>?
If you rebuild after removing the '50,' and changing "wt" to "w" and are running under the debugger on a Windows host and C:\temp exists, then I expect your image to create C:\temp\xxx.txt on the host.
Thank you! As your answer, it's working. Thank you very much!!!