This is the mail archive of the
mailing list for the eCos project.
On Thu, Dec 29, 2005 at 07:54:38PM +0530, vasantha.rajan wrote:
> On Thursday 29 December 2005 14:59, you wrote:
> Hi Andrew,
> Thanks for ur explaination for .inl file.
> You asked me a question...as follows
> "What are you trying to do here? Do you want to use eCos's existing
> NETDEVTAB table, or are you trying to implement your own table?"
> But to some extent only I understood your question.....
> I will list my doubts...
> 1. What is ecos's existing NETDEVTAB table and how many devices it contains
> (ie how many max table entry it can accomodate)????
The tables are only limited by the amount of memory you have.
The netdev table is created in
To put an entry into the table you use the macro NETDEVTAB_ENTRY
declared in netdev.h. For an example of how to use this macro see eg
> 2. In our application we have only one network device,so can I use the
> existing NETDEVTAB table??..or I have to create my own NETDEVTAB table???
It does not matter how many device you have, you should always use
NETDEVTAB_ENTRY and the netdev table. When the tcp/ip stack starts it
will then know about your devices and initialize them correctly.
> 3. If I want to create my own NETDEVTAB table, then what changes I have to
> make to my code what I have mailed previous???
Well you would not call it netdev for a start. Call it something else
so that it does not cause problems with the eCos netdev table. You can
however use the netdev table as an example of how it should be
done. There are other examples for using HAL tables, eg commands for
> 4. In my last mail, I gave a sketch of my code....., when I print the device
> name it prints tty/diag....How come in a NETDEVTAB table can I have a serial
> device???Or it is something else....???
I expect the problem is that netdev has been declared twice, once by
eCos and once by your code. This is getting the compiler/linker
confused and so putting things into the wrong table. Delete your
broken code and it will work a lot better.
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss