Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Roel Adriaans
Op 19-7-2010 17:10, Sébastien Lorquet wrote: > hi, > > i'm playing with interrupts in pic18. > The way I use this works. Code is for the uart interrupts: main.c: extern _RC_handler; extern _TX_handler; DEF_INTHIGH(high_int) DEF_HANDLER(SIG_RC, _RC_handler) DEF_HANDLER(SIG_TX, _TX_handler) END_

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Sébastien Lorquet
Hi, Thanks for the clarification, I understand the problem. writing "extern isr_name;" is perfectly fine for me, just had to know it! Would that make its way into the documentation as a tip? could this be implemented as a #pragma symbol USED or another declarator attribute one day or another? R

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Raphael Neider
Hi, C is a bit lax with types -- if there is none given, it often assumes int, as in ''extern portb_isr'', which is (correctly) interpreted as ''extern int portb_isr;''. >> For a SIGHANDLER that is defined in the SAME file, I have to forward >> declare it using: SIGHANDLER(portb_isr); ; extern po

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Roel Adriaans
> thanks, this weird "extern" statement did the trick. I did not know > this syntax. > > But that's strange: > > For a SIGHANDLER that is defined in the SAME file, I have to forward > declare it using: SIGHANDLER(portb_isr); ; extern portb_isr fails with: > main.c:162: error 98: conflict with pr

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Sébastien Lorquet
Hi, thanks, this weird "extern" statement did the trick. I did not know this syntax. But that's strange: For a SIGHANDLER that is defined in the SAME file, I have to forward declare it using: SIGHANDLER(portb_isr); ; extern portb_isr fails with: main.c:162: error 98: conflict with previous defin

Re: [Sdcc-user] interrupts in pic18

2010-07-20 Thread Roel Adriaans
Op 19-7-2010 17:10, Sébastien Lorquet wrote: > hi, > > i'm playing with interrupts in pic18. > The way I use this works. Code is for the uart interrupts: main.c: extern _RC_handler; extern _TX_handler; DEF_INTHIGH(high_int) DEF_HANDLER(SIG_RC, _RC_handler) DEF_HANDLER(SIG_TX, _TX_handler) END

Re: [Sdcc-user] interrupts in pic18

2010-07-19 Thread Sébastien Lorquet
PS: I have SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.4 #5599 (Dec 18 2009) (MINGW32) Sebastien -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G pho

[Sdcc-user] interrupts in pic18

2010-07-19 Thread Sébastien Lorquet
hi, i'm playing with interrupts in pic18. in main.c I have: #include SIGHANDLER(i2c_slave_isr); //forward declaration, implementation is elsewhere DEF_INTHIGH(high_int) DEF_HANDLER(SIG_SSP, i2c_slave_isr); END_DEF -