This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ADDRESS SPACE OVERFLOW 4.5K out of 8K Total Memory, AT89S52

I am getting this message when compiling

*** ERROR L107: ADDRESS SPACE OVERFLOW
    SPACE:   DATA
    SEGMENT: _DATA_GROUP_
    LENGTH:  00001CH
Program Size: data=112.1 xdata=0 const=0 code=4492
Target not created


while i have 8192 bytes of On-Chip Memory,
below size of 4096 bytes ,there is no problem
and i have selected AT89x52.h header file.
Memory Model: Small
Code Rom Size: Compact
So what is the problem??

Parents
  • The 8051 has many memory address spaces, not just one.

    The message says "SPACE: DATA", which means you're running out of space in the 8051 data memory space. That's the 128 bytes of internal RAM, which is not the same memory as the generally larger external data or "xdata" memory space.

    With the small memory model, parameters that don't fit into registers, local variables in functions, and temporaries will all be located in data memory unless they're explicitly declared to live somewhere else. Most likely, the overlay analysis has discovered that you need more than 128 bytes of data space to accomodate the local variables (etc) in your call tree. It's also possible you simply have more than 128 bytes of data in global variables.

    If you have any large arrays or structures, try declaring them explicitly as xdata to move them into the larger memory. Be aware that access to this memory is usually slower and costs more code.

Reply
  • The 8051 has many memory address spaces, not just one.

    The message says "SPACE: DATA", which means you're running out of space in the 8051 data memory space. That's the 128 bytes of internal RAM, which is not the same memory as the generally larger external data or "xdata" memory space.

    With the small memory model, parameters that don't fit into registers, local variables in functions, and temporaries will all be located in data memory unless they're explicitly declared to live somewhere else. Most likely, the overlay analysis has discovered that you need more than 128 bytes of data space to accomodate the local variables (etc) in your call tree. It's also possible you simply have more than 128 bytes of data in global variables.

    If you have any large arrays or structures, try declaring them explicitly as xdata to move them into the larger memory. Be aware that access to this memory is usually slower and costs more code.

Children