I am trying to come up to speed with this environment and have confused myself.
I am using the FreeRTOS 8.2.3 and LWIP1.4.1 that comes with Vivado (came with my Zybo [Zynq 7010] trainer board).
lwip says to use the RAW API for high performance TCP which I want to do. I planned on running the lwip it its own thread. The lwip RAW API examples
show a simple mainloop design that would appear to chew up 100% CPU in a tight loop polling for packets to process. I would seem a better design to invoke the receiver
from the DMA ISR (or use a task notification / semaphore) so it is interrupt / DMA driven.
It seems that in order to use the RAW API I have to define my lwip with NO_SYS even though I am running with FreeRTOS. (That is how vivado configured it).
I understand I will need to limit my interaction with lwip to a single thread and use FreeRTOS to communicate with the thread.
The very first thing I notice is that lwip says to create its threads using a sys_thread_new() call. If I am reading the lwip/Xilinx library correctly, that appears to be a wrapper for pthread_create().
How is that going to work with FreeRTOS and using xTaskCreate() and trying to communicate using a queue or task notify between the two. On the surface it doesn’t make sense and the whole thing is
confusing. Or do I ignore the lwip docs and use xTaskCreate() for my single lwip task – perhaps sys_thread_new is only when using socket/netconn API. I really just want to let lwip run in a single task and interact
with that task via the FreeRTOS stuff described in the book like task notifications, event groups, etc.