Issue using FreeRTOS+TCP w/ Zedboard

I’m hoping someone here has used FreeRTOS+TCP w/ a Digilent board like the Zedboard.

In Vitis 2022.1, when I create a new application project in the IDE, one of the built in XSA files is “Zed”. I have used this built in XSA file to create a FreeRTOS project with FreeRTOS + TCP on a Zedboard and I haven’t had any issue communicating over Ethernet using this library and this XSA.

However, if I go into Vivado and create my own XSA file, I noticed a difference. It turns out the TCP communication will work, but only if I use an Ethernet Hub (if I use a switch or connect directly to the zedboard I can’t even get a ping reply). However, with the built-in XSA file w/ Vitis I do not have this issue.

In my Vivado design I open up the Zynq block → MIO Configuration → Ensure ENET0 is enabled (MIO 16…27) and ensure MDIO 52..53 (instead of EMIO). Should I be configuring differently?

I have already posted on the Digilent Forums and haven’t gotten any response yet.

For reference, I’ve looked at this page:
https://digilent.com/reference/programmable-logic/guides/install-board-files

I’m pretty sure there are others on here that have created their own XSA files in Vivado.

One more thing to add…
I used my same XSA file which I created in Vivado to create a FreeRTOS w/ LWIP echo server application (one of the built in options in Vitis). Using LWIP, I do not have any issues. I can connect the Zynq ethernet port directly to my host computer and ping it no problem.

If I use the FreeRTOS+TCP library, then I can only ping the Zynq if I connect it and the host computer to an Ethernet hub (switch doesn’t work, direct connect doesn’t work).

This makes me think that maybe it has something to do with a FreeRTOS+TCP configuration and that my XSA file is just fine.

UPDATE:
Note 1: I noticed on LWIP that I get this on the console:
“unable to determine type of EMAC with baseaddress 0xE000B000”.
Perhaps that indicates something unique about my XSA?

Note 2: Under no condition using my XSA file can I get FreeRTOS+TCP to work without using an Ethernet hub.

One more note

Note3:
When I build my application the I get the warning
“ipconfigNIC_LINKSPEED100 is broken. Are you sure?”
This is from this line in the FreeRTOS+TCP source code

@svgarcia

What version of FreeRTOS+TCP are you using?

This should be because in the configuration file you might have defined ipconfigNIC_LINKSPEED100, but the Zynq interface is tested for 1000 MBit PHY speeds.

@tony-josi-aws

I am using FreeRTOS+TCP v4_3_1_1
w/ a patch from:
Endpoint mismatch in FreeRTOS_MatchingEndpoint by ravitd · Pull Request #1239 · FreeRTOS/FreeRTOS-Plus-TCP · GitHub

I think a good place to start would be to enable TCP debug messages and to post the messages that are printed during startup and during the attempted connection. In the ip config, add:

#include <xil_printf.h>
#define ipconfigHAS_DEBUG_PRINTF 1
#define ipconfigHAS_PRINTF 1
#define FreeRTOS_debug_printf( MSG )    xil_printf MSG
#define FreeRTOS_printf( MSG )    xil_printf MSG

If you are getting communication with a hub but not a switch, that maybe points towards MAC address or ARP messages not working correctly. Wireshark can be another tool to see what is going on because it will display ARP requests and responses.