b = fopen_wr(&file, 2); // b returns negative value;
if(b!=0 && errno == NOSPC) printf("
NoSpace Error"); // Program branch to here on and after 9801th log.
I’m using two files:
File1: 1000bytes
File2: 122700bytes
Based on the filesize formula calculations:
Bytes = (Nbr_of_filesfile_size1.14 ) + (Nbr_of_files128) + (2128)
I need 141530bytes of space which is less than the 200kB RAM limit.
I’m using these settings #define FS2_RAM_RESERVE 40
With that space I have 160k, enough to hold the files.
I’m also using ENABLE_ERROR_LOGGING with 68 entries. (logsize=>4096B=>1block of memory)
I’m having the same issue as soonki, when I made a loop to fill up the file, everything goes ok, but in my regular code a nospc error is arisen at 80kB.
Any ideas for debugging?
What else can be consuming RAM? Additional settings I missed?