User Tools

Site Tools


sdk_setup_tutorial

Differences

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

Link to this comparison view

sdk_setup_tutorial [2019/04/08 20:11] (current)
Line 1: Line 1:
 +====== SDK Setup Tutorial ======
  
 +This tutorial will show you how to setup an SDK project for ECEn 330 that runs on a ZedBoard.
 +
 +  * Download this zip file: {{::​330_hw_platform.zip|}} and extract the contents somewhere on your computer.
 +
 +The zip file contains the files necessary to configure the ZedBoard hardware. We will use the same hardware configuration files all semester.
 +
 +  * Open up the Xilinx SDK. The Workspace Launcher will appear.
 +{{ :​start_sdk.png?​nolink |}}
 +{{ :​workspacelauncher.png?​nolink |}}
 +
 +We will create the workspace on your CAEDM drive so that you may use it on any computer in the lab and your files will be safer. You can use the same workspace all semester.
 +
 +  * Click on "​Browse"​ and navigate to your J (CAEDM) drive.
 +  * Create a new folder for your workspace and with the folder selected click OK. 
 +  * Confirm the correct folder appears in the Workspace Launcher and click OK. The SDK will open with an empty workspace. ​
 +
 +Next we will add some things to the workspace. Starting with the hardware files you downloaded and extracted earlier.
 +
 +  * Select File -> New -> Project and the New Project wizard will appear.
 +  * Expand the Xilinx section, select "​Hardware Platform Specification"​ (as shown below), and click Next.
 +{{ ::​hardwareplatform.png?​nolink |}}
 +  * In the next window click on "​Browse"​ and navigate to the files you downloaded and extracted earlier. ​
 +  * Open the system.xml file. Your window should now look like the one shown below.
 +{{ :​hardwareplatform2.png?​nolink |}}
 +  * The project name has been filled in automatically and you can now click Finish.
 +
 +Your workspace now has a hardware platform to use as a target for the software projects you will create. If all you see is the Welcome tab then close this tab and you should see it. Next we will create a Hello World project that can run on the Zedboard.
 +
 +  * Select File -> New -> Application Project. Make sure you click "​Application Project"​ and not "​Project"​.
 +{{ :​applicationproject.png?​nolink |}}
 +  * Give the project a name like "​hello_world"​.
 +  * You will also be creating a new board support package (BSP) and you may want to give it a name different from the default.
 +
 +In the future when you create more application projects you can use the existing board support package rather than creating a new one.
 +
 +  * You shouldn'​t have to change anything else. Verify that your settings match the image below and click Next.
 +{{ :​projectsetup.png?​nolink |}}
 +  * Select the Hello World template and click Finish.
 +{{ :​helloworld.png?​nolink |}}
 +
 +The SDK will need a minute or so to finish setting up your new project and BSP. While you wait, use the Project Explorer on the left side of the screen to navigate to the helloworld.c file that was generated for you. Open this file and look at the code to see what you will be running on the board.
 +
 +{{ :​projectexplorer.png?​nolink |}}
 +
 +Prepare the ZedBoard to run helloworld. Make sure it is on and has two USB inputs connected to it. One of the USB inputs is used to program the board. The other input connects to the UART that allows the computer and board to communicate when a program is running. For example, the board can print the words "Hello World" to your computer screen by sending it over the UART.
 +
 +  * When the ZedBoard is ready, click on the "​Program FPGA" button near the top of the SDK screen as shown below.
 +{{ :​programfpga.png?​nolink |}}
 +  * Click Program in the window that pops up. This will program the FPGA and hardware on the Zedboard so it is ready to run software.
 +The blue "​DONE"​ light on the ZedBoard will turn on if programming completed successfully.
 +  * Select Run -> Run Configurations...
 +  * In the Run Configurations window, right click on "​Xilinx C/C++ application"​ and click New.
 +{{ :​runconfiguration.png?​nolink |}}
 +
 +A new ELF file will be created for your hello_world project. Now you have seen wizards and an elf! :-D You shouldn'​t have to change anything for the ELF file, but verify on the Main tab that the project the ELF is targeting is the hello_world project you created. Then check the "​Device Initialization"​ tab and verify that it has a path to the TCL file as shown below.
 +{{ :​deviceinit.png?​nolink |}}
 +
 +  * Congratulations! You may now click Run to run your software!
 +
 +Unfortunately,​ there is something more you must do to see "Hello World" printed. You must use a program that receives and sends input from the ZedBoard'​s UART. Please continue in the [[Tera Term Tutorial]]
 +
 +After running the ELF file once you should be able to run it by clicking the Run button. You shouldn'​t have to return "Run Configurations"​ to run it.
 +{{ ::​runbutton.png?​nolink |}}
sdk_setup_tutorial.txt ยท Last modified: 2019/04/08 20:11 (external edit)