When I load my code into the dscope debugger I do not get a jump to my interrupt service routines in the vector table. I am using two interrupts (serial interrupt -4, timer interrupt -1) The code at location FF000b is FF000b cmod3 (0xff),r2 FF000d rr a FF000e mov r4,a I replaced with ejmp ?PR?Timer0_ISR It goes to the service request but the stack is not correct and the ISR does not return. I get something similar with my serial ISR. Why isn't the linker using the proper jump instruction, or am I doing something wrong?????.
Jim, It sounds like the compiler is not generating interrupt vectors for you. Did you disable this option? What compiler and linker options have you specified? Can you show us an example of the program you are compiling? The only time I've seen the problems you are describing is when I set WAY TOO MANY compiler options. If you find that you are setting LOTS of compiler options, there's something wrong. Try building your project with only MODSRC for C251 and A251. Also, one last thought. Are you actually compiling any C files with the C compiler or are you using #pragma SRC for all of your C files? Jon
I set the compiler to save the PSW and put it into source mode (4 byte frame) instead of binary. Now when I load my program into the dscope it has the correct ljmp instructions to my ISR's. I created an endless while loop(while(1);) in one of my subroutines(external code space). When I run my code to this location it gets there fine, but when an interrupt occurs I vector to the ISR and return to the code however when I return I do not actually execute any instructions or stop at any breakpoints set. The trace shows that I just run through all of my instructions until execution stops. One other thing I noticed that the display of the call stack shows a different address than what should be when an interrupt occurs. It seems to be off by 1 byte. Does this mean anything the interrupt seems to come and go alright when it hits when I am in my main routine (located in the same code segment as the ISR) But the stack addressing anomally applies.
Are you using the simulator or the target monitor (MON251)? What versions of the debugger and C compiler are you using? Jon
My tools are: Keil 80251 C Compiler V2.X(DLL 1.31) using simulator dScope debugger dScope-251 / windows V1.51 Jim