01-08-2020 12:16 PM - edited 01-08-2020 12:24 PM
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_2019188.8.131.521_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
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..
01-08-2020 12:37 PM
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.
01-08-2020 12:47 PM
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..."
01-09-2020 09:06 AM
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
01-09-2020 11:55 AM
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?
01-13-2020 05:40 AM
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
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.
01-15-2020 08:05 AM
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.
01-17-2020 01:55 PM
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)
01-19-2020 03:08 AM
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