Jeff, Thanks a lot for this steps. By now, as I can see, I will have a lot of work to do.
If I got any sucees I will post in here, so anyone who needs something that looks like what I'm doing will be able to use it. Ty everyone []s André --- Em qui, 4/11/10, Jeff Barber <[email protected]> escreveu: > De: Jeff Barber <[email protected]> > Assunto: Re: [lwip-users] Help on porting LWIP > Para: "Mailing list for lwIP users" <[email protected]> > Data: Quinta-feira, 4 de Novembro de 2010, 15:55 > I went through this learning curve > last year and did essentially the > same thing (for a very different board environment). > The basic steps > are: > > 1. Create a cc.h for your port. This is > straight-forward and involves > choosing types for u8, u16, u32, etc. as well as setting > endianness > > 2. Create a sys_arch.h for your port. For a no-OS > (NOSYS=1) > environment, this is trivial. > > 3. Create an lwipopts.h for your port. Some is > straight-forward; some > is tricky even though the file is not large. It requires > you to make > choices about several things that you probably don't know > enough about > to make competent choices (at least that was the case for > me when I > started); you may need to ask questions on the list about > this. > > 4. Create a driver for your network adapter. This is very > device-specific and probably a pretty large task, > especially if you're > starting from nothing. This needs to: > A. Find and initialize the adapter and get it ready > for operation > (probably prime it with buffers to receive into). > B. Pull received frames from your network adapter > and place each > into an LWIP pbuf, then pass those up the stack into LWIP > C. Provide an entry point for LWIP that can take a > frame contained > within a pbuf and transmit it to your network adapter. > > 5. Call LWIP init function, add your driver above as a > netif under LWIP. > > 6. Create your main loop that essentially polls your > driver, and > periodically calls the LWIP housekeeping function. > > I've attached a sanitized version of my LWIP port files in > case it's > helpful as a model. Note that my system has gobs of > memory available > and the LWIP performance is not critical so my lwipopts.h > settings are > likely completely unsuitable for you. > > Jeff > > > > > On Thu, Nov 4, 2010 at 9:23 AM, Kieran Mansley <[email protected]> > wrote: > > On Thu, 2010-11-04 at 06:14 -0700, André wrote: > >> That is why we are looking for porting directly to > the board. But I > >> realy don't know how I do this. > > > > Porting to a new board, tool chain, etc is not a good > way to start with > > lwIP: the learning curve is steep and the > documentation is limited. I > > would start here: > > > > http://lwip.wikia.com/wiki/LwIP_Platform_Developers_Manual > > > > but I would expect you will need a lot of help to get > going. > > > > Kieran > > -----Anexo incorporado----- > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
