[lwip-users] LWIP 1.4.0: migration from 1.3.2

46 views
Skip to first unread message

Dance, Brian

unread,
Nov 2, 2011, 11:40:13 AM11/2/11
to lwip-...@nongnu.org
Hi,
 
  I have migrated a Stellaris example of LWIP use with SafeRTOS from 1.3.2  to 1.4.0.     It is the safeRTOSdemo example on the Stellarisware CD in case anyone knows it.
 
  It was working OK on 1.3.2.
 
  I have followed the Upgrade note  and made changes to sys_arch.c and added timer.c and def.c
 
  On 1.4.0  it hangs the system.   It seems to be hanging in mem_malloc.  cc.h has #define LWIP_COMPAT_MUTEX  1
 
  If  I replace the hanging call of mem_malloc  with  statically allocated memory the application proceeds a little further but soon hangs up again.  The ethernet interface has no cable connected so it can't be receiving data.
 
Is there perhaps something I need to change in lwipopts.h?
 
There must be a lot of combinations to test.  Has 1.4.0 been tested with an RTOS and using binary semaphores as mutexes?   
 
 
Any suggestions would be welcome.
 
Regards
 
Brian
 
 
 
 
 

**********************************************************************
This e-mail is from Ultra Electronics Limited and any attachments to it are confidential to the
intended  recipient and may also be privileged. If you have received it in error please notify the
sender and delete it from your system. If you are not the intended recipient you must not copy
it or use it for any purpose nor disclose or distribute its contents to any other person.

All communications may be subject to interception or monitoring for operational and/or security purposes.
Please rely on your own virus checking as the sender cannot accept any liability for any damage arising
from any bug or virus infection. Ultra Electronics Limited is a company registered in England and Wales,
registration number 2830644. The address of its registered office is 417 Bridport Road, Greenford,
Middlesex, UB6 8UA.

**********************************************************************

w...@brolinembedded.se

unread,
Nov 2, 2011, 1:11:55 PM11/2/11
to Mailing list for lwIP users
On 2 nov 2011 16:40 "Dance, Brian" <Brian...@ultra-ccs.com> wrote:
 
Has 1.4.0 been tested with an RTOS and using binary semaphores as mutexes?   
 


Yes, at least I have.

/Timmy Brolin

Dance, Brian

unread,
Nov 3, 2011, 5:05:14 AM11/3/11
to Mailing list for lwIP users
Thanks.     Must be something I am doing wrong.  
 
Could you email your lwipopts.h  in case I am missing some option please? 
 
Was your test upgraded from 1.3.2 to 1.4.0. If so, do you recall things you had to change to make it work?  
 
Brian
     


From: lwip-users-bounces+brian.dance=ultra-...@nongnu.org [mailto:lwip-users-bounces+brian.dance=ultra-...@nongnu.org] On Behalf Of w...@brolinembedded.se
Sent: 02 November 2011 17:12
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LWIP 1.4.0: migration from 1.3.2

Dance, Brian

unread,
Nov 3, 2011, 8:43:43 AM11/3/11
to Mailing list for lwIP users
Apologies.   I have now found my problem in sys_arch.   I was returning a pointer to sys_sem_t rather than a copy of sys_sem_t. 
The Stellaris SafeRTOSdemo is now running  with LWIP 1.4.0.
 
===
Brian 


From: lwip-users-bounces+brian.dance=ultra-...@nongnu.org [mailto:lwip-users-bounces+brian.dance=ultra-...@nongnu.org] On Behalf Of w...@brolinembedded.se
Sent: 02 November 2011 17:12
To: Mailing list for lwIP users
Subject: Re: [lwip-users] LWIP 1.4.0: migration from 1.3.2

Anirudha Sarangi

unread,
Nov 3, 2011, 9:21:26 AM11/3/11
to Mailing list for lwIP users
Hi,
I had a small webserver application that I used to run lwip130. They system had a RTOS. I never had issues with that it was really stable.
 
Recently I upgraded to lwip140 and I am getting issues. With everything else remaining same (same application, same RTOS, same hardware), with lwip130 I see no issues, but with lwip140 I get issues.
 
The exact issue is, after I refresh my webpage multiple times, It just stops working. It is not that the system crashes, but the TCP communication is not proper.
Below is Ethereal log.
 
Can anyone point out what is going wrong in the TCPIP thread ?
 
regards
Anirudha
 
22 2.232379    192.168.1.100         192.168.1.10          HTTP     GET / HTTP/1.1
     23 2.252100    192.168.1.10          192.168.1.100         TCP      http > 1310 [RST, ACK] Seq=1 Ack=1 Win=8192 Len=0
     24 2.252189    192.168.1.10          192.168.1.100         TCP      [TCP Previous segment lost] http > 1310 [RST, ACK] Seq=2 Ack=201 Win=8192 Len=0
     25 2.343731    192.168.1.100         192.168.1.10          TCP      1311 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460 WS=2
     26 2.349221    192.168.1.100         192.168.1.10          TCP      1312 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460 WS=2
     27 2.352323    192.168.1.10          192.168.1.100         TCP      http > 1311 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460
     28 2.352385    192.168.1.100         192.168.1.10          TCP      1311 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0
     29 2.352429    192.168.1.10          192.168.1.100         TCP      http > 1312 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460
     30 2.352442    192.168.1.100         192.168.1.10          TCP      1312 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0
     31 2.352783    192.168.1.100         192.168.1.10          HTTP     POST /cmd/switchxhr HTTP/1.1
     32 2.353053    192.168.1.100         192.168.1.10          HTTP     POST /cmd/ledxhr HTTP/1.1
     33 2.372503    192.168.1.10          192.168.1.100         TCP      http > 1311 [RST, ACK] Seq=1 Ack=1 Win=8192 Len=0
     34 2.372576    192.168.1.10          192.168.1.100         TCP      http > 1312 [RST, ACK] Seq=1 Ack=1 Win=8192 Len=0
     35 2.372639    192.168.1.10          192.168.1.100         TCP      [TCP Previous segment lost] http > 1311 [RST, ACK] Seq=2 Ack=388 Win=8192 Len=0
     36 2.372695    192.168.1.10          192.168.1.100         TCP      [TCP Previous segment lost] http > 1312 [RST, ACK] Seq=2 Ack=385 Win=8192 Len=0
     37 4.148064    192.168.1.100         192.168.1.10          TCP      1313 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460 WS=2
     38 4.153375    192.168.1.10          192.168.1.100         TCP      http > 1313 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460
     39 4.153428    192.168.1.100         192.168.1.10          TCP      1313 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0
     40 4.153725    192.168.1.100         192.168.1.10          HTTP     GET / HTTP/1.1
     41 4.173564    192.168.1.10          192.168.1.100         TCP      http > 1313 [RST, ACK] Seq=1 Ack=1 Win=8192 Len=0
     42 4.173670    192.168.1.10          192.168.1.100         TCP      [TCP Previous segment lost] http > 1313 [RST, ACK] Seq=2 Ack=201 Win=8192 Len=0
     43 4.271916    192.168.1.100         192.168.1.10          TCP      1314 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460 WS=2
     44 4.273754    192.168.1.10          192.168.1.100         TCP      http > 1314 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460
     45 4.273807    192.168.1.100         192.168.1.10          TCP      1314 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0
     46 4.274105    192.168.1.100         192.168.1.10          HTTP     POST /cmd/switchxhr HTTP/1.1
     47 4.278653    192.168.1.100         192.168.1.10          TCP      1315 > http [SYN] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460 WS=2
     48 4.293703    192.168.1.10          192.168.1.100         TCP      http > 1314 [RST, ACK] Seq=1 Ack=1 Win=8192 Len=0
     49 4.293931    192.168.1.10          192.168.1.100         TCP      [TCP Previous segment lost] http > 1314 [RST, ACK] Seq=2 Ack=388 Win=8192 Len=0
     50 4.293950    192.168.1.10          192.168.1.100         TCP      http > 1315 [SYN, ACK] Seq=0 Ack=1 Win=8192 Len=0 MSS=1460
     51 4.293983    192.168.1.100         192.168.1.10          TCP      1315 > http [ACK] Seq=1 Ack=1 Win=65535 Len=0
     52 4.294809    192.168.1.100         192.168.1.10          HTTP     POST /cmd/ledxhr HTTP/1.1
     53 4.313882    192.168.1.10          192.168.1.100         TCP      http > 1315 [RST, ACK] Seq=1 Ack=1 Win=8192 Len=0
     54 4.313993    192.168.1.10          192.168.1.100         TCP      [TCP Previous segment lost] http > 1315 [RST, ACK] Seq=2 Ack=385 Win=8192 Len=0

gold...@gmx.de

unread,
Nov 3, 2011, 12:41:45 PM11/3/11
to Anirudha Sarangi, Mailing list for lwIP users
Anirudha, please do NOT use the reply-to button to start a new thread: email programs like mine that sort threads by using the mail ID cannot separate threads when doing this!


Anirudha Sarangi wrote:
Recently I upgraded to lwip140 and I am getting issues. With everything else remaining same (same application, same RTOS, same hardware), with lwip130 I see no issues, but with lwip140 I get issues.
 
The exact issue is, after I refresh my webpage multiple times, It just stops working. It is not that the system crashes, but the TCP communication is not proper.
Below is Ethereal log.
 
Can anyone point out what is going wrong in the TCPIP thread ?
Not from an ethereal log. I'm afraid you have to debug a bit further in the system. For example, try enabling debug output on the target somehow or see what code it executes when it stops working.

Simon
Reply all
Reply to author
Forward
0 new messages