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

COM ISR not being linked

Good afternoon,

I'm trying to register a serial (com-0) interrupt using uVision 3 on the Cypress FX2LP. The code compiles fine, but the linker warns:

WARNING L16: UNCALLED SEGMENT, IGNORED OVERLAY PROCESS
SEGMENT: ?PR?COM_ISR?MAIN

My ISR looks like this:

static void com_isr (void) interrupt 4 {
        char c;

        if (RI) {
                c = SBUF0;    // read character
                RI = 0;       // clear interrupt request flag
                if (istart + ILEN != iend) {
                inbuf[iend++ & (ILEN-1)] = c;
                }
        }

        if (TI != 0) {
        TI = 0;                  // clear interrupt request flag
        if (ostart != oend) {    // if characters in buffer and
                SBUF0 = outbuf[ostart++ & (OLEN-1)];        // transmit character
                sendfull = 0;
        }
                else {  // if all characters transmitted
                        sendactive = 0;                 // clear 'sendactive'
                }
        }
}

This code is pretty much copy and pasted from the Keil Help section on Serial Transmission.

This ISR is not being called, even with IE=0x80 (to enable global interrupts) and ES0 = 1 (to enable serial 0 interrupts). Does anyone have any suggestions?

Thanks,

Montana

Parents
  • If there are no other publics in the file, it will not be linked. Just put a global variable (used elsewhere) in this file, or put an initialisation routine in THIS file, of which you are sure it is been called from another place.
    Or just include the interrupt routine within another sourcefile.

Reply
  • If there are no other publics in the file, it will not be linked. Just put a global variable (used elsewhere) in this file, or put an initialisation routine in THIS file, of which you are sure it is been called from another place.
    Or just include the interrupt routine within another sourcefile.

Children