<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Michael Matsnev's Activities</title><link>https://community.arm.com/members/4e0c373f_2d00_baa8_2d00_4813_2d00_88de_2d00_26677ecfc021</link><description>Michael Matsnev's recent activity</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>FS Crash on MCB2300 with SD_File Example</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/37860/fs-crash-on-mcb2300-with-sd_file-example</link><pubDate>Mon, 22 Jul 2019 10:00:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bf2b727f-45be-4fc8-a2b1-f1a1dc079570</guid><dc:creator>Michael Matsnev</dc:creator><description>&lt;p&gt;&lt;p&gt;
I try to use RL-FlashFS. Exactly SD_File Example on MCB2300.
RL-ARM Version 3.21. MDK-ARM Version 3.20.&lt;br /&gt;
I modified &lt;b&gt;cmd_fill&lt;/b&gt; function:&lt;/p&gt;

&lt;pre&gt;
/*----------------------------------------------------------------------------
 *        Create a file and fill it with some text
 *---------------------------------------------------------------------------*/
static void cmd_fill (char *par) {
   char *fname, *next;
   FILE *f;
   int i,cnt = 1000;

   fname = get_entry (par, &amp;amp;next);
   if (fname == NULL) {
      printf (&amp;quot;\nFilename missing.\n&amp;quot;);
      return;
   }
   if (next) {
      par = get_entry (next, &amp;amp;next);
      if (sscanf (par,&amp;quot;%d&amp;quot;, &amp;amp;cnt) == 0) {
         printf (&amp;quot;\nCommand error.\n&amp;quot;);
         return;
      }
   }

   f = fopen (fname, &amp;quot;w&amp;quot;);              /* open a file for writing           */
   if (f == NULL) {
      printf (&amp;quot;\nCan not open file!\n&amp;quot;);/* error when trying to open file    */
      return;
   }
&lt;b&gt;   fclose (f);                        /* close the output file               */&lt;/b&gt;
   for (i = 0; i &amp;lt; cnt; i++)  {
&lt;b&gt;      f = fopen (fname, &amp;quot;a&amp;quot;);         &lt;/b&gt;
      fprintf (f, &amp;quot;This is line # %d in file %s\n&amp;quot;, i, fname);
&lt;b&gt;       if(ferror (f))
          {
            printf(&amp;quot;\nFile ERROR!!!\n&amp;quot;);
            fclose (f);
                break;
          }

          fflush (f);
          fclose (f);                        /* close the output file               */&lt;/b&gt;
   }
&lt;b&gt;   //fclose (f);                        /* close the output file               */&lt;/b&gt;
   printf (&amp;quot;\nFile closed.\n&amp;quot;);
}
&lt;/pre&gt;

&lt;p&gt;
After that, when I cause function of 10 times successively file
system collapses.&lt;/p&gt;

&lt;pre&gt;
format

Format Flash Memory Card? [Y/N]
Memory Card Formatted.
Card Label is KEIL

Cmd&amp;gt; dir

File System Directory...
No files...
                                              14.733.312 bytes free.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_2.txt 20

File closed.

Cmd&amp;gt; dir

File System Directory...
FILL_1.TXT                                           360   01.01.2008  12:00
FILL_2.TXT                                           730   01.01.2008  12:00
                      2 File(s)                    1.090 bytes
                                              14.610.432 bytes free.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; dir

File System Directory...
FILL_2.TXT                                           730   01.01.2008  12:00
FILL_1.TXT                                           360   01.01.2008  12:00
                      2 File(s)                    1.090 bytes
                                              14.405.632 bytes free.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; fill fill_1.txt 10

File closed.

Cmd&amp;gt; dir

File System Directory...
FILL_2.TXT                                           730   01.01.2008  12:00
&lt;b&gt;FILL_1.TXT                                             0   01.01.2008  12:00&lt;/b&gt;
                      2 File(s)                      730 bytes
                                              13.955.072 bytes free.

Cmd&amp;gt;
&lt;/pre&gt;

&lt;p&gt;
Where the problem?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://community.arm.com/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Sat, 13 Jul 2019 12:21:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bab0f266-0318-4a41-8ae9-11722d13186d</guid><dc:creator /><description>Ask a question in a forum.</description></item><item><title>Community Help</title><link>https://community.arm.com/members/4e0c373f_2d00_baa8_2d00_4813_2d00_88de_2d00_26677ecfc021/activities/ed5de92a-1d00-400d-b3c0-bf13d8e8e20c</link><pubDate>Sat, 13 Jul 2019 03:13:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ed5de92a-1d00-400d-b3c0-bf13d8e8e20c</guid><dc:creator>Arm Community</dc:creator><description>New to Arm Community? Start here to learn how to get the most out of it. Learn about Community enhancements, share ideas and ask questions.</description></item></channel></rss>