Opening a file located on host pc
Discussion in "ARM Development" started by gaza2k1 Feb 26, 2008.
Tue Feb 26 2008, 06:47 pm
Hi all,
Im in the final stages of a project and have hit a big glitch need your help! please
I have the arm evaluator 7t connected to a pc running metrowerks codewarrior.
I am trying to open a text file hosted on the pc hard drive
When i try and run my code in the emulator mode (armul) the code works fine the file is found and ll is well. However when i run the same code on the arm board it runs and says it cant find the file. The code in question is:-
any ideas??? thanks
Im in the final stages of a project and have hit a big glitch need your help! please
I have the arm evaluator 7t connected to a pc running metrowerks codewarrior.
I am trying to open a text file hosted on the pc hard drive
When i try and run my code in the emulator mode (armul) the code works fine the file is found and ll is well. However when i run the same code on the arm board it runs and says it cant find the file. The code in question is:-
FILE *file_ptr; int address[2014], value[2014], i, j; file_ptr = fopen("M:\\Documents\\final project local\\book1.txt","rt"); if (file_ptr !=NULL) { printf("settings file found\n"); for (i = 0; i < 2014; i++) { fscanf(file_ptr,"%x",&address[i]); } fclose(file_ptr); } else printf("file not found\n"); }
any ideas??? thanks
[ Edited Wed Feb 27 2008, 12:02 am ]
Wed Apr 16 2008, 06:34 am
well the function calling seems ok..
some more details wud have been better... cud u give a little more insight of the system?
which uart are u using hope u r using uart1 instead of uart0... u will nwwd the right handshaking to read the file properly also
M:\\Documents\\final project local\\book1.txt is a long enough address try
something shorter and without spaces in between
ex k:\\project\\test.txt
plz check n reply
:bye
some more details wud have been better... cud u give a little more insight of the system?
which uart are u using hope u r using uart1 instead of uart0... u will nwwd the right handshaking to read the file properly also
M:\\Documents\\final project local\\book1.txt is a long enough address try
something shorter and without spaces in between
ex k:\\project\\test.txt
plz check n reply
:bye
Powered by e107 Forum System