Quality RTOS & Embedded Software

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




Loading

Using Two Xilinx Zynq GEM for to local nets

Posted by trob76 on January 20, 2016

I have been using FreeRTOS+TCP code to create a local net link between to embedded systems. However, I have a requirement to add another local link and used a second GEM feature of the Xilinx Zynq-7000 architecture.

Are there any examples to support this. At first glance, I am having trouble defining an interrupt handler for both xemac_psif. It seems I will need two handlers.

Does anyone have any recommendations or guidance to offer?


Using Two Xilinx Zynq GEM for to local nets

Posted by trob76 on January 20, 2016

UPDATE Looking at the code I am confused as the direction I should take. Both GEM features of the Zynq need to be used for two separate links. However, I see no way to instantiate two instances of the IP systems. Is there any advice to my problem?


Using Two Xilinx Zynq GEM for to local nets

Posted by rtel on January 21, 2016

Does this require a single instance of a TCP/IP stack to support two separate interfaces? If so the code cannot do that yet - but it is the next thing on the road map to be implemented.


Using Two Xilinx Zynq GEM for to local nets

Posted by heinbali01 on January 22, 2016

Hi Andrew,

Unfortunately my Zynq board only has one working Ethernet MAC, so I can not help you with the driver. At this moment, FreeRTOS+TCP indeed allows for only one IP-address and one interface. We are working on a version that allows for multiple Network Interfaces, each one with multiple IP addresses. That will include a loop-back interface (127.x.x.x).

Regards


Using Two Xilinx Zynq GEM for to local nets

Posted by trob76 on January 25, 2016

Thanks for the update. It is great that you have slated a two GEM solutions. I assume that two separate interfaces (and TCP stacks) are necessary. My understanding is that the interfaces (links) are concurrent and therefore would have their own stacks. The Zynq we are using has these features (XC7C020). In addition, there is requirement for a FTP and HTTP server to allow pushing files onto a solid-state FAT disk contained in DDR memory controlled by the Zynq. There is a demo of this in FreeRTOS+FAT. One of the links will be used for this facility. Maybe I can use the existing coding and have two links via the two GEM resources of the Zynq. Any help for this? Maybe you can provide a simple roadmap to an approach, please.


Using Two Xilinx Zynq GEM for to local nets

Posted by heinbali01 on January 27, 2016

I assume that two separate interfaces (and TCP stacks) are necessary.

No I would prefer to handle all IP traffic from within a single IP-task and a single stack. Until now one would bind a socket to a port number, it was assumed that all sockets were bound to the (single) IP-address. In the extended version you'll bind to a couple (address + port number). The stack will select the most appropriate network driver to send out the message.

My understanding is that the interfaces (links) are concurrent and therefore would have their own stacks.

Yes that would be a possibility. We'll keep this in mind, make sure that the stack uses a minimum of static/global variables.

In addition, there is requirement for a FTP and HTTP server

The FreeRTOS+TCP FTP server is quite complete. The HTTP server is less developed. Both servers run from a single task. That task blocks in a call to FreeRTOS_select(). As soon as any of its sockets needs attention, the task will unblock and do its work.

a solid-state FAT disk contained in DDR memory controlled by the Zynq.

Uh? Either DDR SDRAM memory or a solid state disk. The SDRAM is perfect for creating a fas RAM disk.

...and have two links via the two GEM resources of the Zynq. Maybe you can provide a simple roadmap to an approach, please.

Not sure if I understand your question. The FTP and HTTP servers will bind their server socket to the special IP address 0.0.0.0 (INADDR_ANY). Therefore they will accept connections from any of the network interfaces (GEM-1, GEM-2, WiFi if you like):

This configuration will be possible:

~~~~~ GEM-1 10.0.0.110 GEM-2 192.168.1.1 192.168.1.12 WiFi 192.168.4.1 Loop-back 127.x.x.x

~~~~~ Maybe it is clearer now why I prefer a single instance of the stack: servers like FTP/HTTP stand somewhere in between the interfaces and IP addresses.

Regards.


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




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS