I am using RCM2200 board; DCRabbit ver 9.62
I try to set up an event log.
My SRAM initialisation was done with
#define FX_MAX_FILES 3
#define FS2_USE_PROGRAM_FLASH 0
// …LIB\BIOSLIB\memconfig.lib: #define FS2_RAM_RESERVE 2
My 3 sram files are:
27bytes x 140records for userinfo = 3,780bytes
4bytes x 10000 records for event log = 40.000bytes
1byte for dev_address = 1byte
If I were to put a simple loop to save 10000 records in LOG, there is no errors.
If I were to run my s/w and do actual log, it gives NoSpc error at record 9801.
Q1) Why is it that when the file is already created will 10000 records, overwriting 1 record inside can cause NoSpc error.
Q2) How to calculate the max number of records before the space runs out.
What is the exact error message?
No compling errors;
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.
Hello, I’m having the same error.
My system is RCM3400 based and I’m with DC 9.21.
I’m using two files:
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?