lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] problems compiling lwIP


From: Christiaan Simons
Subject: Re: [lwip-users] problems compiling lwIP
Date: Fri, 10 Dec 2004 10:31:49 +0100

On Thu, 2004-12-09 at 17:40, franz keuner wrote:
> Hi,

> In my main file I try to initialise the stack with the following commands:
>   mem_init(); memp_init(); pbuf_init(); netif_init(); ip_init(); udp_init();
> tcp_init(); that`s all for the moment.

You've missed etharp_init(); Also configure your interface
with either DHCP or a manual address
                               
netif_set_ipaddr(ethif, &ip);
netif_set_netmask(ethif, &nm);
netif_set_gw(ethif, &gw);
netif_set_up(ethif);

or 

dhcp_start(ethif);


> If I try to compile this main function I get some errors ("lwipopts.h" not
> found,"arch/sys_arch.h" not found). As a result I added a lwipopts.h for my
> MCU specifing that I don't use an operating system.
> With this file main compiled successfully.

You can create this easily based upon the default opt.h file.
Overrule your local defaults in your lwipopts.h.

> 
> But trying to execute "make" for my project there are errors:
> netif\cs8900if.c:
>    631:   p = etharp_output(netif, ipaddr, p);
> E 160: pointer mismatch at '='
>    683:     q = etharp_ip_input(netif, p);
> E 160: pointer mismatch at '='
>    693:     q = etharp_arp_input(netif, (struct eth_addr *)&netif->hwaddr,
> p);
> E 160: pointer mismatch at '='
> 
> (when I`m using an older version of the file etharp.h the compiling process
> goes a little bit further.)

I think your c16x port does not match the lwip release you've got.
This was changed some time ago. The contrib maintainers sometimes
forget to tag their stuff with the lwip release.

If you can use anonymous CVS and make a checkout of contrib/c16x
on the date the lwip version was released your problem is most likely
solved. (You can then use HEAD (the bleeding edge: not in the *.tar.gz
files) as well).

If you really really can't do this ask me for a recent checkout.

> the next error again in connection with etharp: 
> lwip\src\netif\etharp.c:
> if ((ETHARP_ALWAYS_INSERT) || (flags & ARP_INSERT_FLAG))
> E 117: "ETHARP_ALWAYS_INSERT" undefined
> 
> if I modify the code of etharp.c by adding: 
> #ifndef ETHARP_ALWAYS_INSERT
> #define ETHARP_ALWAYS_INSERT            1
> #endif
> 

This is because your header and c version do not match.
Same problem again.

> The making process ends with this modifications but not really successful:
> Linking and locating to project.out
> E 243: module inet.obj (INET_C): symbol '_htons': multiply defined
> E 243: module inet.obj (INET_C): symbol '_ntohs': multiply defined
> E 243: module inet.obj (INET_C): symbol '_htonl': multiply defined
> E 243: module inet.obj (INET_C): symbol '_ntohl': multiply defined
> total errors: 4, warnings: 0

Hmm. Try using the EDE grep to find out  where these
definitions hang out.

> I hope somebody can help...
> Thanks and regards,
> 
> Franz
> 

Bye,
Christiaan.

> 
> 
> Files included at the moment:
> ..\src\c167\lib.c
> ..\src\c167\main.c
> ..\src\c167\perf.c
> ..\src\c167\include\arch\cc.h
> ..\src\c167\include\arch\cpu.h
> ..\src\c167\include\arch\lib.h
> ..\src\c167\include\arch\perf.h
> ..\src\c167\include\netif\cs8900if.h
> ..\src\c167\netif\cs8900if.c
> ..\src\lwip\src\core\inet.c
> ..\src\lwip\src\core\mem.c
> ..\src\lwip\src\core\memp.c
> ..\src\lwip\src\core\netif.c
> ..\src\lwip\src\core\pbuf.c
> ..\src\lwip\src\core\raw.c
> ..\src\lwip\src\core\stats.c
> ..\src\lwip\src\core\tcp.c
> ..\src\lwip\src\core\tcp_in.c
> ..\src\lwip\src\core\tcp_out.c
> ..\src\lwip\src\core\udp.c
> ..\src\lwip\src\core\ipv4\icmp.c
> ..\src\lwip\src\core\ipv4\ip.c
> ..\src\lwip\src\core\ipv4\ip_addr.c
> ..\src\lwip\src\core\ipv4\ip_frag.c
> ..\src\lwip\src\include\ipv4\lwip\icmp.h
> ..\src\lwip\src\include\ipv4\lwip\inet.h
> ..\src\lwip\src\include\ipv4\lwip\ip.h
> ..\src\lwip\src\include\ipv4\lwip\ip_addr.h
> ..\src\lwip\src\include\ipv4\lwip\ip_frag.h
> ..\src\lwip\src\include\ipv6\lwip\ip.h
> ..\src\lwip\src\include\lwip\arch.h
> ..\src\lwip\src\include\lwip\debug.h
> ..\src\lwip\src\include\lwip\def.h
> ..\src\lwip\src\include\lwip\err.h
> ..\src\lwip\src\include\lwip\etharp.h
> ..\src\lwip\src\include\lwip\loopif.h
> ..\src\lwip\src\include\lwip\mem.h
> ..\src\lwip\src\include\lwip\memp.h
> ..\src\lwip\src\include\lwip\netif.h
> ..\src\lwip\src\include\lwip\opt.h
> ..\src\lwip\src\include\lwip\pbuf.h
> ..\src\lwip\src\include\lwip\raw.h
> ..\src\lwip\src\include\lwip\stats.h
> ..\src\lwip\src\include\lwip\tcp.h
> ..\src\lwip\src\include\lwip\udp.h
> ..\src\lwip\src\include\netif\etharp.h
> ..\src\lwip\src\include\netif\loopif.h
> ..\src\lwip\src\netif\etharp.c
> ..\src\lwip\src\netif\loopif.c
> ..\src\lwip\src\include\lwip\lwipopts.h

Looks fine. 


The information contained in this communication is confidential and is intended 
solely for the use of the individual or entity to whom it is addressed. Axon 
Digital Design Group is neither liable for the proper nor for the complete 
transmission of the information contained in this communication nor for any 
delay in its receipt. Axon Digital Design Group does not guarantee that the 
integrity of this communication has been maintained nor that the communication 
is free of viruses, interceptions or interference. If you are not the intended 
recipient of this communication, you are hereby notified that reading, 
disseminating, distributing or copying this message is strictly prohibited. In 
that case please return the communication to the sender and delete and destroy 
all copies. In carrying out its engagements, Axon Digital Design Group applies 
general terms and conditions, which contain a clause that limits its liability. 
A copy of these terms and conditions is available on request free of charge.







reply via email to

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