This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: __NETDEVTAB__ length is zero
Andrew Lunn wrote:
> > > You'll need to provide a network driver structure for your controller.
> > > Look at the driver provided for the Cirrus Logic EDB7xxx family of
> > > processors for an example.
> > > .../devs/eth/arm/edb7xxx/
> >
> > Hi,
> >
> > The controller we are using is cs8900. We are directly using the driver
> > code of ..../dev/eth/arm/edb7xx/, after putting in a proper directory
> > structure and a few modifications to the addresses. All the related cdl
> > files are also identical. Still the problem persists.
>
> NETDEVTAB_ENTRY(edb7xxx_netdev,
> "edb7xxx",
> edb7xxx_cs8900_init,
> &edb7xxx_sc);
>
> This should be putting an entry into the table.
>
> Make sure this is being compiled. You can also look at the symbols in
> the object produced from this source. I use the ebsa driver with two
> ethernet devices.....
>
> arm-elf-objdump --syms devs_eth_arm_ebsa285_if_ebsa285.o | grep netdev
> 00000000 l d .ecos.table.netdev.data.ebsa285_netdev0 00000000
> 00000000 l d .ecos.table.netdev.data.ebsa285_netdev1 00000000
> 00000000 g O .ecos.table.netdev.data.ebsa285_netdev0 00000010 ebsa285_netdev0
> 00000000 g O .ecos.table.netdev.data.ebsa285_netdev1 00000010 ebsa285_netdev1
>
> and the same for install/lib/extra.o
>
> arm-elf-objdump --syms extras.o | grep netdev
> 000000f4 l d .ecos.table.netdev.data.ebsa285_netdev0 00000000
> 000001f8 l d .ecos.table.netdev.data.ebsa285_netdev1 00000000
> 000000f4 g O .ecos.table.netdev.data.ebsa285_netdev0 00000010 ebsa285_netdev0
> 000001f8 g O .ecos.table.netdev.data.ebsa285_netdev1 00000010 ebsa285_netdev1
>
> Andrew
Hi Andrew,
The part of the code you gave is getting compiled. For the commands you suggested
the output is also as you said. When I link the libraries with an application and see the
objdump I get same addresses for both of the following
__NETDEVTAB__ and __NETDEVTAB_END__.
Also the command you suggested when ran on an application gave me the following.
002fc000 l d .ecos.table.netdev.finish 00000000
002fc000 l d .ecos.table.netdev.begin 00000000
002fc000 l d .ecos.table.netdev.data 00000000
002fc000 g O .ecos.table.netdev.data 00000010 edb7xxx_netdev
The following piece of code in the 'cyg_net_init' routine of 'support.c' is not executing,
even once. And I am able to run the loop back tests.
for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) {
// diag_printf("Init device '%s'\n", t->name);
if (t->init(t)) {
t->status = CYG_NETDEVTAB_STATUS_AVAIL;
} else {
// What to do if device init fails?
t->status = 0; // Device not [currently] available
}
}
// And attach the loopback interface
Thanks in advance.
regards,
chandra