I have ported lwip version 2.0.2 following the guidelines I found in some forums. Everything works fine with one exception: when the network cable is disconnected and then reconnected again, the lwip stops working.
I was debugging the system and the problem is that, when the cable is disconnected the link drops (EPHY_STS_LINK in the PHY_PHYS_ADDR register, EMAC0_BASE), this is correct, but when the cable is connected again the link bit never returns to one, but remains in zero.
When this happens, the tivaif_process_phy_interrupt function calls netif_set_link_down and never netif_set_link_up (this function is called only once after reset). These functions seem to do nothing in lwip version 1.4.1, but in the new version, the TCP stack no longer receives packets.
I patched de code commenting the call to the function netif_set_link_down in tivaif_process_phy_interrupt. This patch makes the system work. But this solution is not the correct one, since the problem is that, for some reason, the physical layer does not detect that the cable has been connected again.