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 - am I really using 1k internal RAM ?

I am working with a DS89c450 and uVision3.

My simple C code project consists of just the ds89c450, no other devices. I have the
memory Model set to small (variables in DATA) Code ROM size set to 64K, and the option boxes
for "Use on chip ROM (0x0-0xFFFF)" and "Use on chip XRAM (0x0-0x3FF) bot checked.

I'm compiling what I think is relatively small program that doesn't use a tremendous amount
of RAM, but I am still getting the Address Space Overflow error L107 - referring to the
DATA space.

It is not clear to me whether or not I am really using the 1K internal RAM. I can remove
a single 1 byte variable and compile fine. I then look in the M51 listing file and the
DATA amounts only total about 120 bytes.

How I be sure the compiler is really using the internal 1K RAM ... and have it place whatever
variables can't fit elsewhere there ?

Thanks

Parents
  • I was still wondering how I can use the other 700++ bytes of my 1K internal RAM.
    Odds are you're not actually using any of those yet, so there's no "the other 700++ bytes", there's "the entire 1024 bytes" you're yet to use.

    Apparently I must use XDATA instead. I had thought that referred to memory that is literally off-chip
    That thought is incorrect for the device you have. XDATA is an address space, not a memory interface technique: it's the data accessed by MOVX instructions. Back in the 70s, when the original '51s were still used outside academic backwaters, if you wanted XDATA, you had to actually connect a separate RAM chip to the CPU. Those times are mostly gone (and good riddance, too). Your chip has on-chip XDATA, so use it.

    You'll have to make sure it's enabled first, though. On '51 derivates striving to be compatible to the original, all "modern" features, including on-chip XDATA, are usually disabled in the reset default state of the controller, and thus have to be enabled explicitly before use.

Reply
  • I was still wondering how I can use the other 700++ bytes of my 1K internal RAM.
    Odds are you're not actually using any of those yet, so there's no "the other 700++ bytes", there's "the entire 1024 bytes" you're yet to use.

    Apparently I must use XDATA instead. I had thought that referred to memory that is literally off-chip
    That thought is incorrect for the device you have. XDATA is an address space, not a memory interface technique: it's the data accessed by MOVX instructions. Back in the 70s, when the original '51s were still used outside academic backwaters, if you wanted XDATA, you had to actually connect a separate RAM chip to the CPU. Those times are mostly gone (and good riddance, too). Your chip has on-chip XDATA, so use it.

    You'll have to make sure it's enabled first, though. On '51 derivates striving to be compatible to the original, all "modern" features, including on-chip XDATA, are usually disabled in the reset default state of the controller, and thus have to be enabled explicitly before use.

Children
No data