MATLAB Answers

Cannot connect to Xilinx Zynq or Intel SoC platform using MATLAB/Simulink

60 views (last 30 days)
I am trying to connect to my Xilinx Zynq or Intel SoC platform in MATLAB/Simulink using Ethernet and USB-UART. I get the following error message:
>> 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.
I get the same error in step 4.4 of the HDL Workflow advisor ('Program Target Device') when I try to follow any of the built-in HW/SW co-design examples.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Jul 2019
Edited: MathWorks Support Team on 17 Jul 2019
The error message indicates that MATLAB/Simulink is trying to connect to the board over a serial USB-UART connection. This happens if the SSH connection could not be established via Ethernet.
In general, make sure that you have installed the correct Support Package according to your target workflow, and have fully completed the setup instructions:
More troubleshooting steps:
1) Fully format the SD card. Then, re-run the support package setup by opening the Add-On Manager, going to the Home tab, selecting Add-Ons > Manage Add-Ons and clicking on the cogwheel of the respective Xilinx Zynq/intel SoC support package entry. This will update the SD card Linux image, and verify that the communication link between MATLAB and your hardware is working properly.
2) Make sure the boot switches and jumpers on your board are configured to boot from SD card. See the board manual or the following instructions for Zynq platform.
3) Check that the Micro-USB cable is indeed plugged into the correct USB-UART port of the board. Evaluation boards like Zedboard expose many different Micro-USB ports which serve other purposes, such as USB-JTAG. For more information, please refer to the respective board manual.
4) Open Windows Device Manager and verify that the 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.
5) 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:
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 Ethernet connection.
Note that you must close the PUTTY serial connection before trying to connect to the board via MATLAB/Simulink again.

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 192.168.1.10(FTP 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 192.168.1.10, 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 and test the connection.

Sign in to comment.


Afifa Ishtiaq
Afifa Ishtiaq on 24 Mar 2021
Hi,
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 169.254.0.2 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!