This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
spi_at91_init_bus errenously called twice during initialization
- From: "Bob Brusa" <bob dot brusa at gmail dot com>
- To: ecos-discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 17 Feb 2010 16:38:06 +0100
- Subject: [ECOS] spi_at91_init_bus errenously called twice during initialization
- Reply-to: bob dot brusa at gmail dot com
Hi
When enabling asserts, I get an Assert-failure: "Interrupt vector not
free". I digged a bit into it and found its caused by the fact that
the routine spi_at91_init_bus is called twice (although in my case bus0
only is enabled and bus1 disabled). The calls originate from the for-loop
in routine cyg_hal_invoke_constructors in file
arm\arch\current\src\hal_misc.c.
My application - a simple serial test - does not use the spi, but clearly,
the library I built includes it - see attachment. So the question is: How
does the spi-init get twice into this table of procedures in the above
mentioned for-loop. I could not figure this out and hence I added a
quick-fix to the routine spi_at91_init-bus and made it "callable once
only". This works, but its not nice. Does someone have good advice why
this routine gets called twice? or better - why the procedure is filled in
twice into this initialization-table?
Thanks Robert
Attachment:
icb_lib_2.ecm
Description: Binary data
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss