<?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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RL-ARM FileSystem Problem opening File</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/37423/rl-arm-filesystem-problem-opening-file</link><description> 
Hallo, 

 
i&amp;#39;m using RL-ARM FileSytem + RealView. 
Initiallly calling the function ffree(&amp;quot;F:&amp;quot;) returns 65504 Bytes
free. 

 
Normally all works fine, but after trying to open a Non existing
File for 9 times, the function ffree(&amp;quot;F:&amp;quot;) returns 0 Bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RL-ARM FileSystem Problem opening File</title><link>https://community.arm.com/thread/75474?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2007 00:10:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c4d8be6f-3664-42db-acfc-0c1b5d716f3f</guid><dc:creator>Eugen Mailaender</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hallo,&lt;/p&gt;

&lt;p&gt;
I&amp;#39;m using the Atmel AT91SAM7XC256, the RL-ARM version is
V3.10.&lt;br /&gt;
Tool Version Numbers:&lt;br /&gt;
Toolchain Path: D:\KeilArm\ARM\BIN30\&lt;br /&gt;
C Compiler: Armcc.Exe V3.0.0.942&lt;br /&gt;
Assembler: Armasm.Exe V3.0.0.942&lt;br /&gt;
Linker/Locator: ArmLink.Exe V3.0.0.942&lt;br /&gt;
Librarian: ArmAr.Exe V3.0.0.942&lt;br /&gt;
Hex Converter: FromElf.Exe V3.0.0.942&lt;br /&gt;
CPU DLL: SARM.DLL V3.02a&lt;br /&gt;
Dialog DLL: DARMATS.DLL V1.05&lt;br /&gt;
Target DLL: BIN\UL2ARM.DLL V1.20a&lt;br /&gt;
Dialog DLL: TARMATS.DLL V1.03&lt;/p&gt;

&lt;p&gt;
The FileSystem works on Internal Flash (F:)&lt;/p&gt;

&lt;pre&gt;
bool DummyOpen(char *fName) {
FILE *fin;

        fin = fopen (fName, &amp;quot;r&amp;quot;);                                                     // 33 uS
        if (fin == NULL)
                return false;                   // File not found!

        fclose (fin);
        return true;
}


void TestFs(char *fName)        {
        for (int cnt=1;  cnt&amp;lt;30;  cnt++)
        {
                TRACE((&amp;quot;\n\r%d  Free:%d   &amp;quot;, cnt, ffree(fName) ));
                TRACE((&amp;quot;DummyOpen:%d    &amp;quot;, (int)DummyOpen(fName) ));
                TRACE((&amp;quot;Free:%d   &amp;quot;, ffree(fName) ));
        }
}
&lt;/pre&gt;

&lt;p&gt;
Calling TestFs(&amp;quot;F:x.x&amp;quot;) gives the following result:&lt;/p&gt;

&lt;p&gt;
1 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
2 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
3 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
4 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
5 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
6 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
7 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
8 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
9 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
10 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
11 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
12 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
13 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
14 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
15 Free:65504 DummyOpen:0 Free:65504&lt;br /&gt;
16 Free:65504 DummyOpen:0 Free:0&lt;br /&gt;
17 Free:0 DummyOpen:0 Free:0&lt;/p&gt;

&lt;p&gt;
Eugen&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM FileSystem Problem opening File</title><link>https://community.arm.com/thread/88523?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2007 23:42:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ed338b5c-c8f4-4210-8169-55fa3c6cef49</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
Please ignore my previous post. We have found and fixed the
problem.&lt;/p&gt;

&lt;p&gt;
Please contact support for updated libraries.&lt;/p&gt;

&lt;p&gt;
Franc&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM FileSystem Problem opening File</title><link>https://community.arm.com/thread/48562?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2007 22:59:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:da97a9a4-751e-4ce1-86f2-37ebc1873479</guid><dc:creator>Franc  Urbanc</dc:creator><description>&lt;p&gt;&lt;p&gt;
We need more information to be able to help.&lt;/p&gt;

&lt;p&gt;
What arm device are you using? Where are you storing files
(internal/external flash)? How is the Flash device configured? What
version of MDK, RL-ARM are you using?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RL-ARM FileSystem Problem opening File</title><link>https://community.arm.com/thread/48565?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2007 22:49:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:04254166-7e45-4406-943c-5593689dd4a3</guid><dc:creator>Eugen Mailaender</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hallo,&lt;/p&gt;

&lt;p&gt;
the program works for 15 times correct, not for 9 times.&lt;/p&gt;

&lt;p&gt;
Sorry&lt;br /&gt;
Eugen&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>