Discussion in "ARM Development" started by    gaza2k1    Feb 26, 2008.
Tue Feb 26 2008, 06:47 pm
#1
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:-

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
#2
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

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am