12-27-2011 10:46 AM
I am using spartan3e board and edk11.1 platform.
I want to read a text file from my pc. In convention c code it can be done using some basic functions like fopen, fclose etc.
but in system c code these function needs lots of memory space. is there any other alternatives to read a text file from pc
12-27-2011 11:11 PM - edited 12-27-2011 11:13 PM
As far as I know, fopen and fclose and all functions like this are applicable on PC which can have access to the storage!...
Here you are on a board and want to read a file from PC!... You only can transfer your file to your board and then do what ever you like.
If you have a USB or UART connection you can run a software at PC side waiting for requests from your board - which MB or PPC probably is running - then you try to get the file contents via your media with you own protocol or other available protocols.
This way you will be simulating fopen functions with a procedure you have created.
Further more, if you have a LAN connection on your board you can send your files through FTP to your board which is a quite a bit complicated approach.
Have a nice file transfer,
Hossein Moradi Sarvandi
12-28-2011 06:37 AM
thank u for your reply
I have successfully sent the text file via hyper terminal. There is an option in hyper terminal 'send text file'. I have easily received text data by this option. But is there any other option to send any kind of data file via hyper terminal.
12-28-2011 06:56 AM - edited 12-28-2011 07:00 AM
You're welcome. I didn't see any restrictions for file type in hyper terminal transfers, except to the recipent side which should be able to store and interpert received data.
Have a nice time,
Hossein Moradi Sarvandi
12-28-2011 06:57 AM
12-28-2011 12:20 PM - edited 12-28-2011 12:23 PM
If you just want access to the plain text in the file, another option is to parse the file into a character array using a script prior to programming the FPGA, and then store the character array in a header file or the Objective C equivalent in your application. It can then be accessed using normal array indexing from within your application code.
It's also possible to create an object file representation of your text file using mb-objcopy and then linking it in SDK, but that process is a little more difficult. I've done it successfully with C, but not Objective C.
In order to use fopen, fclose, etc, as embedded pointed out, it's necessary to have a file system in place, and there are the memory restrictions.
01-04-2012 06:46 AM
12-21-2012 02:15 AM
hi, i want read the text file using hyperterminal. i am beginner for this i got some videos for EDK, n i dont know how to read a text file and how to create microblaze, so can u help me.
plz send me the procedure how to transfer it....here its my mail id- firstname.lastname@example.org.