====== Cmod A7 Out-of-Box Demo ====== {{:cmod_a7:cmod_a7-obl-600.png?300|}} ---- ===== Description ===== This simple User Demo project is a Microblaze project that tests the SRAM on the Cmod A7 and features the basic I/O on the device. * The SRAM is tested and the results can be seen through the UART port. * The RGB LED cycles through different colors while BTN1 is pressed. * The User LEDs display a 2 bit binary counter while BTN1 is pressed. ---- ===== Inventory ===== * Cmod A7 with MicroUSB programming cable * Vivado and Vitis installations compatible with the latest release of this demo (2020.1) * //See [[programmable-logic:guides:installing-vivado-and-vitis|Installing Vivado, Vitis, and Digilent Board Files]] for installation instructions.// * Serial Terminal application to receive messages printed by the demo * //See [[programmable-logic:guides:serial-terminals:start]] for more information.// ---- ===== Download and Usage Instructions ===== First and foremost, releases - consisting of a set of files for download - are only compatible with a specific version of the Xilinx tools, as specified in the name of the release (referred to as a //release tag//). In addition, releases are only compatible with the specified variant of the board. For example, a release tagged "20/DMA/2020.1" for the Zybo Z7 is only to be used with the -20 variant of the board and Vivado 2020.1. The latest release version for this demo is highlighted in green. ^ Board Variant ^ Release Tag ^ Release Downloads ^ Setup Instructions ^ | Cmod A7-15T | @#C0EEBD: 15T/OOB/2020.1-1 | {{https://github.com/Digilent/Cmod-A7/releases/download/15T/OOB/2020.1-1/Cmod-A7-15T-OOB-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cmod-A7/releases/download/15T/OOB/2020.1-1/Cmod-A7-15T-OOB-sw.ide.zip}} | See //Using the Latest Release//, below | | Cmod A7-35T | @#C0EEBD: 35T/OOB/2020.1-1 | {{https://github.com/Digilent/Cmod-A7/releases/download/35T/OOB/2020.1-1/Cmod-A7-35T-OOB-hw.xpr.zip}} \\ {{https://github.com/Digilent/Cmod-A7/releases/download/35T/OOB/2020.1-1/Cmod-A7-35T-OOB-sw.ide.zip}} | See //Using the Latest Release//, below | | Cmod A7-15T | v2018.2-2 | [[https://github.com/Digilent/Cmod-A7-15T-OOB/releases/tag/v2018.2-2|Release ZIP Downloads]] | [[https://github.com/Digilent/Cmod-A7-15T-OOB/tree/v2018.2-2|v2018.2-2 Github README]] | | Cmod A7-35T | v2018.2-1 | [[https://github.com/Digilent/Cmod-A7-35T-OOB/releases/tag/v2018.2-1|Release ZIP Downloads]] | [[https://github.com/Digilent/Cmod-A7-35T-OOB/tree/v2018.2-1|v2018.2-1 Github README]] | | Cmod A7-15T | v2016.4-2 | [[https://github.com/Digilent/Cmod-A7-15T-OOB/releases/tag/v2016.4-2|Release ZIP Downloads]] | [[learn/programmable-logic/tutorials/github-demos/start|Using Digilent Github Demo Projects (Legacy)]] | | Cmod A7-35T | v2016.4-1 | [[https://github.com/Digilent/Cmod-A7-35T-OOB/releases/tag/v2016.4-1|Release ZIP Downloads]] | [[learn/programmable-logic/tutorials/github-demos/start|Using Digilent Github Demo Projects (Legacy)]] | **Note for Advanced Users:** //GitHub sources for this demo can be found in the [[https://github.com/digilent/cmod-a7/tree/15T/OOB/master|15T/OOB/master]] and [[https://github.com/digilent/cmod-a7/tree/35T/OOB/master|35T/OOB/master]] branches of the Cmod-A7 repository. Further documentation on the structure of this repository can be found on this wiki's [[programmable-logic:documents:git]] page.// ---- Instructions on the use of the latest release can be found in this dropdown: --> Using the Latest Release #^ {{page>programmable-logic:guides:using-github-releases#baremetal_release_no_build&noheader}} --> Apply Fix for Vitis 2020.1 Bug # Due to a bug in the 2020.1 version of Xilinx's Vitis IDE, two more steps are needed for the project to import correctly. If you are using another version of Vitis, ignore this section. After importing the project, open the **.sprj** file. In the System Project Settings, select a platform by clicking on the **''...''** icon, as shown in the image. Select the platform presented and click Ok. {{:reference:programmable-logic:guides:workaround1.png?600|}} ---- Right click on the **.prj** file and select **Properties**. In the opened window, go into **C/C++ Build** and select **Settings**, as shown in the image. After opening the Settings tab, select **Linker Script** and change the existing path to ''../src/lscript.ld''. {{:reference:programmable-logic:guides:workaround2.png?600|}} ---- Also found in the C/C++ Build Settings, select **Directories** under **MicroBlaze gcc compiler** and edit the listed path to change it to ''../src''. Click Yes when prompted to rebuild the index. Click Apply and Close. The project is now imported correctly. ---- <-- --> Build a Vitis Application # {{page>programmable-logic:guides:vitis-build-software&noheader}} <-- --> Set up the Cmod A7 # Plug the microUSB programming cable into the Cmod A7's PROG/UART port. ---- <-- {{page>programmable-logic:guides:using-github-releases#baremetal_release_programming&noheader}} At this point, the demo is now running on your board. Refer to the [[#description|Description]] section of this document for more information on what it does. ---- Additional steps beyond here present how you can use the other archive provided in the release, containing the hardware project, to rebuild the Vivado project, and use a newly exported XSA file to update the platform in Vitis. ---- {{page>programmable-logic:guides:using-github-releases#baremetal_update_specification&noheader}} <-- ---- ===== Functionality ===== ==== 1. Observing the LEDs ==== For this demo, every time **BTN1** is pressed, the LED state changes. The user LEDs create a 2 bit binary counter that increments every time the button is pressed. The RGB LED changes color every time the button is pressed. {{:cmod_a7:user_led0.jpg?200|}}{{:cmod_a7:user_led1.jpg?200|}}{{:cmod_a7:user_led2.jpg?200|}}{{:cmod_a7:user_led3.jpg?200|}} ---- ==== 2. UART Messages ==== Whenever the demo is started from Vivado SDK, the board will go through a memory test and will print out the result. If the memory is working, the following message will appear. {{:cmod_a7:user_uart1.jpg?500|}} Whenever a button is pressed, the message "Button Pressed" is sent over UART. {{:cmod_a7:user_uart2.jpg?200|}} ===== Additional Resources ===== All materials related to the use of the Cmod A7 can be found on its [[..:start|Resource Center]]. For a walkthrough of the process of creating a simple baremetal software project in Vivado and Vitis, see [[programmable-logic:guides:getting-started-with-ipi]]. Information on important parts of the GUIs, and indirect discussion of the steps required to modify, rebuild, and run this demo in hardware can also be found here. For technical support, please visit the [[https://forum.digilent.com/forum/4-fpga/|FPGA]] section of the Digilent Forum. ----