[ECOS] SPI driver and constructor execution
Wed Apr 6 16:40:00 GMT 2005
>>>>> "Roman" == Rycerz Roman-G11565 <email@example.com> writes:
Roman> I have modified the SPI driver software that was posted
Roman> here and in CVS. I can can get it to compile and link...
Roman> the problem I have having is that when the system is
Roman> initializing the spi bus constructors don't get built... in
Roman> the image I don't even see the init routines or the cxx
Roman> files in insight when I go to debug it. I think I have
Roman> implemented the same macros and such... but something is
Roman> missing ????
Roman> I have looked at other drivers that are inited this was and
Roman> haven't found what I am missing.....
Roman> Any ideas ?
Does the application reference any of the SPI code or cyg_spi_device
structures, e.g. by calling cyg_spi_transfer() with a suitable first
argument? The SPI subsystem has been designed such that it all gets
eliminated by link-time garbage collection unless there is code which
actually uses it. That way SPI support can be added to a platform
without adding overhead to applications which do not use SPI.
If the application does reference a cyg_spi_device structure then that
will get linked in. The device structure references a cyg_spi_bus so
the linker has to pull that in, and that should cause the appropriate
constructor to be added to the executable automatically.
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss