Please HELP "Interrupt how to"

Syed Raza Syed.Raza@vtt.fi
Tue Aug 29 06:18:00 GMT 2000


Hi All

I am using EVB3067 and HDI (Hitachi Deb. Interface). I use Linux
(gcc-2.95.2, newlib-1.8.2, binutils-2.9) for compiling my C code.I want
to use two interrupts (receive and transmit).In FAQ it says that gcc
doesnt support writing interrupt handler.

What i have done is ..

i put the receive function (the one i want to call by an interrupt) in to
a vector table, then i compile my main program and vector table
saperately and then make an *.out file by linking with ldscript.
But i doestn work. Can any one please give my some hints how to do that


do i need to do any changes in my crt0.S file  ?

thanx in advance
syed

=======================================================
vector table "vect.c"
=============================================
#include "ioh83067.h"
extern void start(void);
void empty(void) { }
void my_interrupt (void)
{ 
}

typedef void  (*irq_func)(void);
irq_func _vectors[92] __attribute__ ((section (".vectors"))) =
{         
start, /* 0 */   
empty,/* 1 */
empty,/* 84 - ERI1 */    
receive,/* 85 - RXI1 */  
empty,/* 86 - TXI1 */    
};

=================================================
main.c 
================================================
#include "ioh83067.h"
#include "vect.c"
main 
{
}






More information about the crossgcc mailing list