Hello all,
I am using Xilinx fpga in my project. The board is ML403 and it contains an 8MB flash. I need to store few data files onto the flash and read these files during the execution of my program on powerpc. i have to use xilmfs as the filesystem on the flash and therefore i created a mfs image of the files by using mfsgen utility according to the xilinx reference manuals (oslib_rm, ps_ug).
for downloading this mfs image, the manual says "Load this image file into memory at a suitable address, such as
0x10000000. You can use XMD to download data, or you can use another tool to copy this data to memory."i tried to download using XMD command: dow -data image.mfs 0x22000000 where dow : command -data : option to indicate data file and not executable image.mfs : mfs filesystem image 0x22000000 : flash memory starting address in my design where the mfs image has to be downloaded.
in the design, i have included the flash drive on the hardware side and enabled the xilmfs libary with the parameters set appropriately. i.e., baseaddress = 0x22000000, init_type = rom_image and size = 15960 bytes
in the code #include "mfs_config.h"
main() { .... mfs_init_fs(MFS_NUMBYTES, MFS_BASE_ADDRESS, MFSINIT_ROM_IMAGE);
mnt1 = mfs_file_open("1_1_0.mnt", MFS_MODE_READ); xil_printf("\n%d\n",mnt1); // receiving -1 for mnt1 : the file opening was unsuccessful.
... }
and still not able to open the file and read from it.
i have crosschecked all the steps suggested in the manual many times but found that i have done everything according to the manuals.
(i also tried to load the flash with the image.mfs using "Program Flash Memory" option in the Menu but with no change in the result)
Any help in resolving the problem is deeply appreciated.
Thanks in advance, Rajashekar