Not sure if this is a dead forum or people just don't want to help.... :-(
I have been able to get a basic "hello world" example working with Vivado/Vitis 2010.1.
I have had to bail with trying to get it working in Linux. The tools don't seem very stable in Ubuntu. They will work for a while then things start going bonkers. I'll have to figure that out later when I start trying to figure out Petalinux. For now I am running Vivado/Vitis in Windows 10 (not my preference but its at least working).
I'm now trying to figure out the GPIO stuff with a standalone system.
I added the AXI interconnect and AXI GPIO blocks to control the PL_LED_R and PL_LED_G outputs and read the PL_SW input to the Vivado design. I have created a Vitis project and can toggle the LEDs and read the switch. (Major pain trying to find the information on the web to do this.)
Now I'm trying to also control the PS_LED_R and PS_LED_G outputs and read the PS_PB input. (Again major pain trying to find the necessary info...)
I can read the input but have not been able to control the outputs. I'm not sure what I am missing.
In the Vivado design, so the PS MIO pins need to be made external and connected? I didn't do that with the PS_PB input and can read it with not problems. But the two outputs never change.
Right now I have this in the Vitis code:
XGpioPs_Config *cfg = XGpioPs_LookupConfig(XPAR_GPIO_0_DEVICE_ID);
XGpioPs_CfgInitialize(&mio, cfg, cfg->BaseAddr);
XGpioPs_SetDirectionPin(&mio, 0, 1); // PS_PB (MIO0) is an input
XGpioPs_SetDirectionPin(&mio, 52, 0); // PS_LED_R (MIO52) is an output
XGpioPs_SetDirectionPin(&mio, 53, 0); // PS_LED_G (MIO53) is an output
XGpioPs_SetOutputEnablePin(&mio, 52, 1);
XGpioPs_SetOutputEnablePin(&mio, 53, 1);
This this reads the input:
And, I think, this should set the outputs:
XGpioPs_WritePin(&mio, 52, 0); // set PS_LED_R low (LED off)
XGpioPs_WritePin(&mio, 52, 1); // set PS_LED_R high (LED on)
Am I missing something?
1 of 1 people found this helpful
Avnet has hardware, software, and training courses for the MiniZed board. Though targeted to a recent version of the Xilinx tools, they may be very helpful for you to learn what you are trying to do:
You may also want to take a look at the latest PetaLinux 2020.1 BSP for the MiniZed. In this BSP the bi-color LED is tied to the microphone (any sensing of audio input changes the LED to red).
http://avnet.me/zedsupport then navigate to 2020.1 -> BSP
The Xilinx Vivado, Vitis, and PetaLinux tools run well on Ubuntu, but are finicky about the exact version being used. It is important to match the Xilinx tools to a known good, supported version of the host OS (Ubuntu). It is best to download and install a supported Ubuntu version and stay on that version (do not let Ubuntu update/upgrade). More information about supported Ubuntu versions for the 2020.1 Xilinx tools is in Xilinx UG973:
Also, Avnet publishes a VirtualBox VM Install Guide to aid users in their Ubuntu setup to run the Xilinx tools:
In general, getting started with Vivado IP block design there are many tools. You can also watch/download the recent webinar content from Arty-s7 FPGA boards.
The normal flow is that you design a block design in Vivado and upload the bitstream to the board, then you go with Vitis to create an application and code to do something.
You are right that with Ubuntu it was a pain to run Vivado, that's what I have written in my recent blog(Arty-s7 FPGA board) comments.
I was not aware of the workshop. Thanks for the link.
The only issue with it is that the workshop appears to be based on 2019.1. I really would like to figure this out with the latest tools (2020.1).
Yep. I noticed that. I use Ubuntu mainly and have a minized but I have been hesitating to start doing something as all the documentation I've found use old tools or is spread across different sites. It good to know someone else is interested in that as well.
Progress... (Other than still running the Windows tools, still can't get the Linux tools to work reliably in Linux (Ubuntu VM).)
I have been successfully able to:
1) Create a 2010.1 Vivado/Vitis "Hello World" design for the MiniZed board. The main issue is remembering to change the stdin/stdout to ps7_uart_1 to match the hardware.
2) Create a design to toggle the PS LEDs and read the PS button on the MiniZed.
3) Create a design to toggle the PS and PL LEDs and read the PS button the PL switch on the MiniZed using AXI GPIO interfaces to the PL LEDs and switch.
4) Create a design with a simple 16-bit hardware multiplier as a custom IP AXI slave peripheral.
Now I'm trying to figure out how to make a more advanced Custom IP AXI slave peripheral.
What I would like is a AXI slave peripheral with 4 registers that are:
Register 0 - Writes to a FIFO, reads from same FIFO
Register 1 - Writes to a second FIFO, reads from same FIFO
Register 2 - Writes to a register that sets the PL LEDs, reads the PL LED state
Register 3 - Writes do nothing, reads the PL switch
But, I'm not sure what needs to be done in the Custom IP stuff to create and hookup the FIFOs or how to connect the LEDs and switch.
1 of 1 people found this helpful
We have now posted the 2020.1 PetaLinux BSPs for all the various boards. Even though you aren't interested in PetaLinux at this point, you can still use the scripted flow that we provide to rebuild the default design, which may be a good starting point.
The 2020.1 release is documented here:
Then you can follow these instructions, but you can limit what you run to the hardware build.
I gave up trying to get a stable Ubuntu VM running. I purchased a NUC and just installed Ubuntu on it. I now have Ubuntu 18.04.4 installed and the Xilinx 2020.2 tools.
With that setup I have had great success running Vivado/Vitis and have created a couple standalone examples from on the web. Everything seems to be going good.
I'm now trying the figure out PetaLinix but of course am running into problems.
I followed the Avnet HDL git HOWTO you referenced but since the BSPs are based on 2020.1 they are not working quite right.
The PetaLinux build succeeds and I the generated Vivado design opens and appears ok. I can JTAG boot the MiniZed using the 'xsdb boot_jtag_INITRD_MINIMAL.tcl' command. But when I try to boot from QSPI with 'sh boot_qspi_INITRD.sh' I get the following error:
[ERROR] : section avnet_qspi.scr.0 offset of 0xFC0000 overlaps with prior section end address of 4A921C0
My guess is that the INITRD is to large for the QSPI.
What do I need to do to modify the PetaLinux build so reduce the size of the INITRD?
Or, do you have any idea when the Avnet BSP and Platforms will be updated to work with 2020.2?
1 of 1 people found this helpful
It looks like you need to change the offsets in the petalinux-config. I will also run this by our Petalinux experts to see if they have different advice.
We are working on the 2020.2 BSPs now, but a couple issues were identified with the Ultra96-V2 Wi-Fi in 2020.1, so we are fixing those first. I expect we will have the 2020.2 BSPs done by the end of January (hopefully!). It always takes us a month or two after Xilinx releases new tools, and that assumes there aren't any problems. The 2020.1 release introduced a slew of issues that took us more time to correct. Our initial look at 2020.2 suggests that this update will be much simpler, so we are optimistic we can get it done quicker this time.
It looks like both 2020.1 and 2020.2 are compatible with Ubuntu 18.04.4, so you could install the 2020.1 tools and get comfortable with that first, which will give us time to work on 2020.2.
Not been on this forum -- I've been struggling with the MiniZED and getting PetaLinux working ---minized-petalinux-course from HacksterIO-
The videos are a nice touch, put the quality of the labs are NOT good. (sorry) --- way too many broken links, incomplete directions, incompatabilities, miss-matching scripts - -
I have been using the MicroZED PL and PS successfully -- I have built logic and did C++ code for the ZYNQ using Vivado 2020.1 on WIndows 10 - the orginal MiniZed tutorial from Hackster, for this was pretty good. Lots of success here. Passing messages through BRAM without issue, both ways.
Looking for advice, what is a clean way to get into the Petalinux, that the tutorial is straight-forward, hopefully using the WINDOWS envorirment, I do have Vivado and VITIS 2020.2 up on Linux 18.04 on VBOX --- so I can do it there, as well ---
Thanks in advance
I am sorry to hear about your trouble with the 2019.1 labs. If you can provide some specifics as to what isn't working, we can correct the documentation. Also, note that the MiniZed trainings are also available on Element14 here:
Windows is not a supported development environment for PetaLinux. You can find the specific list in PetaLinux User Guide for the release you are using. For example, here is the list for PetaLinux 2019.1: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug1144-petalinux-tools-reference-guide.pdf.
- Red Hat Enterprise Workstation/Server 7.4, 7.5, 7.6 (64-bit)
- CentOS 7.4, 7.5, 7.6 (64-bit)
- Ubuntu Linux 16.04.5, 18.04.1 (64-bit)
I still think that the Avnet-provided PetaLinux training is the best place to start. Please make sure you are using the version for which the training was written (2019.1 for MiniZed, 2018.3 for Ultra96) and that you are using a supported OS, preferably the one referenced in the training (Ubuntu 18.04.1). If there are broken links or typos, please share here, and we will work to get those fixed.