This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Build and Run Executable on Xilinx Zynq Platform

Configure a Simulink® model to generate code, build an executable, and then run the executable on your Xilinx® Zynq® platform. The executable runs in the Linux® environment on the ARM® Cortex-A9 processor on the Xilinx Zynq platform.

Configure the Model to Use ert.tlc

  1. Create a copy of your model using File > Save As. Keep the original model as a backup copy.

  2. With your model open, press Ctrl+E or select Simulation > Model Configuration Parameters.

  3. In the Configuration Parameters dialog box, click Hardware Implementation.

  4. Set the Hardware board parameter to either Xilinx Zynq ZC702/ZC706 Evaluation Kits or ZedBoard™ development board.

  5. Set the Operating system parameter to match the OS running on the target hardware: Linux or VxWorks.

  6. In Configuration Parameters, select the Code Generation pane.

  7. Display the items under Code Generation by clicking the triangle next to it.

  8. On the Code Generation pane, set System target file to ert.tlc.

  9. (Optional) If the target hardware operating system is set to VxWorks®, set Toolchain to Wind River Workbench GNU ARM or Wind River Workbench DIAB.

See also:

Build and Run the Executable

  1. Save your changes to the model.

  2. If your host computer is connected to multiple Xilinx Zynq platform boards, disconnect the ones you are not using.

  3. Click the Build Model button.

    The software performs the action specified by the Build action parameter. By default, this parameter is configured to build the executable, load the executable to the target hardware, and then run the executable in the Linux environment on the dual-core ARM Cortex-A9 processor on the Xilinx Zynq platform.

    By default, the executable runs on a single core. PIL simulation and PIL-based execution profiling require single-core execution. To configure the executable to run on both cores, see Multicore Processor Targets (Simulink).

  4. The software displays a code Generation Report for the model.

    When the software finishes building and downloading the executable to the hardware, it displays a command-line status window.

Troubleshooting a Connection Error

  1. If a connection timeout error occurs while the executable is downloading to the Zynq platform, try these steps:

  2. In the MATLAB® Command Window, enter:

    bdclose all
    clear all
    h = zynq()
    h = setupZynqHardware(h)
    connect(h)
    ans =
               0
    

    These commands close open models, reload settings from the Zynq platform.

    The final command, connect(h) returns a zero when the connection is made. Otherwise, perform the steps described in: Get IP Address of Xilinx Zynq Platform.

  3. Build the executable again by pressing Ctrl+B or clicking the build button.