Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
reference:programmable-logic:eclypse-z7:developing-software [2020/01/08 10:35] – [2.2. Environment Setup] Ana-Maria-Eliza Balas | reference:programmable-logic:eclypse-z7:developing-software [2020/01/21 09:19] (current) – removed Cristian Fatu | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Developing User Space Software for Eclypse ====== | ||
- | |||
- | //The flow that we will use for this is still under development. What is known about it is will be placed here as a placeholder.// | ||
- | |||
- | The demo that provided for the Zmods can be run from within SDK and maybe (as yet undecided) will be loaded into the image as a binary file in the intramfs. The following assumes that Xilinx SDK 2019.1 is used to run the demo. | ||
- | |||
- | After booting Petalinux and reaching the Linux prompt, you can start running and tweaking the Zmod demo project using Xilinx SDK 2019.1. In order to set up your environment for it please follow this [[https:// | ||
- | |||
- | The SDK workspace will be provided by Digilent and the code is currently designed to support both bare-metal and Linux. The user can switch between them through the use of a "# | ||
- | |||
- | This guide will walk the user through the process of setting up the demo and running it on the Eclypse, then modifying the demo to do // | ||
- | |||
- | ==== 2.1. Delivery Structure ==== | ||
- | |||
- | The library is delivered as one package of sources (structured on different folders), to be included (or linked) in the Linux or baremetal projects. | ||
- | |||
- | We provide the following hierarchy as a 2019.1 Xilinx Vivado SDK workspace: | ||
- | * Zmod folder containing: | ||
- | * [[# | ||
- | * Platform dependencies common includes: reg.h, dma.h and flash.h. These headers expose the IP core register access, DMA and flash functions that are dependent to the platform (Linux or baremetal). These functions will be implemented in the source files contained in the platform dependencies folders (Linux and baremetal) shown below. | ||
- | * Platform dependencies folders: | ||
- | * linux - contains separate folders that implement Linux platform related functionality (functions listed in platform dependencies common includes mentioned above) on Linux platform. | ||
- | * baremetal - contains separate folders that implement baremetal related functionality (functions listed in platform dependencies common includes mentioned above) on baremetal platform. | ||
- | * The folder named after specific Zmods contain its library. For example: | ||
- | * Folder ZmodADC1410 contains: | ||
- | * ZmodADC1410 sources: zmodadc1410.cpp, | ||
- | * Folder ZmodDAC1411 contains: | ||
- | * ZmodADC1411 sources: zmoddac1411.cpp, | ||
- | * Folder ZmodADC1410_LinuxDemo contains the Linux demo project. Under src folder there are the following linked folders: | ||
- | * Folder Zmod links to WORKSPACE_LOC\Zmod | ||
- | * For each specific Zmod there is a folder pointing to WORKSPACE_LOC\< | ||
- | * Folder ZmodADC1410 links to WORKSPACE_LOC\ZmodADC1410 | ||
- | * Folder ZmodDAC1411, | ||
- | * A main file implementing the Linux demo | ||
- | * Folder ZmodADC1410_BaremetalDemo contains the Baremetal project. Under src folder there are the following linked folders: | ||
- | * Folder Zmod links to WORKSPACE_LOC\Zmod | ||
- | * For each specific Zmod there is a folder pointing to WORKSPACE_LOC\< | ||
- | * Folder ZmodADC1410 links to WORKSPACE_LOC\ZmodADC1410 | ||
- | * Folder ZmodDAC1411 links to WORKSPACE_LOC\ZmodDAC1411 | ||
- | * A main file, specific to the baremetal app | ||
- | * One folder ZmodADC1410_BaremetalDemo_bsp corresponding to the Baremetal project bsp. | ||
- | |||
- | ---- | ||
- | ==== 2.2. Environment Setup ==== | ||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | === 2.2.1. Download the library === | ||
- | * Download (clone) the [[# | ||
- | FIXME | ||
- | < | ||
- | |||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | |||
- | === 2.2.2. Add Vivado SDK workspace location | ||
- | |||
- | * The downloaded workspace contains demo applications for Linux and baremetal. | ||
- | * < | ||
- | * Open Vivado SDK 2019.1 and assign the workspace location to the library 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. | ||
- | * If you want to create your own project: | ||
- | * Create a new application project (Linux or baremetal). | ||
- | * Configure it as described on [[# | ||
- | |||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | === 2.2.3. Import library to Vivado SDK === | ||
- | * File -> Import | ||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | |||
- | * Select General -> Existing Projects into Workspace -> Next | ||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | |||
- | * Select the library download location | ||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | === 2.2.4. Vivado SDK Project Explorer === | ||
- | FIXME change photos | ||
- | * If the user doesn' | ||
- | * If the user wants to use the Linux demo, then he must follow the steps from [[# | ||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== 4. Project Settings ====== | ||
- | |||
- | This chapter details the configuration needed for the baremetal or Linux projects.\\ | ||
- | 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 [[# | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | ===== 4.1. Linux Project ===== | ||
- | ==== 4.1.1. Link Zmod Folder ==== | ||
- | * Under src folder, Right Mouse button option New / Folder | ||
- | * Select Advanced | ||
- | * Link to alternate location (Linked Folder) | ||
- | * Variables... / Select WORKSPACE_LOC | ||
- | * Extend... / Select Zmod folder | ||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | |||
- | ==== 4.1.2. Link Zmod-Specific Folders ==== | ||
- | For each used Zmod, link its folder. For example, to link the ZmodADC1410 folder: | ||
- | * Under src folder, Right Mouse button option New / Folder | ||
- | * Select Advanced | ||
- | * Link to alternate location (Linked Folder) | ||
- | * Variables... / Select WORKSPACE_LOC | ||
- | * Extend... / Select ZmodADC1410 folder | ||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | ==== 4.1.3. Define LINUX_APP ==== | ||
- | * In the Project Explorer, right mouse button on the project, “C/C++ Build Settings” | ||
- | * In the “C/C++ Build” group, select “Settings” category | ||
- | * Select “ARM v7 Linux g++ linker”/ | ||
- | * Add LINUX_APP definition (using the ‘+’ button) | ||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | ==== 4.1.4. Add SYSROOT Environment Variable ==== | ||
- | * In the Project Explorer, right mouse button on the project, “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> | ||
- | ==== 4.1.5. Define Include Directories ==== | ||
- | * In the Project Explorer, right mouse button on the project, “C/C++ Build Settings” | ||
- | * In the “C/C++ Build” group, select “Settings” category | ||
- | * Select “ARM v7 Linux g++ compiler”/ | ||
- | * Add the following directories: | ||
- | * **// | ||
- | * **// | ||
- | * **// | ||
- | |||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | ==== 4.1.6. Define Libraries and Library Directories ==== | ||
- | * In the Project Explorer, right mouse button on the project, “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> | ||
- | ==== 4.1.7. Add “--sysroot” Project Setting ==== | ||
- | * In the Project Explorer, right mouse button on the project, “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 “--sysroot= ${SYSROOT}” | ||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | ===== 4.2. Baremetal Project ===== | ||
- | ==== 4.2.1. Link Zmod Folder ==== | ||
- | * Under src folder, Right Mouse button option New / Folder | ||
- | * Select Advanced | ||
- | * Link to alternate location (Linked Folder) | ||
- | * Variables... / Select WORKSPACE_LOC | ||
- | * Extend... / Select Zmod folder | ||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <WRAP GROUP> <WRAP COLUMN HALF> | ||
- | ==== 4.2.2. For each used Zmod, link its folder. For example, link ZmodADC1410 folder. ==== | ||
- | * Under src folder, Right Mouse button option New / Folder | ||
- | * Select Advanced | ||
- | * Link to alternate location (Linked Folder) | ||
- | * Variables... / Select WORKSPACE_LOC | ||
- | * Extend... / Select ZmodADC1410 folder | ||
- | |||
- | |||
- | </ | ||
- | {{ : | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | |||