Do you have an RTOS or not? If you don't have an OS, no it is not needed.
Check out the NO_SYS constant, It must match your system i.e. == 1 if you're
running lwIP in stand alone mode.
Francois
----- Original Message -----
From: Dany Thiffeault
To: Mailing list for lwIP users
Sent: Monday, September 28, 2009 2:39 PM
Subject: Re: [lwip-users] Help needed with sequential API
Thanks Bill,
I found another way a second ago (before reading your answer). I just
modified the tcp.h functions back and forth and it worked. Looks like the tcp.h
file wasn't being rebuilt, not sure why, cause I was cleaning and building...
Not it builds ok. My second problem is also gone. I sent the code on the
AVR32 and tried to ping the address, it didn't work. By debug, I found out that
this hangs:
void
tcpip_init(void (* initfunc)(void *), void *arg)
{
lwip_init();
tcpip_init_done = initfunc;
tcpip_init_done_arg = arg;
mbox = sys_mbox_new(TCPIP_MBOX_SIZE);
#if LWIP_TCPIP_CORE_LOCKING
lock_tcpip_core = sys_sem_new(1);
#endif /* LWIP_TCPIP_CORE_LOCKING */
sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL,
TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO);
}
I found in my lwipopts.h file that TCPIP_THREAD_STACKSIZE is defined at 0 and
TCPIP_THREAD_PRIO to 1. Not sure why those are the defaults values. I definitly
need to change that I think, but I'm not sure what to put there in terms of
size and priority. Any advice?
Thanks again
DownyTif
On Mon, Sep 28, 2009 at 1:44 PM, Bill Auerbach <[email protected]>
wrote:
The problem is, only define ONE of these to 1, leave the #define for 0 out
//#define LWIP_EVENT_API 0
#define LWIP_CALLBACK_API 1
Bill
From: [email protected]
[mailto:[email protected]] On Behalf Of
Dany Thiffeault
Sent: Monday, September 28, 2009 1:07 PM
To: Mailing list for lwIP users
Subject: [lwip-users] Help needed with sequential API
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"
_______________________________________________
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_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users