I am writing C code as a separate module to be used by a bigger project written in assembly. Currently I have interrupts triggered in assembly which calls a function in C to do necessary tasks. But how does one get assembly to trigger an ISR in C directly using IAR Workbench?
Here is what I tried and didn't work...
(in assembly file)
EXTERN SOME_ISR ;C interrupt routine
RSEG INTVEC
DW SOME_ISR ;isr at FFF0
RSEG MCODE
-----------------------------------------------------------------
(in C file)
#pragma vector=SOME_HARDWARE_VECTOR //this caused a duplicate vector error with assembly
extern "C"
__interrupt void SOME_ISR(void)
{
Do some stuff
}
-----------------------------------------------------------------