This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Re: NETDEVTAB_ENTRY()????


On Thursday 29 December 2005 21:37, you wrote:

Hi Andrew,

Thanks for your reply...

Actually for our project we use the Templates-> Altera DDR ARM9/excalibur 
board( as Hardware) and default package......and we use lwip stack to develop 
driver for WLAN. We are not using any Interrupt...but use polling method and 
in ecos HAL i use startup type as "ROMRAM".

Actually  we are really confused about the default package we use in the 
template or we have to use net package or something else ????and is it a must 
to use interrupt instead of polling???

I really ask sorry for the present lengthy mail.....

1. Currently in my ecos.db for my target board I have included only LWIP 
Package....but from your previous reply, the support.c file is present in 
CYGPKG_NET_FREEBSD_STACK package only....When I include the 
CYGPKG_NET_FREEBSD_STACK along with LWIP_PACKAGE in my 
ecos.db the configtool showed me conflict..why????

2. So I cant use both lwip and free_bsd package in same target board..Right???

3. In support.c file...a Nework Thread ( cyg_netinit() ) is resumed and it 
waits for a flag....My doubt is whether I have to include the same support.c 
file for my lwip_stack (That include network thread, SYSINIT  macro and many 
other functions)???? Right now I dont have support.o (object file) in my Lib 
directory( target.ld )

4. If i have to use the same support.c file in lwip_stack, where I have to 
place that file in the Kernel ( ie,path )??? Or I have to write a seperate 
logic for implementation of the support.c file???

5. So I will come to my previous mail question.....I use the macro 
NETDEVTAB_ENTRY() MACRO in a .inl file.. and use CYG_HAL_TABLE_BEGIN() & 
CYG_HAL_TABLE_END() in high level Driver code with a different name (ie, not 
netdev) and not using support.c file (ie, eCos's existing NETDEVTAB 
table)...Even then my table entry is not made..why???

Plz Reply...  

Thanks and regards

Vasanth


> 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
> packages/net/bsd_tcpip/current/src/ecos/support.c.
>
> 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
> packages/devs/eth/i386/pc/lancepci/current/include/devs_eth_i386_pc_lancepc
>i.inl
>
> > 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
> redboot.
>
> > 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.
>
>         Andrew



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


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