Introduction to the Xilinx Software Development Kit (SDK)

  • Hardware: WARP v3
  • Tools: Xilinx ISE 14.4 or later

This exercise uses the Xilinx Software Development Kit (SDK) and WARP v3 hardware to build a classic "Hello World" program.


  • One WARP v3 kit
  • ESD protection for the WARP board (wrist strap, etc)
  • Micro-USB cable (for WARP v3 - PC UART connection)
  • PC with:
  • Local copy of the WARP svn repository



  1. Download the WARP v3 "Lite" template project:
    • The "On Board Peripherals" template will also work
    • Refer to the WARP v3 user guide for more details about the template projects
  2. Extract the template project archive
    • The full path containing the template project must not contain spaces. C:\work\w3_TemplateProject_Lite_v1p4\ is good; C:\My Projects\w3_TemplateProject_Lite_v1p4 is bad.
    • Navigate to the template project folder and find the sub-folder named SDK_Workspace - you'll need this below
  3. Launch the Xilinx SDK, either from the Start Menu or the desktop icon.
  1. Launch the Xilinx SDK from the Start Menu. It will ask you to select a workspace. Click "Browse ..." and navigate to the "SDK_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 here. Click OK.
  2. Rather strangely, the Xilinx SDK does not automatically know about software drivers to custom peripherals in your XPS project. You have to explicitly tell the SDK where to find your hardware project. This is a step you have to do with every new SDK workspace. In this exercise, we do not have any custom peripherals, but it is still a good habit to get into. Click on the "Xilinx Tools" menu item and select "Repositories." Here, you want to ensure two things:
    • In Local Repositories, you want to point the SDK to the folder that contains the XPS project system.xmp file. Click on "New..." and navigate to and select this folder.
    • In Global Repositories, you want the SDK to point to the edk_user_repository folder on your hard drive. Unlike the local repositories, the SDK does remember this setting across workspaces. You'll only need to manually add the edk_user_repository the first time you run the SDK.
  3. In the template project you downloaded, we have provided a template software project. We now need to add it to the workspace. Click on File→Import...
  4. Click the + next to "General" and select "Existing Projects into Workspace." Then click "Next."
  5. In the "Select root directory:" click "Browse..." Then, navigate to the "SDK_workspace" folder in the extracted archive and click "OK"
  6. Three projects have now been populated in the "Projects" area of the import window. Make sure all of these are checked. Do not check "Copy projects into workspace" because these projects are already in the SDK_workspace folder. Click "Finish."
  7. The three projects now appear in the "Project Explorer" on the left of the screen:
    • 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 Introduction to XPS exercise.
    • The "*_bsp" is a "Board Support Package" and it contains the software drivers for the peripherals contained in the hardware platform.
    • The "*_example" project is the top-level software project that you will modify to add a print of "Hello World" to the UART.
  8. 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.
  9. 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:
    • The code sections to "ilmb_cntrl_dlmb_cntlr"
    • The data sections to "xps_bram_if_cntlr_0"
    • The heap and stack to "xps_bram_if_cntlr_1"
  10. 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"
  11. Make sure your WARP hardware is powered on (fan should be running). Also make sure the WARP hardware is connected via JTAG (for programming) and connected via micro USB (for terminal communication) to your computer.
  12. 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.
  13. Open up a terminal emulator on your computer and configure it to accept your COM port with speed 57600 baud.
  14. 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 "*_example" project is highlighted. If it is not, click on it so that it will be.
  15. Click the menu item "Run" and then click "Run." A window will pop up asking you to select a way to run your "*_example" program. Click "Launch on Hardware" and then okay.
  16. 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.
  17. Try to modify any of the prints in the code with your own custom strings. Click save. The SDK will automatically recompile the project. Download it again through the "run" menu.
  18. Also, find the usleep(250000) line inside the userio_example() function. This line is telling the processor to wait for half a second before incrementing the displays upwards. Replace this with usleep(500000) and you should see the board count half as fast.


The purpose of this exercise was to take you through the whole process of writing software for an existing hardware project. In the System Generator Peripheral Export? exercise, you will develop a custom FPGA peripheral core and control it via custom software.

Additional Questions and Feedback

If you have any additional questions about this exercise or other feedback, please post to the WARP Forums.

Last modified 8 years ago Last modified on Mar 23, 2014, 2:18:01 PM