public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] SPI driver and constructor execution
@ 2005-04-06 13:47 Rycerz Roman-G11565
  2005-04-06 16:40 ` Bart Veer
  0 siblings, 1 reply; 3+ messages in thread
From: Rycerz Roman-G11565 @ 2005-04-06 13:47 UTC (permalink / raw)
  To: 'Ecos-Discuss@Sources. Com (ecos-discuss@sources.redhat.com)'

Hi...
 
    I have modified the SPI driver software that was posted here and in CVS.   I can can get it to compile and link... the problem I have having
    is that when the system is initializing the spi bus constructors don't get built... in the image I don't even see the init routines or the  cxx files in insight
    when I go to debug it.  I think I have implemented the same macros and such... but something is missing ????
 
    I have looked at other drivers that are inited this was and haven't found what I am missing.....
 
    Any ideas ?
 
 
 
Roman F. Rycerz
Engr Section Manager, Motorola Automotive
 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] SPI driver and constructor execution
  2005-04-06 13:47 [ECOS] SPI driver and constructor execution Rycerz Roman-G11565
@ 2005-04-06 16:40 ` Bart Veer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Veer @ 2005-04-06 16:40 UTC (permalink / raw)
  To: roman.rycerz; +Cc: ecos-discuss

>>>>> "Roman" == Rycerz Roman-G11565 <roman.rycerz@motorola.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

-- 
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [ECOS] SPI driver and constructor execution
@ 2005-04-07 14:47 Rycerz Roman-G11565
  0 siblings, 0 replies; 3+ messages in thread
From: Rycerz Roman-G11565 @ 2005-04-07 14:47 UTC (permalink / raw)
  To: 'ecos-discuss@sources.redhat.com'

Bart


	Thanks...  I think I am doing that... But  I do reference the spi_transfer routines..
	If I am doing it right... I should see the spi init routines is the symbol table right ????


Roman


-----Original Message-----
From: Bart Veer [mailto:bartv@ecoscentric.com] 
Sent: Wednesday, April 06, 2005 11:40 AM
To: Rycerz Roman-G11565
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] SPI driver and constructor execution


>>>>> "Roman" == Rycerz Roman-G11565 <roman.rycerz@motorola.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

-- 
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-07 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-06 13:47 [ECOS] SPI driver and constructor execution Rycerz Roman-G11565
2005-04-06 16:40 ` Bart Veer
2005-04-07 14:47 Rycerz Roman-G11565

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).