Keil Logo

BL51: INTERRUPT GENERATES WARNING 16 (UNCALLED SEGMENT)


Information in this article applies to:

  • C51 Version 5.50

SYMPTOMS

I have written the following Interrupt Service Routine (ISR):

void myisr(void) interrupt 0
{
}

When I build my project I get:

WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MYISR?TEST

How do I tell the linker that it really is an interrupt and isn't explicitly called from anywhere in my source code?

CAUSE

This problem may be caused if you use the NOINTVECTOR compiler directive but do not include an LJMP or AJMP to the ISR.

RESOLUTION

You can resolve this in two ways:

  1. Remove the NOINTVECTOR directive and let the compiler automatically generate interrupt vectors.
  2. Generate your own interrupt vector table in assembler. Here is an example for the interrupt given above. This would be placed in a separate .a51 file and added to the project:
    EXTRN CODE (ISR41)
    
    CSEG    AT      0003H
            LJMP    ISR41
    END
    

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.