Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by roberto-plus on October 31, 2013

Hello guys, I'm using FreeRTOSv7.5.3 on xilinx ML605 with soft processor Microblaze. For to create a new project I'm following this guide : http://www.freertos.org/Free-RTOS-for-Xilinx-MicroBlaze-on-Spartan-6-FPGA.html 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.


FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by richardbarry on October 31, 2013

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.

Regards.


FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by roberto-plus on October 31, 2013

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 : http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusUDP/FreeRTOSUDPIPEmbeddedEthernet_Tutorial.shtml 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: http://www.freertos.org/Free-RTOS-for-Xilinx-MicroBlaze-on-Spartan-6-FPGA.html

I tried many time to import the source and include freeRTOS files but with the same useless result.

Best Regards.


FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by richardbarry on October 31, 2013

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:

1) Create a directory FreeRTOS-PlusSourceFreeRTOS-Plus-UDPportableNetworkInterfaceXilinxEthernetLite

2) Copy the file NetworkInterface.c from the FreeRTOS-PlusSourceFreeRTOS-Plus-UDPportableNetworkInterfaceSH2A directory into the directory you just created. The SH2A interface is very basic (no zero copy) so is a good starting point.

3) In the new NetworkInterface.c: Remove any SH2A specific header file includes, stub out xNetworkInterfaceInitialise() and xNetworkInterfaceOutput() [so they empty functions].

4) Add the following files to your project:

FreeRTOSDHCP.c FreeRTOSDNS.c FreeRTOSSockets.c FreeRTOSUDPIP.c portable/buffermanagement/BufferAllocation2.c and the NetworkInterface.c file you just stubbed out.

5) Copy a FreeRTOSIPConfig.h file from a FreeRTOS+UDP demo into the directory containing your FreeRTOSConfig.h file.

6) Add the following paths to your include path:

FreeRTOS-Plus-UDP/include FreeRTOS-Plus-UDP/portable/compiler/GCC

7) 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.

Regards.


FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by roberto-plus on November 4, 2013

Hi Richard, I'm trying but I still have problems. I made a new project as FreeRTOS hello world and it compiles with no problem. 1) Create a directory FreeRTOS-PlusSourceFreeRTOS-Plus-UDPportableNetworkInterfaceXilinxEthernetLite. Done. 2) done. 3) In the new NetworkInterface.c I'can't find any SH2A specific header file includes but I removed xNetworkInterfaceInitialise() and xNetworkInterfaceOutput(). 4) done 5) I have FreeRTOSIPConfig.h and FreeRTOSConfig.h into the directory FreeRTOS-PlusSourceFreeRTOS-Plus-UDPincludes 6) done.

when I try to compile this is the output : https://gist.github.com/anonymous/7301182

Do I need the #include "hwEthernet.h"? Best Regards.


FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by roberto-plus on November 4, 2013

If I remove xNetworkInterfaceInitialise() and xNetworkInterfaceOutput() and #include "hwEthernet.h" I have this error: https://gist.github.com/anonymous/7303699


FreeRTOS on Xilinx ML605 with Microblaze - problem with Ethernet

Posted by richardbarry on November 4, 2013

I replied to your other (same) thread.

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists