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

disable overlay warning for specific functions

I have four functions that the linker gives me the warning:

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?UART_RX_ISR_STUB?ISR

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?TIMER0_ISR_STUB?ISR

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?TIMER2_ISR_STUB?ISR

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?PR?ASDC0_ISR_STUB?ISR

These functions are not called within my application project. They *ARE* called from the bootloader project via a function pointer. Both projects are in non-overlapped CODE memory.

So how do I turn off these warnings for these segments/functions only?

I absolutely want the compiler to warn me about all other uncalled segments.

  • Steve,

    Maybe you could try forcing the functions into the overlay map by putting in dummy calls in a conditional block:

    if(0)
    {
    a();
    b();
    c();
    d();
    }

    If the compiler optimises it all out, do:

    unsigned char volatile x=0;

    if(x)
    etc

    Stefan

  • The way C51 does its work, it has to know about all possible execution paths. This means that calls into the compiled code from out of the blue, which the compiler knows nothing about, are essentially forbidden.

    You have to tell the compiler about those functions being called from elsewhere. That's where the OVERLAY linker control enters the game. Use it.