<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software SolutionsのトピックMFS install</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271195#M8309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using MFS with USB Host stack for Mass Storage Device and I am pretty new to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to read a text file from the connected MSD. Here is the sequence of funciton calls I am using for the purpose :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #642880; font-size: 10pt;"&gt;_io_usb_mfs_install&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"USBD:"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, 0, (&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: 10pt;"&gt;pointer&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)msg.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;ccs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; /* msg.ccs is a pointer to class_call_structure poitner*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;DEV_FD_PTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = fopen(&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"USBD:"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, NULL);&amp;nbsp; /* First fopen to open the device*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;FS_FD_PTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = fopen(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"C:\\my_read_file.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"a+"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; /* 2nd fopen to open the file*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So instead of reading the data from the file, all I could read was the data from Sector 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please tell me what am I doing wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Oct 2013 12:44:04 GMT</pubDate>
    <dc:creator>nitinkothari</dc:creator>
    <dc:date>2013-10-09T12:44:04Z</dc:date>
    <item>
      <title>MFS install</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271195#M8309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using MFS with USB Host stack for Mass Storage Device and I am pretty new to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to read a text file from the connected MSD. Here is the sequence of funciton calls I am using for the purpose :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #642880; font-size: 10pt;"&gt;_io_usb_mfs_install&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"USBD:"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, 0, (&lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: 10pt;"&gt;pointer&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)msg.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;ccs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; /* msg.ccs is a pointer to class_call_structure poitner*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;DEV_FD_PTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = fopen(&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"USBD:"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, NULL);&amp;nbsp; /* First fopen to open the device*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000c0; font-size: 10pt;"&gt;FS_FD_PTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = fopen(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"C:\\my_read_file.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"a+"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&amp;nbsp; /* 2nd fopen to open the file*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So instead of reading the data from the file, all I could read was the data from Sector 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please tell me what am I doing wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 12:44:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271195#M8309</guid>
      <dc:creator>nitinkothari</dc:creator>
      <dc:date>2013-10-09T12:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: MFS install</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271196#M8310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nik&lt;/P&gt;&lt;P&gt;Please see the sample code for fopen:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Open the MFS device driver and open a file on the device.&lt;BR /&gt;char buffer[100] = "This a test file";&lt;BR /&gt;char buffer2[100];&lt;BR /&gt;/* Open the MFS device driver: */&lt;BR /&gt;mfs_fd_ptr = fopen("MFS1:", NULL);&lt;BR /&gt;if (mfs_fd_ptr == NULL) {&lt;BR /&gt;printf("Error opening the MFS device driver!");&lt;BR /&gt;_mqx_exit(1);&lt;BR /&gt;}&lt;BR /&gt;/* Open file on disk in the current directory and write to it: */&lt;BR /&gt;fd_ptr = fopen("MFS1:myfile.txt", "w+");&lt;BR /&gt;write(fd_ptr, buffer, strlen(buffer));&lt;BR /&gt;read(fd_ptr, buffer2, strlen(buffer));&lt;BR /&gt;/* Close the file: */&lt;BR /&gt;error_code = fclose(fd_ptr);&lt;/P&gt;&lt;P&gt;/* Open other files, create directories, and so on. */&lt;/P&gt;&lt;P&gt;/* The application has done all it needs. */&lt;/P&gt;&lt;P&gt;/* Close the MFS device driver and uninstall it: */&lt;/P&gt;&lt;P&gt;error_code = fclose(mfs_fd_ptr);&lt;/P&gt;&lt;P&gt;if (!error_code) {&lt;/P&gt;&lt;P&gt;error_code = _io_mfs_uninstall("MFS1:");&lt;/P&gt;&lt;P&gt;} else if (error_code == MFS_SHARING VIOLATION) {&lt;/P&gt;&lt;P&gt;printf("There are open files on the device. Call fclose on their&lt;/P&gt;&lt;P&gt;handles before attempting to fclose the device driver");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Please refer to the MQXMFSUS.pdf for more information&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/32bit/doc/user_guide/MQXMFSUG.pdf?fpsp=1&amp;amp;WT_TYPE=Users"&gt;http://cache.freescale.com/files/32bit/doc/user_guide/MQXMFSUG.pdf?fpsp=1&amp;amp;WT_TYPE=Users&lt;/A&gt;&lt;SPAN&gt; Guides&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=pdf&amp;amp;WT_ASSET=Documentation&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 22:30:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271196#M8310</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2013-10-09T22:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: MFS install</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271197#M8311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reponse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried exactly the same. But in my case, after the second fopen , it reads Sector 0 information only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please suggest what could be wrong ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 09:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271197#M8311</guid>
      <dc:creator>nitinkothari</dc:creator>
      <dc:date>2013-10-10T09:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: MFS install</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271198#M8312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nik:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you mount USB filesystem successfully before fopen?&amp;nbsp; if not, there is demo code for it , for your reference.&lt;/P&gt;&lt;P&gt;&amp;lt;MQX_INSTALL_DIR&amp;gt;/mfs/examples/mfs_usb/usb_tasks.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 10:01:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271198#M8312</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2013-10-10T10:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: MFS install</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271199#M8313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Daniel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a look at the example code you had mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this line mounting the device : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error_code = _io_mfs_install(usb_fs_ptr-&amp;gt;DEV_FD_PTR, file_system_name, 0);&amp;nbsp; ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 10:29:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271199#M8313</guid>
      <dc:creator>nitinkothari</dc:creator>
      <dc:date>2013-10-10T10:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re: MFS install</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271200#M8314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached a document for your reference. Page 2-Page5 explained something about USB device installation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 10:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-install/m-p/271200#M8314</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2013-10-10T10:47:52Z</dc:date>
    </item>
  </channel>
</rss>

