[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Lwip on external ram
From: |
Noam Weissman |
Subject: |
Re: [lwip-users] Lwip on external ram |
Date: |
Mon, 14 Aug 2017 10:42:17 +0000 |
Hi Milan,
What about the following definitions (taken from my own lwipopts):
#define MEMP_NUM_PBUF 100
#define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
I am using RAW API and Socket API so I am not sure if the above is a must if
you do not use RAW API.
The above are defined in opts.h but the default are much smaller. If
MEMP_NUM_PBUF is left as
default (16) you may see some slowness ...
If you need lots of RAM why not sent LwIP to 128K or even more... you have
sufficient RAM to use.
If you use the ST parallel SRAM interface it should be translucent for you.
Porting LwIP from 1.41 to 2.0x is not too complicated. The arch interface has
been somewhat changed.
Instead of using timers.h/c it has been changed to timeouts.h/c
Instead of struct ip_addr RemoteAddr; you use now ip4_addr_t RemoteAddr;
There is a nice migration document and probably some examples by ST out there...
BR,
Noam.
-----Original Message-----
From: lwip-users [mailto:address@hidden On Behalf Of vatmi
Sent: Monday, August 14, 2017 12:01 PM
To: address@hidden
Subject: Re: [lwip-users] Lwip on external ram
Hello Noam,
Thank you very much for your suggestions. For me, the scenario was a bit
different. All the sample applications and even one external applications are
working lie a charm with LwiP 1.4.1, so I considered testing also the
open62541 stack with the same version.
Speaking specifically on open 62541 requirement, the standard protocol
describes the SEND_BUFFER and RECV_BUFFER as 64K with TCP. Accordingly I made
the following memory settings in Lwipopt file
#define MEM_SIZE (50*1024)
#define MEMP_NUM_TCP_PCB 20
#define MEMP_NUM_TCP_PCB_LISTEN 15
#define PBUF_POOL_SIZE 20
#define PBUF_POOL_BUFSIZE 500
#define TCP_MSS (1500 - 40)
#define TCP_SND_BUF (7*TCP_MSS)
#define TCP_SND_QUEUELEN (6* TCP_SND_BUF/TCP_MSS)
#define TCP_WND (4*TCP_MSS)
#define LWIP_SO_RCVBUF 1
#define RECV_BUFSIZE_DEFAULT (7*TCP_MSS)
#define TCPIP_THREAD_STACKSIZE 2500
#define TCPIP_MBOX_SIZE 5
#define DEFAULT_TCP_RECVMBOX_SIZE 2000
All other applications are working fine with this settings. With respect to
open62541, it set up a lot of memory while establishes connection with a
Server. This was the reason why I was concerned with memory. Could you please
check if I am making any mistake with Lwipopt file?
And thanks for suggestions for upgrading to Lwip 2.0.2. I hope I might have to
redefine the ethernet also interfaces for this. Does it require too much effort?
BR
Milan
--
View this message in context:
http://lwip.100.n7.nabble.com/Lwip-on-external-ram-tp30498p30500.html
Sent from the lwip-users mailing list archive at Nabble.com.
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users