This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

spi_at91_init_bus errenously called twice during initialization


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]