lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Implementing 1.4.0 RC1 on Lattice Mico 32 upgrading Etherne


From: David Lypka
Subject: [lwip-users] Implementing 1.4.0 RC1 on Lattice Mico 32 upgrading Ethernet MAC Demo from 1.2.0
Date: Tue, 3 Aug 2010 03:34:09 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

I downloaded and ran a demo app which was built in 2007 on lwip 1.2.0. for  
Lattice Mico 32 on the ECP2 fpga development board.

The demo displays (out the LAN port) a web page from the embedded application.

I have a business requirement to convert an embedded application from RS232 PPP 
(old protocol) to PPPoe (new protocol) through a soft core Ethernet MAC LAN 
controller.

Now I want to evaluate the latest PPPoe module in lwip 
so I attempted to upgrade the Lattice demo to use lwip 1.4.0 RC1.

I took a lot of guesses and got it to build and 'start' to run.

The current status is  that the 'mainline loop' seems to run,
but pinging the board times out 100%.
When I ping, I get a Segmentation Faullt in the call
to 
CASE ETHTYPE_ARP:
   etharp_arp_input(netif, ethernetif->ethaddr, p):  // line 309 in ethernetif.c

This is the original ethernetif.c supplied by Lattice in 2007 and it is in an 
additional Lattice demo directory
not in lwip/src/netif

One build problem unresolved is:

I get this compile error in init.c (which I temporarily disabled):

#if ((LWIP_SOCKET || LWIP_NETCONN) && (NO_SYS == 1))

The original Lattice demo from 2007 had in lwipopts.h
  NO_SYS 1

In 1.2.0 there apparently was no LWIP_NETCONN, so the culprit must be 
LWIP_SOCKET 

I searched the demo code and do not see anywhere that is setting LWIP_SOCKET or 
LWIP_NETCONN

I see comments in the code such as

#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */

 Fixes I had to make to get 1.4.0 RC1 to build:
   1. lots of changes to socket.c to not use the errno table lookup
   2. some netlf includes had the wrong path - they needed 'netif' 
   3. api_lib.c was missing
          #include "lwip/api_msg.h"
   4. In etharp.c I had to remove the 'static' from etharp_ip_input() and 
etharp_arp_input() – it prevent export to the linker

My questions
1. I'm running on an FPGA chip (embedded) with no operating system, so I assume 
I MUST have NOSYS == 1, right?
2. What values should I set for LWIP_SOCKET and LWIP_NETCONN?
3. Where is documentation of LWIP_SOCKET and LWIP_NETCONN? I normally would 
look 
in the CHANGELOG, but I don't see much info for those.
4. I had to comment out all the ipv6 files so as to not cause duplicate def 
errors with ipv4
5. Are mailboxes only for NO_SYS not defined or 0?
   e.g sys_arch_mbox_tryfetch() - so I do not worry about it in my case?

Regards,

David Lypka.
    





reply via email to

[Prev in Thread] Current Thread [Next in Thread]