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?
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?
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.
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).
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.
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
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-2 192.168.1.1 192.168.1.12
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.