Changes between Version 17 and Version 18 of Exercises/13_4/IntroToSDK


Ignore:
Timestamp:
Aug 15, 2012, 4:18:19 PM (12 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Exercises/13_4/IntroToSDK

    v17 v18  
    66The SDK will look very familiar to users who are comfortable with the [http://www.eclipse.org/ Eclipse IDE]. Basically, the SDK allows users to write custom C or C++ code to execute on the MicroBlaze processor. Furthermore, it natively supports step-by-step debugging of code as well as code profiling.
    77
     8== Prerequisites ==
     9 * Set up a terminal on your computer using PuTTY or an alternative. Instructions to do this are available [wiki:HowTo/SetUpPuTTY instructions here].
     10 * Complete installation of ISE System Edition 13.4
     11 *
     12
    813== Instructions ==
    914
    10 1. Download either the [wiki:HardwareUsersGuides/WARPv3/TemplateProjects WARP v3 "On Board Peripherals" Template Project] or the [wiki:HardwareUsersGuides/WARPv2/TemplateProjects WARP v2 "On Board Peripherals" Template Project] according to the which hardware you are using.
     151. Download either the [wiki:HardwareUsersGuides/WARPv3/TemplateProjects WARP v3 Template Project] or the [wiki:HardwareUsersGuides/WARPv2/TemplateProjects WARP v2 Template Project] according to the which hardware you are using. Note: any template for your version of the hardware will work fine for this exercise as only the SDK is necessary. In general, when FPGA hardware designs must be generated, the "lite" template will build the quickest, but it lacks peripherals like Ethernet that may be necessary for the design.
    11161. Extract the archive into a folder on your hard drive. Note: this folder '''must not''' contain any spaces in the path (this includes the the Windows desktop, as that lives in a folder known as "Documents and Settings").
    12171. Launch the Xilinx SDK from the Start Menu. It will ask you to select a workspace. Click "Browse ..." and navigate to the "workspace" folder in the archive you just extracted. Do '''not''' check the box for "Use this as the default and do not ask again." We recommend the convention of using a single workspace per hardware project; checking this box will make this difficult. More useful tips for using the SDK are available [wiki:XilinxSDK here]. Click OK.
     
    20251. The three projects now appear in the "Project Explorer" on the left of the screen:
    2126 * The "*_hw_platform" contains all of the necessary hardware-specific information for the project. This includes any custom FPGA cores that the project may have. This comes from the Xilinx Platform Studio (XPS) tool. Instructions for using this tool to generate hardware platform information for the SDK is available in the [wiki:Exercises/IntroToXPS]
    22 
    23 
    24 1. In the SDK, double click the warpvX_example.c file to open it in the editor. At this point, you can look through this source code and see that it basically will print some messages to the terminal and will count upwards, displaying the current count on the hexadecimal displays on the WARP board and the LEDs.
    25 1. Right click on the helloworld_0 software project and click "Generate Linker Script." Here, we will assign instruction and data pieces of our code to various pieces of memory in our XPS hardware project. Assign the following:
    26  * The code sections to "xps_bram_if_cntrl_0"
    27  * The data sections to "ilmb_cntrl_dlmb_cntlr"
     27 * The "*_bsp" is a "Board Support Package" and it contains the software drivers for the peripherals contained in the hardware platform.
     28 * The "*_example" project is the top-level software project that you will modify to add a print of "Hello World" to the UART.
     291. Click the + button next to the "*_example" project. Then open the "src" folder by clicking the + button next to it. Finally, double click the "*_example.c" file to open it in the editor. At this point, you can look through this source code and see that it will print some messages to the terminal and will count upwards, displaying the current count on the hexadecimal displays on the WARP board and the LEDs.
     301. Right click on the "*_example" software project in the Project Explorer and click "Generate Linker Script." Here, we will assign instruction and data pieces of our code to various pieces of memory in our XPS hardware project. Assign the following:
     31 * The code sections to "ilmb_cntrl_dlmb_cntlr"
     32 * The data sections to "xps_bram_if_cntlr_0"
    2833 * The heap and stack to "xps_bram_if_cntlr_1"
    29 1. Click "Generate" and then "Yes" to the message that says you are going to overwrite an existing linker script. The console will print messages and end with "Finished building: helloworld_0.elf.elfcheck"
     341. Click "Generate" and then "Yes" to the message that says you are going to overwrite an existing linker script. The console will print messages and end with "Finished building: *_example.elf.elfcheck"
    30351. Make sure your WARP hardware is powered on and connected via JTAG to your computer.
    31361. Click the "Xilinx Tools" menu item and then "Program FPGA." Then click Program. This will load the hardware design onto the board. It will not load the software project.
    32 1. Open up a terminal emulator on your computer and configure it to accept your COM port with speed 57600 baud. For further instructions on this process, see our [wiki:HowTo/SetUpPuTTY instructions here].
     371. Open up a terminal emulator on your computer and configure it to accept your COM port with speed 57600 baud.
    3338At this point, the software project is complete and ready to be tested on the hardware. Unfortunately, there are bugs in the SDK for designs that use a PowerPC instead of a Microblaze, so the instructions for the WARP v2 and WARP v3 hardware diverge at this point.
    3439
    3540=== WARP v3 ===
    3641
    37 28. The SDK is somewhat sensitive on what project has "focus" when you tell it to do something like load a design onto the board. Make sure the helloworld_0 project is highlighted. If it is not, click on it so that it will be.
     4216. The SDK is somewhat sensitive on what project has "focus" when you tell it to do something like load a design onto the board. Make sure the helloworld_0 project is highlighted. If it is not, click on it so that it will be.
    38431. Click the menu item "Run" and then click "Run." A window will pop up asking you to select a way to run your helloworld_0 program. Click "Launch on Hardware" and then okay.
    39441. The project is now running! You should see the LEDs and hexadecimal displays on the board incrementing twice a second. Furthermore, your terminal should be printing.