lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Help needed with sequential API


From: Dany Thiffeault
Subject: [lwip-users] Help needed with sequential API
Date: Mon, 28 Sep 2009 13:07:16 -0400

Hi,

I'm trying to make my application using the sequential API work. I'm on a Atmel AVR 32, using the framework 1.4 and the LWIP version 1.3.1 (with port 1.3.0).

I'm not even able to compile my application. I'm having a hard time with the configuration of the IP stack and help would be much appreciated.
So, I'll start with my first problem and post the other one later when my first is fixed.

PROBLEM 1:
The only code reference I have is the ControlPanel example provided by the Atmel framework, but it uses the 1.2.0 LWIP version, so many things have changes. Below is my init function and even this is problematic:

// Setup lwIP.
// Initialize lwIP and its interface layer.
/*
#if LWIP_STATS
    stats_init();
#endif
    sys_init();
    mem_init();
    memp_init();
    pbuf_init();
    netif_init();
*/
    // Once TCP stack has been initialized, set hw and IP parameters, initialize MACB too.
    tcpip_init(CManagerEthernet::ConfigureInterfaceCallback, (void*)this);

First, I found out that I don't have to call the init functions myself, since now in the lwip 1.3.1, all those are called by the tcpip_init() function. Note that "ConfigureInterfaceCallback" is an empty function (code in comments). If the line in blue is commented, my code build without problems. When I uncomment the line in blue above, I get those errors:

src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp_in.o: In function `tcp_input':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp_in.c:378: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp_in.o: In function `tcp_process':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp_in.c:710: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp.o: In function `tcp_abandon':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp.c:245: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp.o: In function `tcp_slowtmr':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp.c:786: undefined reference to `lwip_tcp_event'
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core\tcp.o: In function `tcp_fasttmr':
src\SOFTWARE_FRAMEWORK\SERVICES\LWIP\lwip-1.3.1\src\core/tcp.c:818: undefined reference to `lwip_tcp_event'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 4813  ms. 

The thing is that my configuration is like this:
#define LWIP_EVENT_API                  0
#define LWIP_CALLBACK_API               1

When I check in the IP stack, the code in tcp.h is correctly disabled (the part using LWIP_EVENT_API is correctly disabled while the #else is functionnal). 
I'm I missing something? Is there other parameters related to "lwip_tcp_event" that needs to be checked? Also, my application is in C++, while the lwip is in C. I'm using "extern C" everytime I need to #include header files from the framework, but I mention it cause I really don't know where to look for at the moment.

Thanks,
DownyTif

PS: my second problem is related I think... when I uncomment another portion of my ethernet code, I get undefined references for "lwip_tcp_event" but also for all the "tcp_xxx" functions, ex. "tcp_recv"

reply via email to

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