EmbeddedRelated.com
Forums

Please help with Out of variable data space

Started by csantmail July 19, 2004
Hi,

I,m working on a project that requires "large" serial buffers for
serial ports B and C. Using a RCM3110 with 128K RAM, and 256K Flash
I have the application running with buffers for serial B and serial C
of size 4095 bytes each one. When I try to increase those buffers to
8191 bytes, I get the message.

line 3602 : ERROR MATH.LIB : Out of variable data space

Then I decided to change the rabbit board, so I'm using now a RCM3000
with 512K RAM, 512K Flash, but I'm getting the same error message
although I'm increasing a lot the available memory for the
application.

How can I correct that ?

I'm using DC8.51 and the program uses the TCP/IP library.

The only thing that I change when I switch the board that I'm working
on, is the menu options->project options-> targetless and there I
choose the type of board using only the board selection options.

Thanks in advance,

Carlos


--- In rabbit-semi@rabb..., "csantmail" <csantmail@y...>
wrote:
> Hi,
>
> I,m working on a project that requires "large" serial buffers for
> serial ports B and C. Using a RCM3110 with 128K RAM, and 256K
Flash
> I have the application running with buffers for serial B and serial
C
> of size 4095 bytes each one. When I try to increase those buffers
to
> 8191 bytes, I get the message.
>
> line 3602 : ERROR MATH.LIB : Out of variable data space
>
> Then I decided to change the rabbit board, so I'm using now a
RCM3000
> with 512K RAM, 512K Flash, but I'm getting the same error message
> although I'm increasing a lot the available memory for the
> application.
>
> How can I correct that ?
>
> I'm using DC8.51 and the program uses the TCP/IP library.

Using bigger RAM doesn't help this because you're running out of root
dats space, which is defined by the MMU settings and can never exceed
49K.

The quickest ways to give yourself more root data space are to enable
separate I&D space in the compiler options, and lower DATAORG in the
BIOS to the minimum multiple of 0x1000 that doesn't cause an "out of
root constant space" error.

See Tech note 238 also for more root reduction tips. (It also has a
version of RS232.LIB that allows xmem to be used for buffers instead
of root, but unfortunately they can only be 4095 bytes)



Yes...essentially what you are trying to do is inappropriate for an 8
bit embedded system. This is not PC world...! He he.

General practice is to create some type of reservation in 'far'
memory for your large buffers, either by creating a 'large' far
variable, or by making an explicit reservation in your loader (
linker, loader )

When this reservation has been made, simply assign one global far
pointer to it, publish it as being external ( visible in scope to the
whole application ), and work away.
Regards Jimbo


i think you have to play with xmem to get those buffer as big as you want.

the probleme is the root data space.

have you try to check Separeted instruction and data in the project option ?

this might help.

If i remember correctly i thig you have only 20K root data memory. bu i'm
not shure.. could some one else can confirm the root data space available ?

regards

Jonathan
----- Original Message -----
From: "csantmail" <csantmail@csan...>
To: <rabbit-semi@rabb...>
Sent: Monday, July 19, 2004 1:14 PM
Subject: [rabbit-semi] Please help with Out of variable data space > Hi,
>
> I,m working on a project that requires "large" serial buffers for
> serial ports B and C. Using a RCM3110 with 128K RAM, and 256K Flash
> I have the application running with buffers for serial B and serial C
> of size 4095 bytes each one. When I try to increase those buffers to
> 8191 bytes, I get the message.
>
> line 3602 : ERROR MATH.LIB : Out of variable data space
>
> Then I decided to change the rabbit board, so I'm using now a RCM3000
> with 512K RAM, 512K Flash, but I'm getting the same error message
> although I'm increasing a lot the available memory for the
> application.
>
> How can I correct that ?
>
> I'm using DC8.51 and the program uses the TCP/IP library.
>
> The only thing that I change when I switch the board that I'm working
> on, is the menu options->project options-> targetless and there I
> choose the type of board using only the board selection options.
>
> Thanks in advance,
>
> Carlos > Yahoo! Groups Links >