[INFO] lwIP version 2.0 Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
steved
Posts: 453
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 34 times

Re: [INFO] lwIP version 2.0

Postby steved » Wed Oct 11, 2017 3:16 pm

This is my own application. Possibly the fact that I'm using sockets throughout masks an interfacing problem at the direct-to-lwIP level.
Marginally different board also - F429.

I'll try and dig out one of the boards supported by the demo and try that sometime.

User avatar
Giovanni
Site Admin
Posts: 10313
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 227 times
Been thanked: 203 times
Contact:

Re: [INFO] lwIP version 2.0

Postby Giovanni » Wed Oct 11, 2017 3:25 pm

Thanks, I want to bring the whole thing to 17.6.x if it is stable enough.

Giovanni

rasm
Posts: 9
Joined: Thu Aug 24, 2017 6:35 pm
Has thanked: 2 times
Been thanked: 2 times

Re: [INFO] lwIP version 2.0

Postby rasm » Fri Oct 13, 2017 3:15 pm

Hi,

When I submitted the patches I didn't use lwIP's embedded HTTP server for the demos because I thought that the existing code was more helpful for a beginner starting ChibiOS/lwIP development.

I attach a patch that should fix the LWIP_TCPIP_CORE_LOCKING issue. I've tested this patch with the Olimex E407 board and the demo works regardless of the LWIP_TCPIP_CORE_LOCKING value.
Attachments
0001-Made-lwIP-demos-work-regardless-of-LWIP_TCPIP_CORE_L.zip
(985 Bytes) Downloaded 5 times

steved
Posts: 453
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 34 times

Re: [INFO] lwIP version 2.0

Postby steved » Fri Oct 13, 2017 6:18 pm

Interesting that I had quite unconsciously defined all these values in my own lwipopts.h file, so wouldn't have seen any problem!

A couple of differences between the two configuration files:
1. I found:
#define TCPIP_THREAD_STACKSIZE 550
was sufficient.
2. I've actually used higher thread priorities ATM:
This was a conscious change; whether it actually matters I'm not sure; will try and reducing this at some point.

Code: Select all

#define TCPIP_THREAD_PRIO               (NORMALPRIO + 2)    /* Increased from LOWPRIO + 1 */
#define LWIP_THREAD_PRIORITY            (NORMALPRIO + 1)    /* Increased from LOWPRIO */

I think I read somewhere (a long time ago) that the TCPIP thread needs a higher priority than the worker thread; not sure whether this is important.

User avatar
Giovanni
Site Admin
Posts: 10313
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 227 times
Been thanked: 203 times
Contact:

Re: [INFO] lwIP version 2.0

Postby Giovanni » Sun Oct 15, 2017 1:28 pm

Changes committed, I also changed the relative priorities as suggested by steved but still based on LOWPRIO.

The settings in static_lwipopts.h can be overridden from lwipopts.h so it can be changed.

Giovanni

steved
Posts: 453
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 34 times

Re: [INFO] lwIP version 2.0

Postby steved » Wed Nov 15, 2017 9:55 pm

These changes also fix bug #824 (line 58 on in cc.h)

And probably bug #729 - the change as suggested in the bug tracker has been implemented (lwipthread.c line 365)

User avatar
Giovanni
Site Admin
Posts: 10313
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 227 times
Been thanked: 203 times
Contact:

Re: [INFO] lwIP version 2.0

Postby Giovanni » Thu Nov 30, 2017 10:55 am

Thanks marked those as closed.

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 1 guest