Mark interrupt functions with #pragma TRAP_PROC or use the interrupt keyword (refer the following listing).
#ifdef __HIWARE__ #pragma TRAP_PROC void MyTrapProc(void) #else /* other compiler-vendor non-ANSI declaration of interrupt function */ @interrupt void MyTrapProc(void) #endif { /* code follows here */ }