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

No error whith a code space overflow

I've noticed that the C51 linker does not always generate an error when the code space overflows its alloted space.

For example, the following directive is used for the linker:

CODE (0X0000-0X1BFF, ?CO?* (0X0080), ?PR?*, ?C_INITSEG, ?C_C51STARTUP, ?C?LIB_CODE)
and the linker file shows:
Program Size: data=145.1 xdata=4204 code=9067
LINK/LOCATE RUN COMPLETE.  0 WARNING(S),  0 ERROR(S)

if I change the directive to this:
CODE (0X0000-0X1BFF, ?CO?* (0X0080), ?PR?*, ?C_INITSEG, ?C_C51STARTUP)
then the linker file shows:
*** ERROR L107: ADDRESS SPACE OVERFLOW
    SPACE:   CODE
    SEGMENT: ?C?LIB_CODE
    LENGTH:  01D2H

(more errors are displayed)

Program Size: data=145.1 xdata=4204 code=9067
LINK/LOCATE RUN COMPLETE.  0 WARNING(S),  40 ERROR(S)

It seems to me in either case the linker should generate the ADDRESS SPACE OVERFLOW error.

--
Frodak

0