[INFO] lwIP version 2.0

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: 429
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 28 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: 10140
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 206 times
Been thanked: 183 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 3 times

steved
Posts: 429
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 3 times
Been thanked: 28 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: 10140
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 206 times
Been thanked: 183 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


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 1 guest