Jihong,
I've look at your problem, and the solution is not easy. The porting of lwip under FREERTOS or SAFERTOS is not done.
According to the document available in the lwip distribution:
\lwip-1.3.2\doc\sys_arch.txt you will have to write (or found someone) who did this porting.
Right now, we do not have plan to provide this porting on Hercules family.