@:~$ xilinx Xilinx tools available tools at /opt/Xilinx :- 1) 2021.2 - Vivado - SDK - Vitis - PetaLinux 0) Exit Please select tools required or exit : 1 Tools are as follows :- vivado @ /opt/Xilinx/Vivado/2021.2/bin/vivado vitis @ /opt/Xilinx/Vitis/2021.2/bin/vitis petalinux-build @ /opt/Xilinx/PetaLinux/2021.2/tool/tools/common/petalinux/bin/petalinux-build
@:~$ create_project_structure.sh /zedboard_hello_world Creating project directory structure @ /zedboard_hello_world @:~$ cd /zedboard_hello_world
@:/zedboard_hello_world$ vivado -nojournal -nolog -notrace &
Review the information the in the New Project : Create a New Vivado Project window and then click Next.
In the New Project : Project Name window set Project Name to project, Project location to /zedboard_hello_world/fw/vivado & untick Create project subdirectory. Click Next to proceed.
No additional source files are required for this project so in the New Project : Project Type window tick the Do not specify sources at this time check box and then click Next.
Click on the Boards tab to view the available boards.
The Zedboard Zynq Evaluation and Development Kit isn't installed by default in this version of Vivado. To install it click on Refresh to download the latest version of the catalog, scroll down the list of available boards to find Zedboard Zynq Evaluation and Development Kit and then click on Install.
Select the ZedBoard hardware in the New Project : Default Part and then click Next.
Look over the project details in the New Project : New Project Summary window and then click Finish.
The Vivado project window now appears.
Tip: The buttons in the top menu bar of a pane provide a very useful way of expanding the working area of that pane. Maximize
expands a pane within the project window. Float
expands the pane beyond the project window. Restore
reverses Maximise. Dock
reverses Float.
The Vivado project window now changes to reflect the addition of the Diagram pane. Expand the Diagram pane outside of the Vivado window by clicking on its Float icon
.
button.
Scroll down to the ZYNQ7 Processing System in the pop-up dialog and add this to the block design by double clicking on it.
The ZYNQ7 Processing System IP is now added to the block design. Let Vivado automate some of the connections by clicking on Run Block Automation.
Review the connections proposed in the Run Block Automation dialog and then click OK.
Some of the connections are now made in the block design.
The Re-customize IP window now appears.
Remove the M_AXI_GP0_ACLK connection from the ZYNQ7 Processing System as it is not required for this design and will cause an error if left unconnected. Click on PS-PL Configuration, expand AXI Non Secure Enablement, expand GP Master AXI interface and untick M AXI GP0 interface.
Remove the USB 0 connection from the ZYNQ7 Processing System as it is not required for this design. Click on MIO Configuration, expand I/O Peripherals and untick USB 0.
Remove the Timer connection from the ZYNQ7 Processing System as it is not required for this design. Click on MIO Configuration, expand Application Processor Unit and untick Timer 0.
Remove the FCLK_CLK0 connection from the ZYNQ7 Processing System as it is not required for this design. Click on Clock Configuration, expand PL Fabric Clocks and untick FCLK_CLK0.
Remove the FCLK_RESET0_N connection from the ZYNQ7 Processing System as it is not required for this design. Click on PS-PL Configuration, expand General, expand Enable Clock Resets and untick FCLK_RESET0_N.
Commit the changes made to the ZYNQ7 Processing System by clicking on OK.
in the Diagram pane or by pressing F6.
The above should result in the following dialog being presented, click OK to dismiss this. If errors are found in the block design review these and replay the relevant steps from above.
Return the floating Diagram pane back to the Vivado project window by clicking on its Dock icon
.
The Generate Output Products dialog now appears. Select the required options (defaults as shown are fine) and then click Generate.
The Generate Output Products launch dialog now appears, click OK and wait for the product generation task to complete.
The Create HDL Wrapper dialog now appears. Select Let Vivado manage wrapper and auto-update and then click OK.
Float the Sources pane and fully expand the Design Sources to see the full design hierarchy which now includes the HDL wrapper. Dock the Sources pane after viewing.
The No Implementation Results Available dialog will appear on the very first run of any new project. Proceed by clicking Yes. Since synthesis and implementation have not yet been run these will be scheduled to run before the bitstream generation.
The Launch Runs dialog now appears. Select the required options (defaults as shown are fine) and then click OK.
Once the bitstream generation is complete the Bitstream Generation Completed dialog will appear. Click Cancel to dismiss this.
The generated bitstream can now be found in the impl_1 directory.
@:/zedboard_hello_world$ ls -la fw/vivado/project.runs/impl_1/*.bit -rw-rw-r-- 1 4045674 Feb 4 17:06 fw/vivado/project.runs/impl_1/system_wrapper.bit
The Export Hardware Platform : Output dialog now appears. Include the generated bitstream in the exported hardware by selecting include bitstream and then clicking Next.
The Export Hardware Platform : Files dialog now appears. Export the hardware platform to the Firmware directory by changing the Export to location to /zedboard_hello_world/fw and then clicking Next.
The Export Hardware Platform : Exporting Hardware Platform dialog now appears. Review the information provided and then click Finish.
The exported hardware platform is a single zip file with a .xsa extension instead of a .zip. The contents of this file can be viewed by using the zip utility.
@:/zedboard_hello_world$ unzip -l fw/system_wrapper.xsa
Archive: fw/system_wrapper.xsa
E4Zp2ya2u9Jpa3dBoQdPZK74T6U15UDBvqEEoPzhKQtak=
Length Date Time Name
--------- ---------- ----- ----
1203 2021-11-07 07:00 sysdef.xml
4045674 2021-11-07 07:00 system_wrapper.bit
517945 2021-11-07 07:00 ps7_init.c
3676 2021-11-07 07:00 ps7_init.h
34138 2021-11-07 07:00 ps7_init.tcl
4280 2021-11-07 07:00 ps7_init_gpl.h
2333 2021-11-07 07:00 xsa.json
69596 2021-11-07 07:00 zed_board.jpg
1184 2021-11-07 07:00 xsa.xml
75883 2021-11-07 07:00 system.hwh
2193 2021-11-07 07:00 system.bda
2763767 2021-11-07 07:00 ps7_init.html
518549 2021-11-07 07:00 ps7_init_gpl.c
--------- -------
8040421 13 files
@:/zedboard_hello_world$ vitis &
The New Application : Project Create a New Project window will now appear. Review the information provided and then click Next.
The New Application Project : Platform window will now appear. Select the exported hardware platform from Vivado by entering the Create a new platform form hardware (XSA) tab and setting the XSA File
to /zedboard_hello_world/fw/system_wrapper.xsa. Click Next to continue.
The New Application Project : Application Project Details window will now appear. Set the Application project name to zedboard_hello_world and then click Next.
The New Application Project : Domain window will now appear. The default settings as shown are fine for this project. Click Next to contune.
The New Application Project : Templates window will now appear. Create an empty application by selecting Empty Application(C) from the Available Templates section. Click Finish to continue.
The Vitis IDE cockpit window will now appear. This is the window where all the action happens.
In the Create New File dialog click Advanced, tick Link to a file in the file system, use Browse... to select /zedboard_hello_world/sw/src/c/zedboard_hello_world.c and then click Finish.
The new source file is automatically opened in the Vitis IDE for editing.
Copy the code below into the newly created zedboard_hello_world.c and save it by selecting File » Save from the main menu.
Direct download available here :-
@:/zedboard_hello_world$ wget https://spacewire.co.uk/tutorial/shared/repos/0002/zedboard_hello_world/sw/src/c/hello_world.c -O sw/src/c/hello_world.c
Set the boot mode jumpers on the Zedboard for JTAG.
Power on the Zedboard.
@:~$ minized
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyACM0, 06:34:25
Press CTRL-A Z for help on special keys
Hello World
@:/zedboard_hello_world$ ssh -t git@ 'git init --bare zedboard_hello_world.git' @:/zedboard_hello_world$ git init @:/zedboard_hello_world$ git remote add origin git@:zedboard_hello_world.git @:/zedboard_hello_world$ git add fw/src/diagram/system/system.bd @:/zedboard_hello_world$ git add fw/system_wrapper.xsa @:/zedboard_hello_world$ git add sw/src/c/zedboard_hello_world.c @:/zedboard_hello_world$ git commit -a -m "Basic Zedboard design consisting of just the ZYNQ7 Processing System." @:/zedboard_hello_world$ git push -u origin master @:/zedboard_hello_world$ git tag -a v1.0 -m "Just ZYNQ" @:/zedboard_hello_world$ git push -u origin v1.0
@:~$ cd @:$ git clone -b v1.0 https://bitbucket.org/spacewire_firmware/zedboard_hello_world @:$ cd zedboard_hello_world @:/zedboard_hello_world$ create_vivado_project.sh build @:/zedboard_hello_world$ create_vitis_project.sh build