Hi Nik
Please see the sample code for fopen:
Open the MFS device driver and open a file on the device.
char buffer[100] = "This a test file";
char buffer2[100];
/* Open the MFS device driver: */
mfs_fd_ptr = fopen("MFS1:", NULL);
if (mfs_fd_ptr == NULL) {
printf("Error opening the MFS device driver!");
_mqx_exit(1);
}
/* Open file on disk in the current directory and write to it: */
fd_ptr = fopen("MFS1:myfile.txt", "w+");
write(fd_ptr, buffer, strlen(buffer));
read(fd_ptr, buffer2, strlen(buffer));
/* Close the file: */
error_code = fclose(fd_ptr);
/* Open other files, create directories, and so on. */
/* The application has done all it needs. */
/* Close the MFS device driver and uninstall it: */
error_code = fclose(mfs_fd_ptr);
if (!error_code) {
error_code = _io_mfs_uninstall("MFS1:");
} else if (error_code == MFS_SHARING VIOLATION) {
printf("There are open files on the device. Call fclose on their
handles before attempting to fclose the device driver");
}
Regards
Please refer to the MQXMFSUS.pdf for more information
http://cache.freescale.com/files/32bit/doc/user_guide/MQXMFSUG.pdf?fpsp=1&WT_TYPE=Users Guides&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation