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

about error L107: address overflow

Now I compile my program and counter one error.which is:
ERROR L107:ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT:_DATA_GROUP_
LENGTH: 006EH
I can compile it if I select the memory model of compact or large,but the small model will counter above linker error.and in my project has the datap.c file and hasn't _DATA_GROUP_ SEGMENT,could you tell me the possible reason about it and how can I resolve it?thanks

  • Turn optimization on to full, e.g. OT(9, SIZE). Next, declare storage for every variable. Every one. E.g. for arrays, put them in xdata or idata if you don't have any xdata. For small varaibles that have to be fast, put them in data. For variables that get accessed rarely put them in xdata. Any const variables should be declared in code, otherwise they go in the default memory space (DATA for the small model) as do all variables not given an explicit storage type.

    See my UART driver for an example of using code, data, idata, and xdata storage qualifiers. It's free at http://www.embeddedfw.com (link at bottom of page) and it was built with the small memory model.

  • Take a look at the following knowledgebase article.

    http://www.keil.com/support/docs/1241.htm

    Jon