Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| programmable-logic:eclypse-z7:environment-setup [2021/11/02 21:28] – created Arthur Brown | programmable-logic:eclypse-z7:environment-setup [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| /* nosemantic helps avoid this page being listed on google */ | /* nosemantic helps avoid this page being listed on google */ | ||
| - | This section contains the steps for setting the environment for [[# | + | This section contains the steps for setting the environment for [[# |
| - | Depending on the user needs, one can either use the projects we deliver in their own development process or use the libraries in their projects. If the second case is considered, the user should apply the below described settings to his project, in order to be able to build it. | + | Depending on the user' |
| - | ==== 1. Import Library and Demo Projects ==== | + | ==== Import Library and Demo Projects ==== |
| The steps below need to be followed in order to obtain a complete SDK workspace and to be able to build and run any of the projects, in either Linux or Baremetal platforms. | The steps below need to be followed in order to obtain a complete SDK workspace and to be able to build and run any of the projects, in either Linux or Baremetal platforms. | ||
| - | === 1.1. Linux Environment Project Setup === | + | === Linux Environment Project Setup === |
| /* For the Linux project demo, the operating system of the PC must be a Linux distribution with Xilinx Vivado 2019.1 installed. \\ */ | /* For the Linux project demo, the operating system of the PC must be a Linux distribution with Xilinx Vivado 2019.1 installed. \\ */ | ||
| The ZmodADC1410_Demo_Linux and ZmodDAC1411_Demo_Linux are run from Xilinx SDK.\\ | The ZmodADC1410_Demo_Linux and ZmodDAC1411_Demo_Linux are run from Xilinx SDK.\\ | ||
| - | This step by step tutorial roughly follows the [[https:// | + | This step-by-step tutorial roughly follows the [[https:// |
| <WRAP center round important 80%> | <WRAP center round important 80%> | ||
| The following steps are for the **Eclypse Z7** board. | The following steps are for the **Eclypse Z7** board. | ||
| - | If a Zmod ADC is used, it should be attached to the Eclypse Z7's ZMOD A port. If a Zmod DAC is used, it should be attached to the Eclypse Z7's ZMOD B port. | + | If a Zmod Scope is used, it should be attached to the Eclypse Z7's ZMOD A port. If a Zmod AWG is used, it should be attached to the Eclypse Z7's ZMOD B port. |
| </ | </ | ||
| + | |||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.1. Download the library == | + | **1. Download the Source Code** |
| * Download the git repository containing the libraries and demos using the below command: | * Download the git repository containing the libraries and demos using the below command: | ||
| < | < | ||
| - | |||
| - | NOTE: If you choose to download the repository as ZIP, the folder **zmodlib** will not be populated and you will have to populate it manually. | ||
| - | * The [[# | + | The directory created when you run this command (" |
| + | |||
| + | **Note:** //If you choose to download the repository as ZIP, the folder// zmodlib //will not be populated and you will have to populate it manually.// | ||
| + | |||
| + | If you want to download the Vivado and PetaLinux projects at the same time, instead clone the '' | ||
| </ | </ | ||
| Line 33: | Line 36: | ||
| </ | </ | ||
| - | == 1.1.2. Download the SD Card Image == | + | **2. Download the SD Card Image** |
| * Download the latest eclypse-debian-buster-armhf-rfs.img_X.X.zip Petalinux image from the Eclypse Z7 git repository [[https:// | * Download the latest eclypse-debian-buster-armhf-rfs.img_X.X.zip Petalinux image from the Eclypse Z7 git repository [[https:// | ||
| Line 48: | Line 51: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.3. Add Xilinx SDK Workspace Location | + | **3. Select |
| - | * The downloaded workspace contains demo applications for both Linux and Baremetal. | + | * The downloaded workspace contains demo applications for both Linux and Baremetal |
| * Open Xilinx SDK 2019.1 and assign the workspace location to the project download location. | * Open Xilinx SDK 2019.1 and assign the workspace location to the project download location. | ||
| - | * If you want to use the demo projects, open the desired Linux or Baremetal demo project. The projects are already configured and ready to be used, except the Linux project where SYSROOT environment variable must be set according to [[# | + | * If you want to use the demo projects, open the desired Linux or Baremetal demo project. The projects are already configured and ready to be used, except the Linux project where SYSROOT environment variable must be set according to the //Add SYSROOT Environment Variable// section |
| </ | </ | ||
| Line 61: | Line 64: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.4. Import | + | **4. Import |
| * File -> Import | * File -> Import | ||
| - | |||
| </ | </ | ||
| {{ : | {{ : | ||
| Line 69: | Line 71: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | + | | |
| - | | + | |
| </ | </ | ||
| {{ : | {{ : | ||
| Line 77: | Line 77: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | + | | |
| - | | + | |
| </ | </ | ||
| {{ : | {{ : | ||
| Line 87: | Line 85: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.5. Add SYSROOT Environment Variable in SDK == | + | **5. Add SYSROOT Environment Variable in SDK** |
| - | | + | |
| - | * In the SDK Project Explorer, right click on the application project you wish to run, then click “C/C++ Build Settings” | + | * In the SDK Project Explorer, right-click on the application project you wish to run, then click “C/C++ Build Settings” |
| - | * In the “C/C++ Build” group, select the “Environment” category | + | * In the “C/C++ Build” group, select the “Environment” category |
| - | * Add the SYSROOT variable pointing to the location where eclypse-debian-buster-armhf-sysroot rootfs folder can be found. For example “/ | + | * Add the SYSROOT variable pointing to the location where eclypse-debian-buster-armhf-sysroot rootfs folder can be found. For example “/ |
| - | * Click OK and wait for the Project to build | + | * Click OK and wait for the Project to build |
| </ | </ | ||
| Line 102: | Line 100: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.6. Find the Board IP Address | + | **6. Find the Board IP Address** |
| - | * In the UART Terminal connected to the board, log in with the username/ | + | * In the UART Terminal connected to the board, log in with the username/ |
| - | * Run the following command: | + | * Run the following command: |
| < | < | ||
| - | | + | |
| </ | </ | ||
| Line 114: | Line 112: | ||
| ---- | ---- | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.7. Establishing Connection to the Board == | + | **7. Establishing Connection to the Board** |
| - | * In the SDK Target Connections panel, open the Linux TCF Agent folder | + | * In the SDK Target Connections panel, open the Linux TCF Agent folder |
| - | * Right click on Linux Agent [default] and click Edit | + | * Right-click on Linux Agent [default] and click Edit |
| - | * Enter the board IP address into the Host section | + | * Enter the board IP address into the Host section |
| - | * Click Test Connection to make sure that SDK can communicate with the TCF-agent on the board | + | * Click Test Connection to make sure that SDK can communicate with the TCF-agent on the board |
| - | * Click OK | + | * Click OK |
| </ | </ | ||
| Line 127: | Line 125: | ||
| ---- | ---- | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.1.8. Run the Demo Project | + | **8. Run the Demo Project** |
| - | + | ||
| - | | + | |
| + | To run the demo application, | ||
| </ | </ | ||
| {{ : | {{ : | ||
| Line 136: | Line 133: | ||
| ---- | ---- | ||
| - | === 1.2. Baremetal Project Setup === | + | === Baremetal Project Setup === |
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.2.1. Download the Library == | + | **1. Download the Source Code** |
| - | * Download the demo project with the below command: | + | Download the demo project with the below command: |
| < | < | ||
| - | NOTE: If you choose to download the repository as ZIP, the folder **zmodlib** | + | The directory created when you run this command (" |
| - | | + | **Note:** //If you choose to download the repository as ZIP, the folder// zmodlib //will not be populated and you will have to populate it manually.// |
| + | |||
| + | If you want to download the Vivado and PetaLinux projects at the same time, instead clone the '' | ||
| </ | </ | ||
| Line 154: | Line 153: | ||
| ---- | ---- | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.2.2. Add Xilinx SDK Workspace Location | + | **2. Add Xilinx SDK Workspace Location** |
| * The downloaded workspace contains demo applications for both Linux and Baremetal. | * The downloaded workspace contains demo applications for both Linux and Baremetal. | ||
| Line 166: | Line 165: | ||
| ---- | ---- | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.2.3. Import Library to Xilinx SDK | + | **3. Import Library to Xilinx SDK** |
| - | | + | * File -> Import |
| </ | </ | ||
| Line 174: | Line 173: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | + | | |
| - | | + | |
| </ | </ | ||
| {{ : | {{ : | ||
| Line 182: | Line 179: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | + | | |
| - | | + | |
| - | + | ||
| </ | </ | ||
| {{ : | {{ : | ||
| Line 192: | Line 186: | ||
| ---- | ---- | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.2.4. Xilinx SDK Project Explorer | + | **4. Xilinx SDK Project Explorer** |
| * The ZmodADC1410_Demo_Linux and ZmodDAC1411_Demo_Linux projects must be closed or deleted from Project Explorer (right-click on project name-> Close Project or Delete) | * The ZmodADC1410_Demo_Linux and ZmodDAC1411_Demo_Linux projects must be closed or deleted from Project Explorer (right-click on project name-> Close Project or Delete) | ||
| - | |||
| </ | </ | ||
| {{ : | {{ : | ||
| Line 203: | Line 196: | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 1.2.5. Run the demo project == | + | **5. Run the Demo Project** |
| - | * Make sure the board is connected to your PC and it is powered on. | + | * Make sure the board is connected to your PC and it is powered on. |
| - | * Make sure the jumpers are set accordingly. | + | * Make sure the jumpers are set accordingly. |
| - | * Program the board: Xilinx -> Program FPGA | + | * Program the board: Xilinx -> Program FPGA |
| - | + | ||
| </ | </ | ||
| {{ : | {{ : | ||
| </ | </ | ||
| <WRAP GROUP> <WRAP COLUMN HALF> | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | + | | |
| - | | + | |
| </ | </ | ||
| {{ : | {{ : | ||
| </ | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | ==== 2. Create New Project/Use libraries in your project ==== | ||
| - | |||
| - | This use case is needed when an SDK workspace is created by the user. | ||
| - | The steps below need to be followed in order to obtain a complete SDK workspace and to be able to build and run any of the projects, in either Linux or Baremetal platforms. | ||
| - | |||
| - | === 2.1. Linux Environment Project Setup === | ||
| - | | ||
| - | == 2.1.1. Create New Project and Link zmodlib Folder == | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | It is assumed that Zmod and specific folders for Zmods (ZmodADC1410 for example) are placed in the SDK workspace root folder, as provided by Digilent (see [[# | ||
| - | * Create a new application project. | ||
| - | * Under src folder, right click option, select New / Folder | ||
| - | * Select Advanced | ||
| - | * Link to alternate location (Linked Folder) | ||
| - | * **Variables...** -> Select **WORKSPACE_LOC** -> Extend... -> Select **zmodlib** folder | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 2.1.2. Add “--sysroot” Project Setting == | ||
| - | |||
| - | * In the Project Explorer, right click on the project name, select “C/C++ Build Settings” | ||
| - | * In the “C/C++ Build” group, select “Settings” category | ||
| - | * Select “ARM v7 Linux g++ linker”/ | ||
| - | * In the Linker Flags field add < | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 2.1.3. Define LINUX_APP == | ||
| - | * In the Project Explorer, right click on the project name, select “C/C++ Build Settings” | ||
| - | * In the “C/C++ Build” group, select “Settings” category | ||
| - | * Select “ARM v7 Linux g++ compiler”/ | ||
| - | * Add LINUX_APP definition (using the ‘+’ button) | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 2.1.4. Add SYSROOT Environment Variable in the SDK == | ||
| - | * Download the latest eclypse-debian-buster-armhf-sysroot_X.X.tar.gz sysroot from [[https:// | ||
| - | * You need to expand the Assets section of the git page to find the file mentioned above | ||
| - | * In the Project Explorer, right click on the project name, select “C/C++ Build Settings” | ||
| - | * In the “C/C++ Build” group, select “Environment” category | ||
| - | * Add SYSROOT variable pointing to the location where Petalinux sysroot can be found. For example “/ | ||
| - | |||
| - | **Note**: //In Petalinux 2019.1 in order to build the sysroot image is necessary to run the following command: // | ||
| - | < | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 2.1.5. Define Libraries and Library Directories == | ||
| - | * In the Project Explorer, right click on the project name, select “C/C++ Build Settings” | ||
| - | * In the “C/C++ Build” group, select “Settings” category | ||
| - | * Select “ARM v7 Linux g++ linker”/ | ||
| - | * Add the following library in the “Libraries (-l)” list: | ||
| - | * uio | ||
| - | * Add the following directories in the “Library search path (-L)” list: | ||
| - | * **// | ||
| - | * **// | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 2.1.6. Define Include Directories == | ||
| - | * In the Project Explorer, right click on the project name, select “C/C++ Build Settings” | ||
| - | * In the “C/C++ Build” group, select “Settings” category | ||
| - | * Select “ARM v7 Linux g++ compiler”/ | ||
| - | * Add the following directories: | ||
| - | * **// | ||
| - | * **// | ||
| - | * **// | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | === 2.2. Baremetal Project Setup=== | ||
| - | |||
| - | == 2.2.1. Create New Project and Link zmodlib Folder == | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | It is assumed that Zmod and specific folders for Zmods (ZmodADC1410 for example) are placed in the SDK workspace root folder, as provided by Digilent (see [[# | ||
| - | * Create a new application project. | ||
| - | * Under src folder, right click option, select New / Folder | ||
| - | * Select Advanced | ||
| - | * Link to alternate location (Linked Folder) | ||
| - | * **Variables...** -> Select **WORKSPACE_LOC** -> Extend... -> Select **zmodlib** folder | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| - | |||
| - | <WRAP GROUP> <WRAP COLUMN HALF> | ||
| - | == 2.2.2. Define Include Directories == | ||
| - | * In the Project Explorer, right click on the project name, select “C/C++ Build Settings” | ||
| - | * In the “C/C++ Build” group, select “Settings” category | ||
| - | * Select “ARM v7 g++ compiler”/ | ||
| - | * Add the following directories: | ||
| - | * **// | ||
| - | * **// | ||
| - | |||
| - | </ | ||
| - | {{ : | ||
| - | </ | ||
| ---- | ---- | ||

