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

Error L107: Address Space Overflow

Hello,

I have been reading some of the replies to the address space overflow errors and I think I may have a unique problem.

I have some source code that is part of a development board. We have made our own and do not need all of the features on the original (LCD, Web cam etc). Some of the resources used by the old devices we would like to use for our current application. (The reference documentation can be found at http://www.wiznet.co.kr then under products->EVB then the EVB8051)

The problem that is occurring is when in main.c under InitNetConfig() I edit out Configure(), the program will no longer compile and I get Error 107 in space: data.

How can there be more requirements on data memory when editing out code than when it is there? If you remove something that means taking away. When you take away something you have less. Apparently Keil thinks that when you have nothing you have infinity and when you have infinity you have nothing. This would work good in the real world when referring to assets, but unfortunately here it does nothing but annoy.

I have run out of places to look as there is no information on this particular case, any information or help would be GREATLY appreciated.

Parents
  • I would try to comment out the call to the function and get the errors. I would then go to where the function was defined and comment out the function definition as well.

    The error would still occur. Is there something I am missing in getting rid of the function?

Reply
  • I would try to comment out the call to the function and get the errors. I would then go to where the function was defined and comment out the function definition as well.

    The error would still occur. Is there something I am missing in getting rid of the function?

Children
  • "I would then go to where the function was defined and comment out the function definition as well."

    If your file structure is suitable, it might be easier to just clear the 'Include in build' option for the affected file(s) or Group(s).

    "Is there something I am missing in getting rid of the function?"

    Given that the problem persists, I suppose there must be!

    Are you getting other warnings or errors?

    Take a look at the Linker's Map file to see where all the data is coming from...

  • a quick method that I often use for routines "not yet called"

    I use optimize 2

    put this in main()

    // no call killers
    Ralph = 0;
    if (Ralph)
    {

    routine();
    routine();
    routine();
    } // end no call killers

    I do not know if a higher optimize level (that screws up your code) will 'optimize' this out, you will have to check.

    of course, if you never intend to use the function, just delete it.

    Erik

  • I always keep a global bit variable "NoPath" defined and use it exactly like you showed with "Ralph". Since it gets cleared at startup, no other initialization is needed. It does not get optomized out at any level.

    Of course it should be tested at a safe place to avoid the highly unlikely (ha ha) possibility that a programming bug might set it to 1.