Changes between Version 3 and Version 4 of Exercises/13_4/IntroToSDK/w2


Ignore:
Timestamp:
Dec 5, 2012, 12:01:10 PM (11 years ago)
Author:
chunter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Exercises/13_4/IntroToSDK/w2

    v3 v4  
    27271. 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."
    28281. The three projects now appear in the "Project Explorer" on the left of the screen:
    29  * 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/13_4/IntroToXPS]
     29 * 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/13_4/IntroToXPS/v2]
    3030 * The "*_bsp" is a "Board Support Package" and it contains the software drivers for the peripherals contained in the hardware platform.
    3131 * The "*_example" project is the top-level software project that you will modify to add a print of "Hello World" to the UART.
    32321. 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.
    33331. 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:
    34  * The code sections to "ilmb_cntrl_dlmb_cntlr"
    35  * The data sections to "xps_bram_if_cntlr_0"
     34 * The code sections to "ppc405_0_iocm_cntlr"
     35 * The data sections to "ppc405_0_docm_cntlr"
    3636 * The heap and stack to "xps_bram_if_cntlr_1"
    37371. 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"
    38 1. Make sure your WARP hardware is powered on and connected via JTAG to your computer.
    39 1. 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.
     381. Make sure your WARP hardware is powered on and connected via JTAG or USB to your computer.
    40391. Open up a terminal emulator on your computer and configure it to accept your COM port with speed 57600 baud.
    41 1. 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.
    42 1. 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.
     401. Click the "Xilinx Tools" menu item and then "Program FPGA." In the "ELF File to Initialize in Block RAM," select the "*_example.elf" file from the pulldown.
     411. Click Program. This will load the hardware and software design onto the board.
    43421. 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.
    44 1. 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.
     431. 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 "Program FPGA" menu like before.
    45441. Also, find the usleep(500000) 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(250000) and you should see the board count twice as fast.
    4645
     
    5049= Discussion =
    5150
    52 The purpose of this exercise was to take you through the whole process of writing software for an existing hardware project. In the [wiki:../SysGenExport System Generator Peripheral Export] exercise, you will develop a custom FPGA peripheral core and control it via custom software.
     51The purpose of this exercise was to take you through the whole process of writing software for an existing hardware project. In the [wiki:../SysGenExport/v2 System Generator Peripheral Export (v2)] exercise, you will develop a custom FPGA peripheral core and control it via custom software.
    5352
    5453= Additional Questions and Feedback =