Booting Linux in JTAG Mode - 2023.2 English

Zynq-7000 SoC Embedded Design Tutorial (UG1165)

Document ID
UG1165
Release Date
2024-05-02
Version
2023.2 English
  1. Check the following board connections and settings for Linux booting using JTAG mode:

    • Ensure that the settings of Jumpers J27 and J28 are set as described in Setting Up the Board.

    • Ensure that the SW16 switch is set to 00000, as shown in the following figure.

      JTAG Boot Mode

      JTAG Boot Mode

    • Connect an Ethernet cable from the Zynq 7000 SoC board to your network or directly to your host machine.

    • Connect the Windows host machine to your network.

    • Connect the power cable to the board.

  2. Connect a micro USB cable between the Windows host machine and the target board JTAG port with the following SW10 switch settings as shown in the following figure.

    • Bit-1 is 0

    • Bit-2 is 1

    Note

    0 = switch is open. 1 = switch is closed. The correct JTAG mode has to be selected, according to the user interface. The JTAG mode is controlled by switch SW10 on the ZC702 and SW4 on the ZC706.

    ../_images/image68.jpeg
  3. Connect a USB cable to connector J17 on the target board with the Windows host machine. This is used for USB to serial transfer.

  4. Change Ethernet Jumper J30 and J43 as shown in the following figure.

    ../_images/image69.jpeg
  5. Power on the target board.

  6. Launch Vitis IDE with any workspace.

  7. If the serial terminal is not open, connect the serial communication utility with the baud rate set to 115200.

    Note

    This is the baud rate that the UART is programmed to on Zynq devices.

  8. Download the bitstream by selecting Xilinx → Program FPGA, then clicking Program.

  9. Open the Xilinx System Debugger (XSCT) tool by selecting Xilinx → XSCT Console.

  10. At the XSCT prompt, do the following:

    1. Run connect to connect with the PS section.

    2. Run targets to get the list of target processors.

    3. Run ta 2 to select the processor CPU1.

    xsct% targets
    1 APU
    2 Arm Cortex-A9 MPCore #0 (Running)
    3 Arm Cortex-A9 MPCore #1 (Running)
    4 xc7z020
    xsct% ta 2
    xsct% targets
    1 APU
    2* Arm Cortex-A9 MPCore #0 (Running)
    3 Arm Cortex-A9 MPCore #1 (Running)
    4 xc7z02022
    

    Note

    ta is a short command for target. XSCT accepts short commands. Enter any numbers of the preceding characters of the XSCT commands. As long as there are no conflicts, they can be recognized by XSCT.

    1. Change working directory to images/linux in your PetaLinux project.

    Note

    On Windows, the XSCT shell regards the Windows path divider ` as escape character. Use `/`` or \\ instead, or add curly brackets {} for the Windows path name to make sure it is interpreted correctly.

    • Run dow zynq_fsbl.elf to download PetaLinux FSBL.

    • Run con to start execution of FSBL and then run stop to stop it.

    • Run dow u-boot.elf to download U-Boot.elf.

    • Run con to start execution of U-Boot. On the serial terminal, the auto-boot countdown message appears: Hit any key to stop autoboot: 3.

    • Press Enter. Automatic booting from U-Boot stops and a command prompt appears on the serial terminal.

    • At the XSCT Prompt, run stop. The U-Boot execution stops.

    • Run dow -data image.ub 0x30000000 to download the Linux kernel image.

    • Run con to start executing U-Boot.

  11. At the command prompt of the serial terminal, run bootm 0x30000000. The Linux OS boots.