Hallo,
i'm using RL-ARM FileSytem + RealView. Initiallly calling the function ffree("F:") returns 65504 Bytes free.
Normally all works fine, but after trying to open a Non existing File for 9 times, the function ffree("F:") returns 0 Bytes free. At this point, also the fformat function does not work. After reseting the system, all works again.
Example: Calling the DummyOpen() + ffree("F:") 9 times works ok, after the free size gives 0:
bool DummyOpen(char *fName) { FILE *fin; fin = fopen (fName, "r"); // 33 uS if (fin == NULL) return false; // File not found! fclose (fin); return true; }
thank you for any information.
Eugen
I'm using the Atmel AT91SAM7XC256, the RL-ARM version is V3.10. Tool Version Numbers: Toolchain Path: D:\KeilArm\ARM\BIN30\ C Compiler: Armcc.Exe V3.0.0.942 Assembler: Armasm.Exe V3.0.0.942 Linker/Locator: ArmLink.Exe V3.0.0.942 Librarian: ArmAr.Exe V3.0.0.942 Hex Converter: FromElf.Exe V3.0.0.942 CPU DLL: SARM.DLL V3.02a Dialog DLL: DARMATS.DLL V1.05 Target DLL: BIN\UL2ARM.DLL V1.20a Dialog DLL: TARMATS.DLL V1.03
The FileSystem works on Internal Flash (F:)
bool DummyOpen(char *fName) { FILE *fin; fin = fopen (fName, "r"); // 33 uS if (fin == NULL) return false; // File not found! fclose (fin); return true; } void TestFs(char *fName) { for (int cnt=1; cnt<30; cnt++) { TRACE(("\n\r%d Free:%d ", cnt, ffree(fName) )); TRACE(("DummyOpen:%d ", (int)DummyOpen(fName) )); TRACE(("Free:%d ", ffree(fName) )); } }
Calling TestFs("F:x.x") gives the following result:
1 Free:65504 DummyOpen:0 Free:65504 2 Free:65504 DummyOpen:0 Free:65504 3 Free:65504 DummyOpen:0 Free:65504 4 Free:65504 DummyOpen:0 Free:65504 5 Free:65504 DummyOpen:0 Free:65504 6 Free:65504 DummyOpen:0 Free:65504 7 Free:65504 DummyOpen:0 Free:65504 8 Free:65504 DummyOpen:0 Free:65504 9 Free:65504 DummyOpen:0 Free:65504 10 Free:65504 DummyOpen:0 Free:65504 11 Free:65504 DummyOpen:0 Free:65504 12 Free:65504 DummyOpen:0 Free:65504 13 Free:65504 DummyOpen:0 Free:65504 14 Free:65504 DummyOpen:0 Free:65504 15 Free:65504 DummyOpen:0 Free:65504 16 Free:65504 DummyOpen:0 Free:0 17 Free:0 DummyOpen:0 Free:0