krbvroc1 - 2017-01-18
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).
I am using the FreeRTOS 8.2.3 and LWIP1.4.1 that comes with Vivado (came with my Zybo [Zynq 7010] trainer board).
Windows demo - using free tools; Xilinx Zynq dual core ARM Cortex-A9. FreeRTOS+TCP UDP sockets examples. FreeRTOS+TCP TCP sockets examples. .Zynq (OS asymmetry) Linux on one Cortex-A9 core as remoteproc master FreeRTOS on the other Cortex-A9 core as remoteproc slave.Zynq (Application asymmetry) FreeRTOS on one Cortex-A9 core as remoteproc master FreeRTOS on the other Cortex-A9 core as remoteproc slave.Sitara AM572x (HW platform asymmetry).
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.
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.
I understand I will need to limit my interaction with lwip to a single thread and use FreeRTOS to communicate with the thread.
![Zynq Freertos Socket Zynq Freertos Socket](/uploads/1/2/3/7/123732544/301738988.png)
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.
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.