cyg_drv_interrupt_create() troubles
Jonathan Larmour
jifl@eCosCentric.com
Thu Oct 3 08:10:00 GMT 2002
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
More information about the Ecos-devel
mailing list