cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,198 Views
Registered: ‎07-23-2019

How are we supposed to get Vitis working on Xilinx own boards??? This seems incredibly hard without simple step by step instructions..

I'm on Day 2 of simply trying to get a "Hello World" Linux app running on a zcu104 via the Vitis platform.. I can't believe how hard Xilinx makes this and how little information is available.. The only real step by step instructions I was able to find are 3rd party: https://beetlebox.org/getting-started-with-computer-vision-for-vitis-embedded-systems/

Is there a better non-bare-metal version of "hello world" for the 104 board available using Vitis? If not - how upsetting..

I have setup Ubuntu 2018.4 with all required toolchains and pre-requisites.

Installed Vivado / Vitis 2019 (or whatever the latest matching set is)

Installed and built PetaLinux SDK (latest version)

Installed XRT (./xrt_201920.2.3.1301_18.04-xrt.deb) and also cloned XRT (for the scripts)

Generated the XRT file for the 104 board successfully (I think.. some warning of "Can't load /var/lib/shim-signed/mok/.rnd into RNG" but .XRT was generated)

Failed to generate the boot loader image.. via ~/XRT/src/runtime_src/tools/scripts/peta_build.sh ~/Petabuilds/xsa_build/zcu104_revmin/zcu104_revmin.xsa

Errors/Warnings:

cp: cannot create regular file '/home/andrew/zcu104_revmin/components/plnx_workspace/device-tree/device-tree/pl.dtsi': No such file or directory
cp: cannot create regular file '/home/andrew/zcu104_revmin/components/plnx_workspace/device-tree/device-tree/device-tree.mss': No such file or directory * Performing PetaLinux Build (from: /home/andrew/zcu104_revmin/project-spec/meta-user)
NOTE: xrt: compiling from external source tree /home/andrew/XRT/src
ERROR: xrt-2.2.0+git999-r0 do_compile: Function failed: do_compile (log file is located at /home/andrew/zcu104_revmin/build/tmp/work/aarch64-xilinx-linux/xrt/2.2.0+git999-r0/temp/log.do_compile.19320)
ERROR: Logfile of failure stored in: /home/andrew/zcu104_revmin/build/tmp/work/aarch64-xilinx-linux/xrt/2.2.0+git999-r0/temp/log.do_compile.19320

| FAILED: runtime_src/core/edge/hw_em/CMakeFiles/hw_emu_objects.dir/shim_hwem.cpp.o
| /home/andrew/XRT/src/runtime_src/core/edge/hw_em/shim_hwem.cpp:24:10: fatal error: shim-profile.h: No such file or directory
|  #include "shim-profile.h"
|           ^~~~~~~~~~~~~~~~
| compilation terminated.

 

Wonderful... and not one of these errors triggers anything useful in google search..

The part I really don't get it that VITIS is supposed to avoid this crap.. but Xilinx does not even support the 104 board natively as part of a regular install.. so off to hunt you go to figure out how to create the needed files without any real or obvious documentation.. ugh..

0 Kudos
8 Replies
Highlighted
Explorer
Explorer
1,182 Views
Registered: ‎04-19-2018

 

Imagine with custom boards.... that's something shady of Xilinx. If they don't allow users to develop with custom hardware, that in most cases is what is used, they may face an exodus as soon as someone else has a truly flexible tool. Remember how Nokia didn't react to the shift to smartphones. RIP. The World is cruel.

0 Kudos
Highlighted
Observer
Observer
1,177 Views
Registered: ‎07-23-2019

This is unclear to me.. It seems you can define the board in Vivado.. and export via XSA.. and make it work in Vitis.. but hell.. I can't even get Vitis working with the 104.. at least in Vivado it was part of the included boards..

Funny.. just watchin a Vitis video tutorial.. and the guy was like "We are going to do a bare metal demo since I did not get Linux working..."

Highlighted
Explorer
Explorer
1,084 Views
Registered: ‎04-19-2018

 

You define the board in Vivado, easy

You export the XSA, a few clicks

Then the hidden stuff: you have to tweak the kernel and device tree

After that, it all works fine

0 Kudos
Highlighted
Observer
Observer
1,061 Views
Registered: ‎07-23-2019

In any case.. digging in further the issue seems to be that
shim-profile.h had been deleted from the XRT repository.. and I guess I'm the only one using Vitis??? I filed an error report in Git.

It must be me however.. since i can't image the entire tool-chain being just broken.. right?

0 Kudos
Highlighted
Moderator
Moderator
971 Views
Registered: ‎09-12-2007

What is the use case you are tring to use here? If you are trying to accelerate the SW functions into HW, then you need the a platform with the XRT enabled.

For custom boards, you would start in Vivado and create your HW base design, you would then use the PFM properties to highlight to the Vitis downstream tools what interfaces, clocks, interrupts are available to use to include the accelerated IP into your existng base HW platform.

The XRT is needed for the dataflow to and from your accelerated IP. The XRT can be built in petalinux, the recipes can be seen here

  • petalinux-create -t project --template zynqMP -n linux_image
  • cd linux_image
  • petalinux-config --get-hw-description=<path to xsa>
  • copy the recipes to project-spec/meta-user
  • petalinux-config -c rootfs, and add the apps
  • Open the system-user.dtsi and add the zyclmm_drm node
  • petalinux-build
  • mkdir -p sysroot
  • cd images/linux
  • petalinux-package --sysroot -s <path to sysroot>
  • petalinux-package --boot --fpga system.bit --u-boot

 

However, if you just want to develop and debug linux applications then you dont the XRT. You would develop the linux image in Petalinux, and create the sysroots (see above) here to be used in Vitis.

0 Kudos
Highlighted
Visitor
Visitor
928 Views
Registered: ‎05-20-2019

Hi tschesnok,

I am the author of that tutorial. Just to say I started getting this bug myself and have updated the tutorial to fix it. Xilinix updated the XRT repo which caused this bug but if you switch to the 2019.2 branch the bug no longer occurs. Just go through the tutorial again now I have updated it and it should work.

Regards,

Andrew

0 Kudos
Highlighted
Observer
Observer
873 Views
Registered: ‎07-23-2019

Thanks! I think I wrote to you but did not notice you posted here...

.. I did get it running in the meantime.. BUT.. the application does not show up.. there is nothing in /mnt. How do I get that working. I see others with the problem but no solution that makes sense.. (at least to me)

0 Kudos
Highlighted
Visitor
Visitor
834 Views
Registered: ‎05-20-2019

When you ran the the peta_build.sh script did you ensure that you used the --bsp option?

Also the application is no longer placed in /mnt, but in /run/media/

Search for it using:

find . --name <app_name>.exe
0 Kudos