<?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>topic Re: mfs error: NOT_A_DOS_DISK in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204352#M4749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you need to format the disk. See the MFS manual for further details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 May 2011 14:05:23 GMT</pubDate>
    <dc:creator>Kafre</dc:creator>
    <dc:date>2011-05-09T14:05:23Z</dc:date>
    <item>
      <title>mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204351#M4748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am using mqx3.6.2 and mcf52259.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after install mfs on ramdisk by call _io_mfs_install(), i open it by fopen().&lt;/P&gt;&lt;P&gt;after&amp;nbsp;fopen("a:",NULL), there is a error : "NOT_A_DOS_DISK".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why dos it occur this error? and how to deal with it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regads,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 May 2011 10:45:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204351#M4748</guid>
      <dc:creator>mfserror_NOT_A_</dc:creator>
      <dc:date>2011-05-08T10:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204352#M4749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you need to format the disk. See the MFS manual for further details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 14:05:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204352#M4749</guid>
      <dc:creator>Kafre</dc:creator>
      <dc:date>2011-05-09T14:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204353#M4750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kafre,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, i see the manual and call a API but the problem is not soled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would you like to give me a example that how to use the API to format ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2011 20:38:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204353#M4750</guid>
      <dc:creator>mfserror_NOT_A_</dc:creator>
      <dc:date>2011-05-20T20:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204354#M4751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's basically this function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error_code = ioctl(mfs_handle, IO_IOCTL_DEFAULT_FORMAT,&amp;nbsp; NULL);&lt;/P&gt;&lt;P&gt;Check sh_format.c in Shell sources or digitalsign.c in digitalsign Demo directory for example usage.&lt;/P&gt;&lt;P&gt;But maybe you have problem with partitions or filesystem itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 16:33:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204354#M4751</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2011-05-23T16:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204355#M4752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PetrM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;i try to use IO_IOCTL_FORMAT_TEST to format it , but there is a error.&lt;/P&gt;&lt;P&gt;the error_code is 12375 and reports FS_INVALID_PARAMETERS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would you like to tell me which parameter is not correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below are my parameters:&lt;/P&gt;&lt;P&gt;i f ( error_code == MFS_NOT_A_DOS_DISK )&lt;BR /&gt;{&lt;BR /&gt;// printf("NOT A DOS DISK! You must format to continue.\n");&lt;BR /&gt;format_data.PHYSICAL_DRIVE = 0x80;&lt;BR /&gt;format_data.MEDIA_DESCRIPTOR = 0xf8;&lt;BR /&gt;format_data.BYTES_PER_SECTOR = 512;&lt;BR /&gt;format_data.SECTORS_PER_TRACK = 0;&lt;BR /&gt;format_data.NUMBER_OF_HEADS = 0;&lt;BR /&gt;format_data.NUMBER_OF_SECTORS = 2;&lt;BR /&gt;format_data.HIDDEN_SECTORS = 0;&lt;BR /&gt;format_data.RESERVED_SECTORS = 0;&lt;BR /&gt;&lt;BR /&gt;format_struct.FORMAT_PTR = &amp;amp;format_data;&lt;BR /&gt;format_struct.COUNT_PTR = &amp;amp;bad_cluster_count;&lt;BR /&gt;&lt;BR /&gt;error_code=ioctl(filesystem_handle, IO_IOCTL_FORMAT_TEST ,(uint_32_ptr)&amp;amp;format_struct);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 May 2011 17:15:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204355#M4752</guid>
      <dc:creator>mfserror_NOT_A_</dc:creator>
      <dc:date>2011-05-28T17:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204356#M4753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the NUMBER_OF_SECTORS is too small. For this case it should be at least 7. But you should definitely set more to be able to store some data on the disk.&lt;/P&gt;&lt;P&gt;When you look at the file mfs_format.c, function MFS_Format(), you'll see that it tries to format the disk&amp;nbsp;as FAT12 filesystem based on NUMBER_OF_SECTORS count and later it fails because there's not enough sectors for reserved sectors and root directory entries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2011 16:00:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204356#M4753</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2011-05-30T16:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204357#M4754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear PetrM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 21:23:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204357#M4754</guid>
      <dc:creator>mfserror_NOT_A_</dc:creator>
      <dc:date>2011-06-01T21:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204358#M4755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear&amp;nbsp; PetrM,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please look at my c lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if ( error_code == MFS_NOT_A_DOS_DISK )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //printf("NOT A DOS DISK! You must format to continue.\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.PHYSICAL_DRIVE&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x80;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.MEDIA_DESCRIPTOR&amp;nbsp; = 0xf8;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.BYTES_PER_SECTOR&amp;nbsp; = 512;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.SECTORS_PER_TRACK = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.NUMBER_OF_HEADS&amp;nbsp;&amp;nbsp; = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.NUMBER_OF_SECTORS = 128; //at least 7&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.HIDDEN_SECTORS&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_data.RESERVED_SECTORS&amp;nbsp; = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_struct.FORMAT_PTR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &amp;amp;format_data;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; format_struct.COUNT_PTR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &amp;amp;bad_cluster_count;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; error_code=ioctl(filesystem_handle, IO_IOCTL_FORMAT_TEST ,(uint_32_ptr)&amp;amp;format_struct);&lt;BR /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; if(error_code == MFS_NO_ERROR)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;textfile_ptr = fopen("c:myfile.txt", "a+");&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(textfile_ptr, buffer, strlen(buffer));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose(textfile_ptr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; my_mfs_ptr = fopen("c:myfile.txt", "r");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; read(my_mfs_ptr, buffer1,strlen(buffer));&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose(my_mfs_ptr);&amp;nbsp;&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the format procedure will be run successfully without&amp;nbsp; the&amp;nbsp; "textfile_ptr=fopen("c:myfile.txt", "a++"); " lines.&lt;/P&gt;&lt;P&gt;if i cancel these lines such as below, the format runs correct.&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;if(error_code == MFS_NO_ERROR)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;textfile_ptr = fopen("c:myfile.txt", "a+");&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(textfile_ptr, buffer, strlen(buffer));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose(textfile_ptr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; my_mfs_ptr = fopen("c:myfile.txt", "r");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; read(my_mfs_ptr, buffer1,strlen(buffer));&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose(my_mfs_ptr);&amp;nbsp;&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after format successfully, i add the lines canceles before.&lt;/P&gt;&lt;P&gt;this time , all lines works well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would you like to tell me how to use write() or read() to write/read a file after FORMAT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jun 2011 10:17:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204358#M4755</guid>
      <dc:creator>mfserror_NOT_A_</dc:creator>
      <dc:date>2011-06-12T10:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: mfs error: NOT_A_DOS_DISK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204359#M4756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;maybe it depends on current directory. Try to use absolute paths - with backslash at the beginning (c:\myfile.txt).&lt;/P&gt;&lt;P&gt;And maybe the format_test fails. Did you check it's return code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PetrM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 21:55:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mfs-error-NOT-A-DOS-DISK/m-p/204359#M4756</guid>
      <dc:creator>PetrM</dc:creator>
      <dc:date>2011-06-20T21:55:18Z</dc:date>
    </item>
  </channel>
</rss>

