LPCOpen LWIP webserver dies

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by djlegge on Mon Feb 24 10:45:54 MST 2014
I downloaded lpcopen_2_07_lpcxpresso_nxp_lpcxpresso_1769.zip and built the lwip_tcpecho_freertos demo. It works fine.
Next, I added httpserver_raw from the lwip-contrib git repo. This was pretty easy to get built as part of the project.
I now call httpd_init() in vSetupIFTask(). I had to #define LPC_TX_PBUF_BOUNCE_EN as 1 in lwipopts.h otherwise I got the error LWIP_ASSERT("lpc_low_level_output: Not a DMA safe pbuf").
With the addition of #define LWIP_RAW as 1 in lwipopts.h, the basic web server builds and runs.
The web server shows one static (default) page and will cope with about 10 refreshes of this page but then starts to 'go slow' and eventually stops responding all together.
When this happens, ping does not respond, and nor does the tcpecho running on port 7.
LWIP does seem to still be running however. I've enabled the LWIP_DEBUG, HTTPD_DEBUG and LWIP_STATS and can't see anything obviously wrong except for dropped packets in the link_stats. This will show zero while the refreshes are working.
When I added some further pages with dynamic content (SSI's) then the webserver became unusable very quickly and appeared to run out of memory. I am not sure it this is related but I suspect it is...
I currently use the UIP (not LWIP) webserver successfully with FreeRTOS on an LPC1768 but we are planning to add some other services such as modbusTCP and I am not sure UIP will be up to the task (or at least will be awkward).
Does anybody have any ideas as to what might be going on ?