(Optional) Programming QSPI Flash with the Boot Image Using JTAG - 2023.2 English

Zynq-7000 SoC Embedded Design Tutorial (UG1165)

Document ID
UG1165
Release Date
2024-05-02
Version
2023.2 English

This is an alternative way for programming QSPI Flash with the flash programming tool. You can program QSPI Flash using JTAG and U-Boot. This method gives you more control because U-Boot is programmable. For example, you can extend this method to use Ethernet, rather than JTAG, to send BOOT.bin to the ZC702 DDR memory so that the program process can be faster.

  1. Power on the ZC702 Board.

  2. If a serial terminal is not already open, connect the serial terminal with the baud rate set to 115200.

    Note

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

  3. Select Vitis → XSDB Console… to open the XSCT tool.

  4. From the XSCT prompt, do the following:

    • Run connect to connect with the PS section.

    • Run targets to get the list of target processors.

    • Run ta 2 to select the processor CPU1.

    • Run dow fsbl.elf to download the FSBL image.

    • Run con and then run stop to use FSBL to initialize the Zynq-7000 device.

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

    • Run dow -data BOOT.bin 0x08000000 to download the Linux bootable image to the target memory at location 0x08000000.

      You just downloaded the binary executable to DDR memory. You can download the binary executable to any address in DDR memory.

    • Type con to start execution of U-Boot. U-Boot begins booting. On the serial terminal, the autoboot countdown message appears:

      Hit any key to stop autoboot: 3

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

  6. Perform the following steps to use U-Boot to program the bootable image to QSPI Flash in the serial console:

    • At the prompt, run sf probe 0 1000000 0 to select the QSPI Flash and set the clock to 1 MHz.

    • Run sf erase 0 0x01000000 to erase the Flash data. This command completely erases 16 MB of on-board QSPI Flash memory.

    • Run sf write 0x08000000 0 0xffffff to write the boot image on the QSPI Flash.

    Note that you already copied the bootable image at DDR location 0x08000000. This command copied the data, of the size equivalent to the bootable image size, from DDR to QSPI location 0x0.

    For this example, because you have 16 MB of Flash memory, you copied 16 MB of data. You can change the argument to adjust the bootable image size.

  7. Power off the board and follow the booting steps described in the following section.