This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: cyg_drv_interrupt_create ()
- To: <rob dot wj dot jansen at philips dot com>
- Subject: RE: [ECOS] cyg_drv_interrupt_create ()
- From: "Trenton D. Adams" <tadams at extremeeng dot com>
- Date: Fri, 22 Jun 2001 08:41:58 -0600
- Cc: <ecos-discuss at sources dot redhat dot com>
- Organization: Extreme Engineering
> -----Original Message-----
> From: rob.wj.jansen@philips.com [mailto:rob.wj.jansen@philips.com]
> Sent: Friday, June 22, 2001 2:05 AM
> To: tadams@extremeeng.com
> Cc: ecos-discuss@sources.redhat.com
> Subject: RE: [ECOS] cyg_drv_interrupt_create ()
>
>
> >> The interrupt number. Most times these map directly to
> what you would
> >> expect. But you can get the definitions by including
> >> <cyg/hal/hal_intr.h>. Look at the header (and possibly what it
> >> includes) to find the value required. Yes our
> documentation could be
> >> improved :-|.
> >
> >Does it have to be defined in the <cyg/hal/hal_intr.h>
> header file to
> >be a useable interrupt?
>
> Yes it should.
> The interrupt number you specify is an index into an
> interrupt table. The ARM processor only has one IRQ and one
> FIQ pin and on most boards these lines are connected to an
> interrupt controller (this may be part of a chip with an
> embedded ARM core). In the hal for the arm the interrupt
> routine (hal/arm/arch/current/src/vector.S, label
> handle_IRQ_or_FIQ:) will call the hal_IRQ_handler function
> defined in hal/arm/edb7xxx/current/src/edb7xxx_misc.c. This
> latter function will then query the interrupt controller to
> determine where the interrupt comes from and return this as a
> number. Now the IR handler in vectors.S will get the address
> of the function from a table (hal_interrupt_handlers) and
> call the corresponding interrupt.
I'm counting three interrupt lines, and an FIQ line myself. Does this
most likely mean that I will have to add the handling for the interrupt
that I'm using?
> I don't know details about the board you are using but if you
> are using a free interrupt or an interrupt not yet
> used/defined by eCos you should define one yourself. The only
> thing is that you have to make sure that this is the same
> number as returned by hal_IRQ_handler. You will also want to
> add this to hal/arm/edb7xxx/current/include/hal_platform_ints.h.
What's a free interrupt?
> Best is to first have a good look at the code, I did some
> single stepping through the interrupt handler before I
> understood what is going on (but I guess this is only
> possible with a hardware debugger and not with a GDB stub).
What's a hardware debugger? Doesn't sound like I want to get into using
a hardware debugger.