Please HELP "Interrupt how to"
Russ.Shaw
russell@webaxs.net
Tue Aug 29 18:40:00 GMT 2000
You put the function address in the interrupt table, and preceed the
actual function with something like: #pragma interrupt.
Syed Raza wrote:
>
> 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
> {
> }
--
*******************************************
* Russell Shaw, B.Eng, M.Eng(Research) *
* email: russell@webaxs.net *
* Victoria, Australia *
*******************************************
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list