UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
5,699 Views
Registered: ‎07-06-2011

reading and writing a file in system

hello, i am working with virtex 5 on a robotic application. for that i hav to store a map on board ram. i cannot declare a 200*200 array in sdk. so i thought of using a fgetc,fputc i.e accessing a text file in the system.is it possible?????

0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
5,695 Views
Registered: ‎03-18-2008

Re: reading and writing a file in system

This would better be answered in the embedded forums. I will move this for you
0 Kudos
Visitor abijeeth_rai
Visitor
5,660 Views
Registered: ‎08-13-2011

Re: reading and writing a file in system

hi, I've been facing a similar problem ..... fgetc , fputc, fopen ,fclose etc ... doesnt work for files on ur hard disk because the fpga doesnt have access to ur computer's file system. If u want to have file access possible store them in the compact flash card and use corresponding commands. But I will try to let u know the exact complete procedure once i get it . it requires partitioning the CF card was what i saw in others posts. but files on hard disk will not help.
0 Kudos
Explorer
Explorer
5,653 Views
Registered: ‎08-12-2007

Re: reading and writing a file in system

When using FPGA to process data, it depends on how the PC and FPGA is connected to get the file.

 

Your file needs to be transfered or stored to the memory, for example, CF Card, Nor Flash or DDR Memory via PCIe, Ethernet, UART, or stored in CF card directly.

 

File system is supported in CF Card by FATFS and  DDR Memory by MFS library. Refer to oslib_rm.pdf in EDK doc direcotory.

Raw data format can also be used.

0 Kudos
5,645 Views
Registered: ‎07-06-2011

Re: reading and writing a file in system

Thank you for your answer. I tried to configure using the compact flash. The fpga configured,but rs232 on my board is not working,so I am using jatag uart.hence I cannot use the hyperterminal,and I cannot have interface with my pc.could u suggest some way for the interface with my PC so that I can debug

0 Kudos
Highlighted
Explorer
Explorer
5,633 Views
Registered: ‎08-12-2007

Re: reading and writing a file in system

JTAG UART can work as a terminal server by

terminal -jtag_uart_server [<port_number>] [<baudrate>]

 

Then you can use HypterTerminal or Putty to connect to this socket port. Thus, you can send your data.

EDK/doc/est_rm.pdf provides more details of terminal command of XMD.

0 Kudos
Visitor abijeeth_rai
Visitor
5,573 Views
Registered: ‎08-13-2011

Re: reading and writing a file in system

alright guys ... it works .... partitioning of compact flash is not necessary ...  the root directory is A:\\ ... use respective commands for open,close, read and write (see header files .... ) ... also only read "r" and write "w" modes are supported (double quotes not single ... ) ... enable write mode in board support package settings under xilfatfs to support file creation and writing... 

0 Kudos