I’m using FreeRTOSv7.5.3 on xilinx ML605 with soft processor Microblaze.
For to create a new project I’m following this guide :
and until now I have no problems in the management of task and aquire data from peripherals.
Now, I would like send this data to a NAS for writing on file. I need to use Ethernet but I don’t know how.
Thank you at all.
I think the BSP used in that demo is already using lwIP, so presumably the MAC is included in the FPGA design. You can look at the code that is already using lwIP, but if you need instruction on using lwIP I would suggest using the Wiki and mailing lists dedicated to that subject.
Hi Richard, thank you for answer.
I m reading about lwIP but if possibile I’d rather use UDP protocol.
If I try by the down guide :
I have a lots of problems with including libraries.
I have the same problem if I try to create a new project without this guide:
I tried many time to import the source and include freeRTOS files but with the same useless result.
I think the project already contains a low level driver to link lwIP into the Ethernet peripheral drivers provided in the Xilinx BSP. I would recommend the following:
Create a directory FreeRTOS-Plus\Source\FreeRTOS-Plus-UDP\portable\NetworkInterface\Xilinx_Ethernet_Lite
Copy the file NetworkInterface.c from the \FreeRTOS-Plus\Source\FreeRTOS-Plus-UDP\portable\NetworkInterface\SH2A directory into the directory you just created. The SH2A interface is very basic (no zero copy) so is a good starting point.
In the new NetworkInterface.c: Remove any SH2A specific header file includes, stub out xNetworkInterfaceInitialise() and xNetworkInterfaceOutput() [so they empty functions].
Add the following files to your project:
and the NetworkInterface.c file you just stubbed out.
Copy a FreeRTOSIPConfig.h file from a FreeRTOS+UDP demo into the directory containing your FreeRTOSConfig.h file.
Add the following paths to your include path:
- Try compiling and tidy up any errors.
Once you have it compiling you can remove the lwIP code, and the functions that initialise the lwIP demo, and implement the functions that were stubbed out in NetworkInteface.c by calling the Xilinx Ethernet driver functions as appropriate. You will also need to implement a function that passes received packets into the FreeRTOS+UDP task on a queue. You can find examples of how to do that in the other NetworkInterface.c files for the other chips. For example, in the LPC17xx driver ENET_IRQHandler() is the Ethernet interrupt handler, and it unblocks the prvEMACHandlerTask() task each time a packet is received. The prvEMACHandlerTask() places a reference to the received Ethernet frame into a structure obtained by calling pxNetworkBufferGet(), then posts the structure by reference onto the queue called xNetworkEventQueue.
I’m trying but I still have problems.
I made a new project as FreeRTOS hello world and it compiles with no problem.
- Create a directory FreeRTOS-Plus\Source\FreeRTOS-Plus-UDP\portable\NetworkInterface\Xilinx_Ethernet_Lite. Done.
- In the new NetworkInterface.c I’can’t find any SH2A specific header file includes but I removed xNetworkInterfaceInitialise() and xNetworkInterfaceOutput().
- I have FreeRTOSIPConfig.h and FreeRTOSConfig.h into the directory FreeRTOS-Plus\Source\FreeRTOS-Plus-UDP\includes\
when I try to compile this is the output :
Do I need the #include “hwEthernet.h”?
If I remove xNetworkInterfaceInitialise() and xNetworkInterfaceOutput() and #include “hwEthernet.h” I have this error: