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

code reduce

Hi All

I'm writing a software for 8 bit architecture using uvision 2. But when I try to compile my project using uvision2 it gives the following error

*** ERROR L107: ADDRESS SPACE OVERFLOW
.
.
.
Program Size: data=171.7 xdata=15942 code=65617
 

my target system has only 64KB code space it seems overflow.

How can I reduce code size for this application.

I'm using Code Optimisation Level 9 from uvision2.

any idea

Parents
  • "this directive will help some sloppy developers"

    Ouch!

    ""unused segments" are quite common during development and OK at that time"

    This is exactly when I need this new directive. My projects often fly close to the wire in terms of 'data' space. During development I often have quite a number of test/debugging functions in the source and it often happens that I comment out all calls to one or more of them during some test. I then get the infamous L107 warning, the linker therefore doesn't overlay locals in those functions and suddenly I have an address space overflow error. Then I have to comment out the uncalled functions, then later I have to uncomment them again, and so on.

    This feature is something quite a few of us have been waiting a long time for. Don't go telling Keil it's a bad idea now!

    "I abhor ANY suppression of warnings"

    I wouldn't be surprised if the new directive issues a warning when it removes code?

Reply
  • "this directive will help some sloppy developers"

    Ouch!

    ""unused segments" are quite common during development and OK at that time"

    This is exactly when I need this new directive. My projects often fly close to the wire in terms of 'data' space. During development I often have quite a number of test/debugging functions in the source and it often happens that I comment out all calls to one or more of them during some test. I then get the infamous L107 warning, the linker therefore doesn't overlay locals in those functions and suddenly I have an address space overflow error. Then I have to comment out the uncalled functions, then later I have to uncomment them again, and so on.

    This feature is something quite a few of us have been waiting a long time for. Don't go telling Keil it's a bad idea now!

    "I abhor ANY suppression of warnings"

    I wouldn't be surprised if the new directive issues a warning when it removes code?

Children
  • I wouldn't be surprised if the new directive issues a warning when it removes code?

    Nope - no warning. IF you specify this directive, the linker assumes you know what you're doing.

    You do, however, get a nice listing of all the memory you just saved.

    * * * * * * * * *   R E M O V E D     S E G M E N T S   * * * * * * * *
       *DEL*:           000020H   BYTE   UNIT     CODE           ?PR?_UNUSEDFUNC?MAIN
       *DEL*:           00000AH   BYTE   UNIT     DATA           ?DT?_UNUSEDFUNC?MAIN
    

    Jon