Troubleshooting connection issues with Xilinx Zynq platform

91 views (last 30 days)
This is a guide for troubleshooting connection issues with Xilinx Zynq boards when using MATLAB/Simulink workflows.
It applies to any supported Zynq evaluation board, namely: Zedboard, ZC702, ZC706, ZCU102, ZCU111 RFSoC, ZCU216 RFSoC, ADI RF SOM, or PicoZed.
You may see error messages such as the following when you try to create a "zynq" object at the MATLAB command line, or in step 4.4 of HDL Workflow Advisor ("Program Target Device") when you try to follow any of the Hardware/Software Co-Design examples:
>> z = zynq
Error using codertarget.zynq.internal.LinuxShell/setupZynqHardware (line 543)
Cannot connect to "Zynq hardware". Details: Could not connect to the hardware over Serial Port.
Check that USB cable is plugged into 'USB-to-UART' port of the hardware and the power switch
is turned on. If this error persists, switch off the hardware, wait for 10 seconds, switch on
the hardware and then repeat this step.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Dec 2021
Edited: MathWorks Support Team on 8 Dec 2021

1) Run the Support Package Setup 

Before you can use any MATLAB/Simulink features with Xilinx Zynq boards, you must make sure that you have installed the correct Support Package according to your target workflow, and have fully completed the Support Package Setup.
Here is an overview of all available Xilinx Zynq-related support packages with links to the setup instructions and troubleshooting pages:
To launch the Support Package Setup utility, go to the Home tab in MATLAB, select Add-Ons > Manage Add-Ons, find the support package for your target workflow, then click the Setup button as shown below.
The Setup utility will perform the following tasks:
  • It helps you make the correct network settings on the development computer and allows you to set/check the IP address of the board.
  • It copies the correct Mathworks Linux OS image to the SD card which you then insert into your board to boot from it.
  • It helps you apply the correct jumper settings on the board.
  • It performs a basic connection test.

2) Verify the Boot Switches & Jumpers

Make sure the boot switches and jumpers on your board are configured to boot from SD card. If your board does not boot our MathWorks Linux image from SD card, the support package features will not work. The correct boot switches and jumper positions should be indicated during the Support Package Setup; but you can also consult your board manual or the Setup links above.

3) Check the Hardware Connections

Besides the Ethernet connection, check that the Micro-USB cable is plugged into the correct USB-UART port of the board. Your evaluation board may expose many different Micro-USB ports that serve other purposes, such as USB-JTAG, so make sure you haven't accidentally chosen the wrong Micro-USB port. For more information, please refer to your board manual. While the USB-UART connection is not essential for working with Zynq boards, it serves as an important fallback when the Ethernet connection fails.
For Radio and Vision workflows, make sure that the RF FMC or HDMI I/O cards are firmly mounted onto the board.

4) Check the Status LEDs on your board

Turn the power switch of your board to ON. Your board should have one or several Status LEDs that indicate whether the boot was successful. The Status LED should first flicker green, then turn into steady green to indicate a boot success, or into steady red for a boot failure. See your board manual for further information.

5) Debug using PuTTY

Next, open Windows Device Manager on your development computer and verify that the Zynq device shows up under "Ports (COM & LPT)" after switching the hardware off and on again. If not, make sure your USB device drivers for the USB-UART Bridge are installed correctly.
Using the COM Port number that is shown for the device in Windows Device Manager, try to open a serial command line session using PuTTY. Detailed instructions can be found here: Opening a serial command line session with Xilinx Zynq hardware
You should be able to observe the Linux booting log in the terminal window when you power cycle the board. Enter IFCONFIG into the Linux command prompt to obtain the correct IP address for the Ethernet connection.
In case the boot fails, please contact MathWorks technical support with the output that you see in the booting log.
Important: Note that you must close the PUTTY serial connection before trying to connect to the board via MATLAB/Simulink again.

6) Verify the Network Settings on the Development Computer

With the board IP address that you obtained from PuTTY (for example, open the Network Settings on your Development Computer and specify a compatible IP address and subnet mask for the development computer network connection. See the following page for detailed instructions: Configure Network Interface Card (NIC) on Development Computer
Finally, try to ping the board from the development computer command line:

7) Configure the firewall to allow communication with the board

If the ping succeeds, but the connection from MATLAB/Simulink still fails, contact your local IT team to check the firewall settings on the development computer to not intercept the connection between MATLAB and the Zynq board. They need to make sure that:
  • The firewall does not block the IP addresses that the development computer and Zynq board use to communicate.
  • The  <matlabroot>\bin\matlab.exe process is allowed through the firewall. IMPORTANT NOTE: A rule must be set up for every installed version of MATLAB that you intend to use with Zynq hardware.

More Answers (3)

wei he
wei he on 21 Sep 2018
Hi, I have the same issue. after some config, I can see my zedboard boot correctly by serial tools window, and the Zedboard IP is works fine on both side win10<-->zedboard).
but when I on targetupdater step: command in MATLAB. This will update the SD card Linux image, and verify that the communication link between MATLAB and your hardware is working properly.
it always failed to update the SD card with error : can't access xxx drives ... there have 3 ways to connect the Matlab to Zedboard, even manual setting IP by, it still failed.

wei he
wei he on 21 Sep 2018
Edited: wei he on 22 Sep 2018
the Error info. detail is : Error while querying removable dirves.
  1 Comment
Stefanie Schwarz
Stefanie Schwarz on 26 Oct 2018
Hello Wei, did you actually insert the SD Card into your PC? It should not be in your board. The Support Package will copy the Linux Image onto the SD Card, then you can plug it back into the Board, boot the board and test the connection.

Sign in to comment.

Afifa Ishtiaq
Afifa Ishtiaq on 24 Mar 2021
I'm trying to run simulink example "Transmit and Receive a Tone Using Xilinx RFSoC Device - Part 2 Deployment". I'm using ZYNQ UlltraScale+ ZCU111 RFSOC. Simulink continuously prompts an issue of unable to connect to IP address although the same is written in SD card. I tried to connect it alot of times by continuous reboots. Out of so many tries it gets connected but again fails at Load design step. I've attached snaps of errors, sd card content (firmware), vivado binaries. I performed the same procedure on the other board and exampe ran succesfully. I have also attached SD card content for board too in folder SD card 1. Does anyone have any idea what can be the possible issue?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!