We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello! I use XC167CI and wrote bootloader described in C166: SHARE INTERRUPT VECTOR WITH BOOT LOADER http://www.keil.com/support/docs/2881.htm Differences with my code are:
VEC_SEG EQU 192 VEC_OFF EQU 4000H
my irq_redir.a66 consist of
?PR?irq8 section code irq8 proc near JB boot,irq8_boot JMPS VEC_SEG,VEC_OFF+20H irq8_boot: JMP irq irq8 endp ?PR?irq8 ends
When compiling linker gives error:
*** ERROR L121: IMPROPER FIXUP MODULE: .\Object\irq_redir.obj (IRQ_REDIR) SECTION: ?PR?IRQ8 CLASS: OFFSET: 000AH
May be I missed something?
I think that it's more handy method because of united location for all address assignments. I'll try it. But my interrupt doesn't work. I added GPT timer T6 to my project and changed assembler file. irq_redir.a66
VEC_SEG EQU 192 VEC_OFF EQU 4000H ; The RESET vector is used by the boot application VECT_TAB SECTION CODE AT 0C00004H VEC_PROC PROC JMPS VEC_SEG,VEC_OFF+004H JMPS VEC_SEG,VEC_OFF+008H ... JMPS VEC_SEG,VEC_OFF+094H JMPS #SEG irq8, #SOF irq8 ; irq8 JMPS VEC_SEG,VEC_OFF+09CH ... VEC_PROC ENDP VECT_TAB ENDS extrn boot:bit extrn T6irq:far ?PR?irq8 section code at 0C00500H irq8 proc near JB boot,irq8_boot JMPS VEC_SEG,VEC_OFF+098H irq8_boot: JMPS #SEG T6irq, #SOF T6irq irq8 endp ?PR?irq8 ends
and in main.c
void far T6irq(void) interrupt irq=CACHED { P2_8 = !P2_8; // LED on/off }
In the debugger (OCDS) I see proper ports initialisation, T6 runs, T6 inerrupt request flag is set when T6 overflow, program runs (in infinite loop) but there is no entering to T6 interrupt handler.
I solved my problem. Chris, thank You very much for support and solutions!