This is the mail archive of the ecos-discuss@sources.redhat.com 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]

RE: eCos CVS <--> eCos 1.3.1 differences in net/eth_drv.




> -----Original Message-----
> From: gary@chez-thomas.org [mailto:gary@chez-thomas.org]On Behalf Of
> Gary Thomas
> Sent: Tuesday, May 08, 2001 4:39 PM
> To: Ivan Jakab
> Cc: ecos-discuss@sources.redhat.com
> Subject: RE: [ECOS] eCos CVS <--> eCos 1.3.1 differences in net/eth_drv.
>
>
>
> On 08-May-2001 Ivan Jakab wrote:
> > Hi,
> >
> > I'm currently moving support for a MIPS R3041 based board from the eCos
> > 1.3.1 tree to the current CVS tree. When building the eCos CVS
> tests I got
> > messages that claimed undefined reference for eth_drv_init(),
> eth_drv_recv()
> > and eth_drv_tx_done() in
> packages\io\serial\current\src\common\serial.c:xxx.
> > When comparing the eth_drv.c, where those functions are
> defined, from the
> > 1.3.1 and the CVS eCos I noticed that in the CVS they're
> defined as static.
> > I changed their definition not be static (as they were in the
> 1.3.1 tree)
> > and all the tests passed without any "undefined reference"
> messages. Why was
> > the definition of those functions changed to be static? Am I missing
> > something here?
>
> These interfaces have now changed and must only be accessed via
> the function
> tables (pointers).  Look at some of the other drivers for examples.
>

The thing that confuses me is that the "undefined reference to
eth_drv_xxx()" messages are connected to
packages\io\serial\current\src\common\serial.c. Here is the ouput I get when
building the eCos tests:

mipsel-r3041-elf-gcc -msoft-float -g -nostdlib -Wl,--gc-sections -Wl,-static
 -L//F/Projects/ecoscvs/TestRange/test/test_install/lib -Ttarget.ld -o
//F/Projects/ecoscvs/TestRange/test/test_install/tests/hal/common/current/te
sts/cache tests/cache.o

//F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
`serial_xmt_char':
//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:847: undefined reference to `eth_drv_tx_done'

//F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
`serial_rcv_char':
//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:915: undefined reference to `eth_drv_recv'

//F/Projects/ecoscvs/TestRange/test/test_install/lib/extras.o: In function
`serial_get_config':
//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:590: undefined reference to `eth_drv_tx_done'

//f/Projects/ecoscvs/ecoscvs-working/ecos/packages/io/serial/current/src/com
mon/serial.c:594: undefined reference to `eth_drv_init'

collect2: ld returned 1 exit status
make[1]: ***
[//F/Projects/ecoscvs/TestRange/test/test_install/tests/hal/common/current/t
ests/cache] Error 1
make[1]: Leaving directory
`/f/Projects/ecoscvs/TestRange/test/test_build/hal/common/current'
make: *** [tests] Error 2

Both of those files are eCos files. If the declarations for eth_drv_init(),
eth_drv_recv() and eth_drv_tx_done() in
packages\io\eth\current\src\net\eth_drv.c are static I get the "undefined
reference to ..." messages in
packages/io/serial/current/src/common/serial.c. If they're not static
everything goes fine. Additionaly, the line numbers that the linker reports
don't point to a meaningfull spot in the source code.

What could be the reason for this kind of behaviour? Why is it that a
function from an ethernet driver is needed in the serial driver? Any ideas?


Regards,

Ivan



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