Hope you took into account the differences amongst F107 and F207. That
is your business.
/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
#define MEMP_NUM_TCP_PCB 2
That looks a bit too few...
There are too many trial and error comments and the word 'example' is
everywhere... you should search this list for memory configuration.
You can get some memory right now if you reduce your TCP_MSS, there is
no need to have it that big unless you known what you are doing.
Then you have to actually check WHY you are getting that memory error.
There are some other memory options in opt.h, your vendor did not put
them in lwipopts.h so they might be the defaults, but...
I can't help you further. I think there is a memory leak in that set of
examples bunched together.
Check you only call lwIP low level functions (those that are not netconn
or socket) from one and only one thread.