Home/Support/Support Forum/Why am I getting RCM2200 SRam file NoSpace error?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Why am I getting RCM2200 SRam file NoSpace error?

+1 vote
I am using RCM2200 board; DCRabbit ver 9.62

I try to set up an event log.

1) 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

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

3) If I were to put a simple loop to save 10000 records in LOG, there is no errors.

4) 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.
asked Mar 5, 2014 in Rabbit Software by soonki New to the Community (1 point)

Please log in or register to answer this question.

2 Answers

0 votes
What is the exact error message?
answered Mar 7, 2014 by MargaretK Veteran of the Digi Community (545 points)
No compling errors;

b = fopen_wr(&file, 2); // b returns negative value;
if(b!=0 && errno == NOSPC) printf("\nNoSpace Error"); // Program branch to here on and after 9801th log.
0 votes
Hello, I'm having the same error.

My system is RCM3400 based and I'm with DC 9.21.

I'm using two files:
File1: 1000bytes
File2: 122700bytes

Based on the filesize formula calculations:
Bytes = (Nbr_of_files*file_size*1.14 ) + (Nbr_of_files*128) + (2*128)
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?
answered Nov 6, 2014 by esobine New to the Community (3 points)
...