Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
learn:programmable-logic:tutorials:zedboard-programming-guide:start [2016/07/29 21:13] – [Zedboard Programming Guide in SDK] Sam Lowelearn:programmable-logic:tutorials:zedboard-programming-guide:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ======Zedboard Programming Guide in SDK====== ======Zedboard Programming Guide in SDK======
  
-**Under construction** +{{:reference:programmable-logic:zedboard-getting-started-with-zynq:zedboard-obl-bg-600.jpg?600|}}
- +
-pic FIXME+
  
 =====Overview===== =====Overview=====
Line 12: Line 10:
  
 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. 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.
 +
 ----- -----
  
Line 43: Line 42:
  
 ====1. Creating the Project==== ====1. Creating the Project====
-If you already have a working SDK project continue. If not, complete the [[https://reference.digilentinc.com/learn/programmable-logic/tutorials/zedboard-getting-started-with-zynq/start|getting started with Zynq]] tutorial to create a simple design to run hello world.+If you already have a working SDK project continue. If not, complete the [[/learn/programmable-logic/tutorials/zedboard-getting-started-with-zynq/start|getting started with Zynq]] tutorial to create a simple design to program with.
  
  
Line 49: Line 48:
 ----- -----
  
-====3. Programming the Basys3 using JTAG==== +====2. Programming the Zedboard using JTAG==== 
-JTAG is primarily used as a programming, debugging, and probing port and communicates through the micro-USB port. This makes interfacing with the Basys easy because the micro-USB connection both supplies power to your board, and the ability to program it.+JTAG is primarily used as a programming, debugging, and probing port and communicates through the "PROG" micro-USB port.(J17)
  
->3.1) First, make sure that the jumper JP1 is in the JTAG position and that the Basys 3 is plugged into your computer via micro-USB cord. Once the board is plugged in you should see something like this.+>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. 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog4.jpg?500|}}
 > >
->{{:basys3:basys3_screen_shot_2015-6-10_10.png?nolink&400|}} +>2.2) Next click on Xilinx Tools and then Program FPGA 
- +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog5.jpg?400|}} 
->3.2) Click "Program device" (in the green bar) then xc7a35t_0, select your .bit file in the bitstream file box, and click Program.+> 
 +>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 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog6.jpg?500|}}
 > >
->{{:basys3:30.png?nolink&600|}}+>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! 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog8.jpg?700|}}
  
-This will program your Basys3 through the JTAG connector. Once the programming window is closed go ahead and test out your board. Each slide switch at the bottom of your board should now toggle its respective LED on and off. 
 ----- -----
  
-====4. Programming the Basys3 using a USB Flash drive==== +====3. Programming the Zedboard using an SD card at startup==== 
-It is important to note that the USB device that you select to program the Basys3 must be formatted in Fat32. Other than that your device doesn't have to be empty and can contain other files and folders. At this point Vivado is no longer needed to program the FPGA, so you can minimize your project and follow these steps in File Explorer:+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.
  
->4.1) Make sure the jumper on JP1 is in the USB position.+>3.1) Make sure the jumpers on the Zedboard are in the following position. 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog12.jpg?400|}}
  
->4.2) Plug your USB flash device into your computer.+>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. 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog14.jpg?400|}}
  
->4.3) Open File Explorer and navigate to the root folder of your Vivado project.+>3.3) Create a boot image. This proccess can be found in Appendix A
  
->4.4) From root go to root > Project_name.runs > impl_1 and copy the .bit file.+>3.4) Place your boot image file onto a fat32 formatted SD card and plug it into your Zedboard.
  
->4.5) Go to the root of your USB device and paste the .bit file. The Basys3 on startup will only look through the USB's root for a file with a .bit extension so it is important that the only .bit file in root is the one that you want to be used to program the Basys3.+>3.5) Turn on your Zedboard and your application should run after the blue ready LED turns on.
  
->4.6) Safely remove the USB device from your computer and plug it into the USB port on the Basys3.+----- 
 +====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.7) Make sure your board is connected to your computer for power and turn on the Basys3. It should immediately begin writing the .bit file to the FPGA. +>4.1) Make sure the jumper on JP1 is in the JTAG position 
-Once finished your board should function exactly as it did when programming it with JTAG. Whether you were aware or not you just successfully programmed your Basys3 board two separate ways using the same .bit file.+>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog4.jpg?300|}} 
 +> 
 +>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. 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog14.jpg?400|}} 
 +> 
 +>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. 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog16.jpg?500|}} 
 +> 
 +>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 
 +> 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog15.jpg?300|}}
  
------ +When the zedboard is power cycled, your application will run after the blue ready LED lights up
-====5. Programming the Basys3 using Quad SPI==== +
-Quad SPI Flash is a non-volatile memory that the Basys3's FPGA chip looks at on every startup. If Quad SPI is flashed then the FPGA 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.+
  
->5.1) Make sure the jumper on JP1 is in the QSPI position+====Appendix A. Creating a boot image in SDK====
  
->5.2) In the Hardware Manager window, under hardware right click your device and click Add Configuration Memory Device...+>A.1) Navigate to Xilinx Tools-> Create boot image. You will have the following window show up.  
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog9.jpg?500|}}{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog10.jpg?500|}}
 > >
->{{:basys3:basys3_screen_shot_2015-6-10_9.png?nolink&400|}}+> ** *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.
  
->5.3) This window will pop up. Search for "Spansion" and select the 32 bit device (highlighted below). Click OK on the next window asking if you want to program the configuration memory device.+>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
 > >
->{{:basys3:32.png?nolink&500|}} +>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 
->5.4) Select the .bin file where it asks for a configuration file and finally click OK.+>Then click ok
 > >
->{{:basys3:34.png?nolink&500|}} +>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 
-Vivado will now erase the old configuration file, and reprogram your Basys3 with the demo file. From now on, when you power up the Basys3, the demo will load at startup until you reprogram it.+>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** 
 +> 
 +>{{:learn:programmable-logic:tutorials:zedboard-programming-guide:zedprog11.jpg?700|}}
  
 ----- -----
  
 {{tag>learn programmable-logic tutorial zedboard}} {{tag>learn programmable-logic tutorial zedboard}}