Perhaps you find a raw-socket lwip example for another Cortex M MCU, the lwip calls are most probably the same. Because of peripheral and pin setup, I would still start with a SDK example for the specific processor. This saves a lot of time.
In my experience, there is very rarely the perfect example that fits your application exactly.
And be aware of limited resources of Cortex M devices in general. Ethernet can be demanding. A lot of IoT application fail in real-world environment, because they cannot deal with the average office network throughput.