This is the mail archive of the
crossgcc@sources.redhat.com
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more infromation.
Please HELP "Interrupt how to"
- To: gnuh8 at pcserv dot demon dot co dot uk, crossgcc at sourceware dot cygnus dot com
- Subject: Please HELP "Interrupt how to"
- From: Syed Raza <Syed dot Raza at vtt dot fi>
- Date: Tue, 29 Aug 2000 16:15:56 +0300
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
{
}