Zedboard Programming Guide in SDK (Obsolete)

This tutorial is obsolete. Check Creating a Baremetal Boot Image for Zynq-7000 Devices for a more recent version.

Overview

There are three ways you can program the Zedboard:

  • JTAG
  • Quad SPI Flash
  • SD Card

This tutorial will walk you through what you need to know to get started on your projects and program your Zedboard using each of the three possible methods. It is recommended that you first complete the “Getting Started with Vivado” guide before continuing with this project.


Prerequisites

Skills

  • Basic familiarity with Vivado
    • This experience can be found by walking through our “Getting Started with Vivado” guide

Hardware

  • Zedboard
  • Micro-USB cable

Software

  • Vivado Design Suite 2016.2
    • Newer/older versions can be used, but the procedure may vary slightly

Board Support Files

  • Zedboard Support Files

Downloads

none


Tutorial

1. Creating the Project

If you already have a working SDK project continue. If not, complete the getting started with Zynq tutorial to create a simple design to program with.


2. Programming the Zedboard using JTAG

JTAG is primarily used as a programming, debugging, and probing port and communicates through the “PROG” micro-USB port.(J17)

2.1) First, make sure that the jumpers JP7-JP11 are in the JTAG position (shown below) and that the Zedboard is plugged into your computer via micro-USB cord.


2.2) Next click on Xilinx Tools and then Program FPGA


2.3) Make sure you have the correct bit file selected and click finish. SDK should then give you a progress bar and complete the fabric programming


2.4) Finally find the .elf file in your main project, right click and select run as launch on hardware (system debugger) This will load your program into the arm processor and will run your program!

3. Programming the Zedboard using an SD card at startup

It is important to note that the SD card that you select to program the Zedboard with must be formatted in Fat32. Other than that your device doesn't have to be empty and can contain other files and folders.

3.1) Make sure the jumpers on the Zedboard are in the following position.
3.2) Create an First Stage Boot Loader by clicking file→new→application project then name it and select FSBL in the second page. You do not need to modify this project at all.
3.3) Create a boot image. This proccess can be found in Appendix A
3.4) Place your boot image file onto a fat32 formatted SD card and plug it into your Zedboard.
3.5) Turn on your Zedboard and your application should run after the blue ready LED turns on.

4. Programming the Zedboard using Quad SPI

Quad SPI Flash is a non-volatile memory that the Zedboard's Zynq chip looks at on every startup. If Quad SPI is flashed then the Zynq will program itself with the contents found in Quad SPI's flash memory. This method of programming your board is great when you have a final project that you would like to demo or display that doesn't need to be edited and therefore reprogrammed.

4.1) Make sure the jumper on JP1 is in the JTAG position


4.2) Create an First Stage Boot Loader by clicking file→new→application project then name it and select FSBL in the second page. You do not need to modify this project at all.


4.3) Create a boot image. This proccess can be found in Appendix A

4.4) Select Xilinx Tools→Program Flash and select your boot image file as your image file. Then press program.


4.5) Now that your QSPI flash is programmed, change the jumpers to the configuration below to program your board from QSPI. When the zedboard is power cycled, your application will run after the blue ready LED lights up

When the zedboard is power cycled, your application will run after the blue ready LED lights up

Appendix A. Creating a boot image in SDK

A.1) Navigate to Xilinx Tools→ Create boot image. You will have the following window show up.


*The next few steps must be done in order
A.2) Select an output BIF file path. This will log the results of the boot image output. The window should also automatically set your output path to the same location. Remember this location as the .bin file will be put on your SD card or QSPI.
A.3) Add the FSBL .elf file which can be found in your bootloader's project debug folder.
ex. zedboard_programming.sdk\bootloader\Debug
Then click ok

A.4) Now add the hardware .bit file which can be found in your hardware platform.
ex. zedboard_programming.sdk\design_1_wrapper_hw_platform_0\design_1_wrapper.bit
Then click ok

A.5) Finally add your applications .elf file as the last file. This can be found in the project's debug folder.
ex. zedboard_programming.sdk\zedboard_basic\Debug\zedboard_basic.elf
Click ok and your window should look like below. Once Create Image is pressed, your boot image is created to put on an SD card or into QSPI Flash.
*if your design purely uses the PL, a project elf file is not required