L15 WARNING : MULTIPLE CALL TO SEGMENT

SMS interrupt 0{
berita(0x0000,0x3fff);
}

show interrupt 1{
berita(0x4000,0x7fff);
}

Interrupt 0 and interrupt 1 call the same
sub routine but for different purpose.

When compiled, the C51 generated warning L15:
MULTIPLE CALL TO SEGMENT

Segment : ?PR?_BERITA?RTX
Caller1 : ?PR?_SMS?RTX
Caller2 : ?PR?_SHOW?RTX

The program does'nt work at all if
the HEX file programmed to the chip AT89S51.

Any one please, How to omit the warning,
or to use interrupts calls one sub routine
for a different purposes.

Thank you very much
Kurnia Brahmana

Parents
  • I don't know whether it is possible to suppress that specific warning.

    You would need to be certain that your function is reentrant for this to work, noting that any functions called by that function would also need to be reentrant.

    Personally I prefer not to call functions from interrupt handlers at all to avoid any potential mistakes. It may be ugly, but I inline all ISR code.

Reply
  • I don't know whether it is possible to suppress that specific warning.

    You would need to be certain that your function is reentrant for this to work, noting that any functions called by that function would also need to be reentrant.

    Personally I prefer not to call functions from interrupt handlers at all to avoid any potential mistakes. It may be ugly, but I inline all ISR code.

Children
More questions in this forum