首页资源分类FPGA/CPLDXilinx > ZedBoard_Standalone_USB_Device_Tutorial_14_6_01

ZedBoard_Standalone_USB_Device_Tutorial_14_6_01

已有 460559个资源

下载专区


TI最新应用解决方案

工业电子 汽车电子 个人消费电子

上传者其他资源

文档信息举报收藏

标    签: ZedBoardUSBTutorial

分    享:

文档简介

ZedBoard的USB设置教程,根据此教程,ZedBoard可以被电脑通过USB识别出1MB的磁盘空间

文档预览

ZedBoard: Standalone USB Device Tutorial 3 January 2014 Version 14.6.01 Overview The archive contents, which accompany this document, contain pre-built ZedBoard binaries implementing an example Zynq application which demonstrates ZedBoard as a USB Mass Storage Device. Extract the contents of the accompanying archive to the following folder: C:\Avnet\ZedBoard\ This tutorial document builds upon the concepts and lab activities of the Xilinx ZedBoard: Zynq-7000 AP SoC Concepts, Tools, and Techniques document. Please refer back to this reference material on the ZedBoard community website for further information on how to configure and customize the underlying Zynq hardware platform. NOTE: The instructions contained in this document are reference purposes only to disclose the steps required to implement the USB Device example application upon the ISE 14.6 Pre-Defined Hardware Platform Template for ZedBoard. These instructions do not need to be completed if you are already using the pre-built files from the sd_image subfolder of the archive accompanying this document. For more information on the ISE 14.6 Pre-Defined Hardware Platform Template for ZedBoard used in this tutorial, please refer to the SDK documentation found here: www.xilinx.com/support/documentation/sw_manuals/xilinx14_6/SDK_Doc/tasks/sdk_t_hwspec.htm Objectives When this tutorial is complete, you will be able to:  Create an application project upon a Xilinx-provided hardware platform template  Run the USB Mass Storage Device example application on ZedBoard hardware © 2014 Avnet. All rights reserved. All trademarks and registered trademarks are the property of their respective owners. All specifications are subject to change without notice. NOTICE OF DISCLAIMER: Avnet is providing this design, code, or information "as is." By providing the design, code, or information as one possible implementation of this feature, application, or standard, Avnet makes no representation that this implementation is free from any claims of infringement. You are responsible for obtaining any rights you may require for your implementation. Avnet expressly disclaims any warranty whatsoever with respect to the adequacy of the implementation, including but not limited to any warranties or representations that this implementation is free from claims of infringement and any implied warranties of merchantability or fitness for a particular purpose. ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 Experiment Setup Software The software used to test this reference design is:  Windows-7 64-bit  Xilinx SDK 14.6  Cypress CY7C64225 USB-to-UART Driver o www.zedboard.org  Documentation  ZedBoard Cypress USB-to-UART Setup Guide Hardware The hardware setup used to test this reference design includes:  PC with minimum amount of additional RAM available for Xilinx tools as specified at www.xilinx.com/design-tools/vivado/memory.htm for either the 7Z010 or 7Z020 device o 4GB required but 8GB recommended  Avnet ZedBoard Kit o Includes necessary power supply, SD card, and one USB cable  One additional USB cable (Type A to Micro-USB Type B) – only one included in kit  (Optional) ZedBoard integrated USB-JTAG programming port (Xilinx Platform Cable, Digilent HS1 or HS2 cables are also supported) o If you don’t already have a JTAG Cable but wish to use one for this tutorial, Avnet recommends the Digilent HS2 Cable http://www.em.avnet.com/en-us/design/drc/Pages/Digilent-JTAG-HS2-Programming-Cable.aspx www.zedboard.org Page 2 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 Experiment 1: Create Application Project In this experiment, a new SDK workspace is established, a new application project is created, and the USB Mass Storage Device example application code is imported. 1. Launch Xilinx Software Development Kit (SDK) if not already open. Start  All Programs  Xilinx Design Tools  ISE Design Suite 14.6  EDK  Xilinx Software Development Kit. Figure 1 – The Xilinx Software Development Kit Application Icon 2. Set or switch the workspace to the following folder and then click the OK button: C:\Avnet\ZedBoard\SDK_Workspace\ Figure 2 – Switching to the Appropriate SDK Workspace www.zedboard.org Page 3 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 3. Close the Welcome screen if it appears in the SDK window by clicking on the X control in the tab. Figure 3 – Closing the SDK Welcome screen 4. Create a new SDK software application project by selecting the FileNew Application Project menu item. Figure 4 – Creating a New C Application Project www.zedboard.org Page 4 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 5. In the New Project wizard, change the Project name field to the xusbps_intr_example name. Use the dropdown for the Hardware Platform and select the zed_hw_platform(pre-defined) option. Set the Board Support Package to the Create New option and accept the default name of xusbps_intr_example_bsp. Leave the other settings to their default values. Click the Next button to continue. Figure 5 – Creating the xusbps_intr_example Application www.zedboard.org Page 5 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 6. Select the Empty Application project template and click the Finish button to complete the new project creation process using the Empty Application project template. Figure 6 – Using the Empty Application Project Template www.zedboard.org Page 6 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 7. The empty xusbps_intr_example application project is created along with a new Board Support Package (BSP) which is based upon the ISE 14.6 Pre-Defined Hardware Platform Template for ZedBoard in the zed_hw_platform folder. In the Project Explorer tab, expand the xusbps_intr_example folder tree and right-click on the src folder. Click on the Import option in the pop up menu. Figure 7 – Import Application Source Code www.zedboard.org Page 7 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 8. In the Import window, expand the General item, select the File System option, and click the Next button. Figure 8 – Importing from a File System www.zedboard.org Page 8 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 9. Click on the Browse button and select the following folder which contains the usbps_v1_04_a driver example application code that we wish to start from: C:\Xilinx\14.6\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\usbps_v_1_04_a\examples\ After this folder is selected within the Browse dialog, click the OK button to search the folder for files to import into the application project. Select All the example source files and then click the Finish button to complete the file Import operation. Figure 9 – Selecting Application Source Files www.zedboard.org Page 9 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 10. The SDK Console panel shows the results of the build. There may be warnings shown but make sure that the application is built without errors. Figure 10 – Application Build Console Window 11. After SDK finishes compiling the new application code, the ELF is available in the following location: C:\Avnet\ZedBoard\SDK_Workspace\xusbps_intr_example\Debug\xusbps_intr_example.elf www.zedboard.org Page 10 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 Experiment 2: Launching the Application on ZedBoard In this experiment, the example SDK application is launched on ZedBoard target hardware and the resulting ZedBoard USB Mass Storage Device is detected, formatted, and explored. 1. At this point the application is ready to be launched on the target hardware. Set the Boot Mode jumpers to Cascaded JTAG Mode, with JP7 through JP11 in the GND position. Figure 11 – Cascaded JTAG Boot Mode 2. For this example, the on-board USB-JTAG (J17) port will be used for application download. However, the Digilent HS2 USB-JTAG cable or Xilinx Platform Cable USB II should work in a similar fashion through a connection to the PC4 header J15. Attach one Micro-USB cable to the USB-JTAG port (J17) and make sure that the other end of this cable is connected to the development PC. Figure 12 – Connecting On-board USB-JTAG Port www.zedboard.org Page 11 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 3. Attach another Micro-USB cable to the USB OTG port (J13) and make sure that the other end of this cable is also connected to the development PC. 4. Remove any jumpers from JP2 and JP3 on ZedBoard in order to place the USB OTG controller into Device Mode of operation. 5. Turn power switch (SW8) to the ON position. ZedBoard will power on and the Green Power Good LED (LD13) should illuminate. 6. In the Project Explorer tab, right-click on the xusbps_intr_example project folder. Click on the Run As Launch on Hardware (GDB) option in the pop up menu. Figure 13 – Running xusbps_intr_example Application Code www.zedboard.org Page 12 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 7. Using the Launch on Hardware option will automatically create a run configuration using default settings and launch the application on the target platform. Once the application is launched and is running on the target hardware, Windows will enumerate a new USB Mass Storage Device and display a prompt to format the newly detected drive. Click on the Format disk button to open a Format Removable Disk dialog. Figure 14 – Format Disk Prompt 8. Using the default settings for the disk, click on the Start button to begin the disk formatting process. A warning about the contents of the disk being erased during the formatting process will appear. Click on the OK button to continue the formatting process. Figure 15 – Format Removable Disk www.zedboard.org Page 13 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 9. Once the format is complete, click the OK button and then click on the Close button to close the Format Removable Disk dialog. 10. Right clicking on the removable drive and selecting the Properties option from the drop down menu will show a disk with 1,024,000 bytes of capacity. Figure 16 – Removable Disk Properties 11. Small files can now be written to and read from the new removable disk. Keep in mind that the data for this removable drive is stored in volatile SDRAM on the target ZedBoard. Once ZedBoard is powered down, the data stored in this memory will be lost. www.zedboard.org Page 14 of 15 ZedBoard: Standalone USB Device Tutorial v14.6.04 3 January 2014 Revision History Date Version 03 Jan 2014 14.6.01 Revision Initial Release of Tutorial for ISE 14.6 www.zedboard.org Page 15 of 15

Top_arrow
回到顶部
EEWORLD下载中心所有资源均来自网友分享,如有侵权,请发送举报邮件到客服邮箱bbs_service@eeworld.com.cn 或通过站内短信息或QQ:273568022联系管理员 高进,我们会尽快处理。