This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: cyg_drv_interrupt_create() troubles
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Stephen Mose Aaskov <sma at 2m dot dk>
- Cc: ecos-devel at sources dot redhat dot com
- Date: Thu, 03 Oct 2002 16:10:47 +0100
- Subject: Re: cyg_drv_interrupt_create() troubles
- References: <00c001c26ac4$fb109f20$016d100a@2m.dk>
Stephen Mose Aaskov wrote:
> I´m working on a port of a NE2000 driver to our platform (MIPS R3000,
> Davicom Eth. controller).
>
> Currently I experience that the board crashes emidiatly after the call
> to cyg_drv_interrupt_create() in the driver_init function. If I wrap
> the code in cyg_interrupt_disable()/enable I can defer the crash to
> after the cyg_interrupt_enable() call.
>
> However, as I understand no activity involving the interrupt handler
> and interrupts should be possible until after a call to
> ..._interrupt_attach(). So all I have is a newly created interrupt
> object, that still manages to crash the board.
>
> Anyone eager to help out a bit here??
That's very odd. As you say, cyg_drv_interrupt_create() isn't meant to
really _do_ anything, only cyg_drv_interrupt_attach() is. You should still
be able to single step through that code even with ints disabled if you
set a breakpoint before it. Check that the interrupt vector is being set
up in the right place.
Enable CYGPKG_INFRA_DEBUG which will (among other things) show if you get
any unhandled interrupts.
Another option is something tangential like you are scribbling over memory
(and that memory _does_ contain something relevant for handling other
interrupts). Check all the locations you are passing in are valid.
Similarly check you aren't running out of stack.
I take it when you run with GDB it's not actually stopping with a SEGV or
SIGBUS then?
Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine