* Please HELP "Interrupt how to"
@ 2000-08-29 6:18 Syed Raza
2000-08-29 18:40 ` Russ.Shaw
0 siblings, 1 reply; 2+ messages in thread
From: Syed Raza @ 2000-08-29 6:18 UTC (permalink / raw)
To: gnuh8, crossgcc
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]
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
{
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Please HELP "Interrupt how to"
2000-08-29 6:18 Please HELP "Interrupt how to" Syed Raza
@ 2000-08-29 18:40 ` Russ.Shaw
0 siblings, 0 replies; 2+ messages in thread
From: Russ.Shaw @ 2000-08-29 18:40 UTC (permalink / raw)
To: Syed Raza; +Cc: gnuh8, crossgcc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-08-29 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-29 6:18 Please HELP "Interrupt how to" Syed Raza
2000-08-29 18:40 ` Russ.Shaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).