Quad sw development
I used the branch Prior to our standardization of branches. I'm just merging to get back to standard.
Merge request reports
Activity
5 5 the quad, and the XSDK main project that runs on the Zybo. 6 6 7 ## Brief Intro 7 ## Intro 8 8 9 The main quad application is located at `src/quad_app/`. 9 There are three main portions to the system that runs the quad 10 11 - Quad Hardware 12 - Quad Software Drivers 13 - Control Loop 14 15 16 #### Quad Hardware 17 The quad hardware is located at `xsdk_workspace/system_hw_platform`. This 18 consists of the vhdl and associated wrapper code that specifies the hardware on 9 The main quad application is located at `src/quad_app/`. 9 There are three main portions to the system that runs the quad 10 11 - Quad Hardware 12 - Quad Software Drivers 13 - Control Loop 14 15 16 #### Quad Hardware 17 The quad hardware is located at `xsdk_workspace/system_hw_platform`. This 18 consists of the vhdl and associated wrapper code that specifies the hardware on 19 the FPGA. 20 21 Below is a block diagram of the hardware/software implementation: 22 23  Imu -> IMU
Controled -> Controlled (or Controller; can't tell what you meant)Edited by Austin Rohlfing
14 15 16 #### Quad Hardware 17 The quad hardware is located at `xsdk_workspace/system_hw_platform`. This 18 consists of the vhdl and associated wrapper code that specifies the hardware on 19 the FPGA. 20 21 Below is a block diagram of the hardware/software implementation: 22 23  24 25 #### Quad Software Drivers 26 The quad software drivers is all of the code that interacts with the sensors of 27 the quad and collects the data for the control loop to use. 28 For example receiving coordinates over wifi and reading measurements from the 29 accelerometer. 16 #### Quad Hardware 17 The quad hardware is located at `xsdk_workspace/system_hw_platform`. This 18 consists of the vhdl and associated wrapper code that specifies the hardware on 19 the FPGA. 20 21 Below is a block diagram of the hardware/software implementation: 22 23  24 25 #### Quad Software Drivers 26 The quad software drivers is all of the code that interacts with the sensors of 27 the quad and collects the data for the control loop to use. 28 For example receiving coordinates over wifi and reading measurements from the 29 accelerometer. 10 30 11 31 To run this application on the Zybo, we need to implement the hardware drivers, 19 the FPGA. 20 21 Below is a block diagram of the hardware/software implementation: 22 23  24 25 #### Quad Software Drivers 26 The quad software drivers is all of the code that interacts with the sensors of 27 the quad and collects the data for the control loop to use. 28 For example receiving coordinates over wifi and reading measurements from the 29 accelerometer. 10 30 11 31 To run this application on the Zybo, we need to implement the hardware drivers, 12 and provide a `main` function. This is done in `xsdk_workspace/real_quad/src`. 32 and provide a `main` function. 33 This is done in `xsdk_workspace/real_quad/src` To build the XSDK project, 29 accelerometer. 10 30 11 31 To run this application on the Zybo, we need to implement the hardware drivers, 12 and provide a `main` function. This is done in `xsdk_workspace/real_quad/src`. 32 and provide a `main` function. 33 This is done in `xsdk_workspace/real_quad/src` To build the XSDK project, 34 refer to the [XSDK instructions](xsdk_workspace/README.md). 35 36 We can also run this application on our own laptops for testing. 37 We call this implementation the "virtual quad". 38 This is modified in `src/virt_quad`. 13 39 14 We can also run this application on our own laptops for testing. We call this 15 implementation the "virtual quad". This is done in `src/virt_quad`. 40 #### Control Loop 41 The control loop is the algorithm that runs within the quad software drivers. 1 1 # XSDK Workspace 2 2 3 This directory is reserved for XSDK projects. 3 This directory is reserved for Xilinx XSDK projects and their respective hardware platforms. 4 5 ## What is XSDK 6 7 XSDK is a development tool made by Xilinx to create the files necessary to boot 8 the hardware and software on the FPGA. It includes a test editor based on 9 eclipse so the tools should feel vaguely familiar. 4 5 ## What is XSDK 6 7 XSDK is a development tool made by Xilinx to create the files necessary to boot 8 the hardware and software on the FPGA. It includes a test editor based on 9 eclipse so the tools should feel vaguely familiar. 10 Use our [how to use XSDK document](../doc/how_to_use_XSDK.md) or 11 [XSDK documentation webpage](https://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_1/SDK_Doc/index.html) 12 4 13 5 14 ## Setup 6 XSDK, being based on Ecplise, is rather fragile, so do yourself a favor 15 XSDK, being based on Eclipse, is rather fragile, so do yourself a favor 7 16 and read this section so things get setup correctly. 8 17 9 18 1. When you first open eclipse, select this directory, `xsdk_workspace`, as 13 22 add these projects, right-click on the project pane, and click on something 14 23 like "import projects". 15 24 16 1. Select "Import Existing Projects" (whereever that is) 17 2. And then select the xsd_workspace as the folder where you want to import 25 1. Select "Import Existing Projects" (wherever that is) 26 2. And then select the xsdk_workspace as the folder where you want to import - quad/doc/how_to_use_XSDK.md 0 → 100644
1 # How to use XSDK 2 3 ## Introduction 4 5 In this guide we will cover the following topics regarding XSDK: 6 - What Is XSDK 7 - How to open XSDK 8 - How to create a BSP 9 - How to create a new application project 10 - How to configure JTAG 11 - How to launch an Application Project - quad/doc/how_to_use_XSDK.md 0 → 100644
10 - How to configure JTAG 11 - How to launch an Application Project 12 - How to boot using an SD card 13 14 15 ## What is XSDK? 16 17 XSDK stands for Xilinx Software Development Kit and it does exactly that. 18 It builds the project C files and necessary packages into files that allow the 19 developer to program the Zybo board to whatever he/she desires granted it meets 20 the system constraints. 21 22 There are three main things required for a project: 23 1. A system hardware platform (automatically exporting design from XPS) 24 1. A Board Support Package (Contains software functions for interacting with 25 the Processing System controllers i.e. UART and I2C or logic cores on the FPGA) - quad/doc/how_to_use_XSDK.md 0 → 100644
13 14 15 ## What is XSDK? 16 17 XSDK stands for Xilinx Software Development Kit and it does exactly that. 18 It builds the project C files and necessary packages into files that allow the 19 developer to program the Zybo board to whatever he/she desires granted it meets 20 the system constraints. 21 22 There are three main things required for a project: 23 1. A system hardware platform (automatically exporting design from XPS) 24 1. A Board Support Package (Contains software functions for interacting with 25 the Processing System controllers i.e. UART and I2C or logic cores on the FPGA) 26 1. An Application Project (A simple hello world, an NES emulator, or something else) 27 28 As mentioned above the system_hw_platform is imported for us by XPS when we system_hw_platform
or system hardware platform. If it is a code/hardware identifier, format as such. Otherwise, leave it in EnglishEdited by Austin Rohlfing
- quad/doc/how_to_use_XSDK.md 0 → 100644
19 developer to program the Zybo board to whatever he/she desires granted it meets 20 the system constraints. 21 22 There are three main things required for a project: 23 1. A system hardware platform (automatically exporting design from XPS) 24 1. A Board Support Package (Contains software functions for interacting with 25 the Processing System controllers i.e. UART and I2C or logic cores on the FPGA) 26 1. An Application Project (A simple hello world, an NES emulator, or something else) 27 28 As mentioned above the system_hw_platform is imported for us by XPS when we 29 export our bitstream file to the XSDK. We’ll walkthrough the other two items 30 as well as programming the FPGA from within the XSDK. 31 32 ## Opening XSDK 33 34 Setting up access to the Xilinx tools is fairly straight forward given the - quad/doc/how_to_use_XSDK.md 0 → 100644
42 1. Coover 3050-11 and -12 43 Two machines in the Distributed Sensing and Decision Making Lab (Coover 3050) 44 come with the 45 tools already installed. However, the following steps need to be taken in 46 order to launch the 47 program 48 - In a terminal, enter `source /opt/Xilinx/14.7/ISE_DS/settings64.sh` 49 - In terminal type `xsdk &` 50 - When prompted, open directory `MicroCART/quad/xsdk_workspace` 51 1. ISU Remote Linux Servers (linux-X, research-x.ece.iastate.edu) 52 - `source Xilinx_Tools/setup_scripts/remote_servers/setup.sh` 53 - In terminal type `xsdk &` (Note: these servers are not good for 54 programming the Zybo board when it comes time to launch a program on the board) 55 - When prompted, open directory `MicroCART/quad/xsdk_workspace` 56 1. User PC 57 Some users may opt to download the Xilinx tools on their own PCs for - quad/doc/how_to_use_XSDK.md 0 → 100644
45 tools already installed. However, the following steps need to be taken in 46 order to launch the 47 program 48 - In a terminal, enter `source /opt/Xilinx/14.7/ISE_DS/settings64.sh` 49 - In terminal type `xsdk &` 50 - When prompted, open directory `MicroCART/quad/xsdk_workspace` 51 1. ISU Remote Linux Servers (linux-X, research-x.ece.iastate.edu) 52 - `source Xilinx_Tools/setup_scripts/remote_servers/setup.sh` 53 - In terminal type `xsdk &` (Note: these servers are not good for 54 programming the Zybo board when it comes time to launch a program on the board) 55 - When prompted, open directory `MicroCART/quad/xsdk_workspace` 56 1. User PC 57 Some users may opt to download the Xilinx tools on their own PCs for 58 development, but this is not recommended. 59 - Download the ISE Design Suite [here](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html) (~6GB) 60 - Run and open the local directory you project is in. - quad/doc/how_to_use_XSDK.md 0 → 100644
56 1. User PC 57 Some users may opt to download the Xilinx tools on their own PCs for 58 development, but this is not recommended. 59 - Download the ISE Design Suite [here](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html) (~6GB) 60 - Run and open the local directory you project is in. 61 62 63 ## Creating a new Board Support Package (bsp) 64 65 The BSP package is responsible for grabbing all necessary Xilinx library files 66 so they can be called by your program. In other words, it holds the drivers 67 necessary to interface with the hardware on the board. You shouldn't need to 68 make a new BSP but in the case you do, do your research as to what type of BSP you 69 want and need for the project. 70 71 1. Click File and select New->Board Support Package - quad/doc/how_to_use_XSDK.md 0 → 100644
59 - Download the ISE Design Suite [here](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html) (~6GB) 60 - Run and open the local directory you project is in. 61 62 63 ## Creating a new Board Support Package (bsp) 64 65 The BSP package is responsible for grabbing all necessary Xilinx library files 66 so they can be called by your program. In other words, it holds the drivers 67 necessary to interface with the hardware on the board. You shouldn't need to 68 make a new BSP but in the case you do, do your research as to what type of BSP you 69 want and need for the project. 70 71 1. Click File and select New->Board Support Package 72 1. In the New Board Support Package Project, enter a project name 73 (system_bsp in the example). 74 1. Ensure system_hw_platform and ps7_cortexa9_0 are selected in Target Hardware - quad/doc/how_to_use_XSDK.md 0 → 100644
66 so they can be called by your program. In other words, it holds the drivers 67 necessary to interface with the hardware on the board. You shouldn't need to 68 make a new BSP but in the case you do, do your research as to what type of BSP you 69 want and need for the project. 70 71 1. Click File and select New->Board Support Package 72 1. In the New Board Support Package Project, enter a project name 73 (system_bsp in the example). 74 1. Ensure system_hw_platform and ps7_cortexa9_0 are selected in Target Hardware 75 1. Ensure “standalone” is selected. 76 1. Click Finish to create the BSP 77 78 __IMPORTANT:__ If UART0 is enabled, follow the steps below, otherwise ensure 79 these are set properly anyway. 80 1. Click on “standalone” and change the 81 value of stdin AND stdout to ps7_uart_1 - quad/doc/how_to_use_XSDK.md 0 → 100644
82 1. Click OK when done, you should now see the BSP in the project explorer 83 84 ## Creating a new Application Project 85 Lastly, we have the software program that will run on the board. This is the 86 last piece to the Zybo puzzle, and we’re almost there. Projects can be written 87 in C or C++, and can use some standard libraries like stdio, stdlib, string, 88 and otherse. HOWEVER, some libraries (often from Linux) are not implemented 89 (like time.h), and alternate methods must be used for some things an OS would 90 normally handle. Hopefully you do not run into these instances. 91 (Off topic hint: If you need timing things, check out xtime_l.h) 92 1. Click File -> New -> Application Project to open the New Project box 93 1. Enter a project name, and select the “Use existing” radio button for the 94 BSP. We want to use our newly created one rather than create one. 95 1. Click next and select a template (Hello World is probably best) and hit Finish 96 1. The new project should appear on the Project Explorer. Expand the project, 97 src, and open the helloworld.c
Please register or sign in to reply