03-28-2020 07:07 AM
Hi to all!
I run the examples of ocl_kernels through Vitis GUI without problem following the GUIREADME.md.
When i try to replicate the example from the beginning without downloading the example i face up with the following error.
I create the src files, host.cpp and vadd.cl from scratch and when i try to bulid i get....
16:03:09 **** Incremental Build of configuration Emulation-SW for project cl_burst ****
make -j8 incremental
g++ -std=c++0x -DVITIS_PLATFORM=xilinx_u200_xdma_201830_2 -D__USE_XOPEN2K8 -I/opt/xilinx/xrt/include/ -I/home/stavros/opt2/Xilinx/Xilinx_Vitis/Vivado/2019.2/include/ -O0 -g -Wall -c -fmessage-length=0 -o "src/host.o" "../src/host.cpp"
../src/host.cpp:24:10: fatal error: xcl2.hpp: No such file or directory
#include "xcl2.hpp"
^~~~~~~~~~
compilation terminated.
makefile:87: recipe for target 'src/host.o' failed
make: *** [src/host.o] Error 1
16:03:10 Build Finished (took 523ms)
WARNING: No binary containers were found.
Any help please?
03-30-2020 11:49 PM
You need to set the .xclbin as argument to the host program. Please open Run Configurations, and check "automatically add binary container(s) to arguments", as shown in below figures.
Then launch sw_emu run again.
03-29-2020 04:10 AM - edited 03-29-2020 04:16 AM
Check the following links:
https://forums.xilinx.com/t5/Vitis-SDAccel-and-SDSoC/missing-lt-CL-cl2-hpp-gt/td-p/1010553
https://forums.xilinx.com/t5/Vitis-SDAccel-and-SDSoC/xcl2-hpp-cannpt-be-found/td-p/897318
https://github.com/Xilinx/SDAccel_Examples/blob/master/libs/xcl2/xcl2.hpp
--Syed
03-29-2020 02:34 PM - edited 03-29-2020 02:37 PM
Still no solution even after reading your recommendations...
I Just have the host and the kernel code and i want to compile and run in Vitis GUI.
I go to new project application i select the xilinx_u200_xdma_201830_2 platform then i select Empty application.
Then i add new files to the src folder and i create the host.cpp and the vadd.cpp files. Below the image shows my configuration.Is the procedure i follow right or i miss any point?Then i hit compile button and i receive the above mentioned error.When i load the examples an extra folder libs that contains bitmap and xcl2 subfolders and qor.json and xrt.ini files are created.I this the point i miss?The examples run flawlessly on my pc.
Thanks in advance for your help.
03-29-2020 08:11 PM
Just to add that in GUI flow, you need to add all necessary include files. You may want to inspect the makefile.
For Vitis Accel examples, the xcl2.hpp is located at:
https://github.com/Xilinx/Vitis_Accel_Examples/tree/master/common/includes/xcl2
03-30-2020 02:35 AM - edited 03-30-2020 02:53 AM
Thanks For your help!
Can you be more specific?Except Host and kernel cpp files what else should i add in project?Do i have to create my own makefile?
All that i have is just host and kernel c++ code...Below the error.
Thanks in advance
03-30-2020 05:51 AM
Hi again!
I managed to overcome the previous error and have compiled as shown below(Is it correct...???). But after compile when i run i have the following result that is different from the original example where the output is numbers.
What do i miss in the procedure?
Thanks in advance!
03-30-2020 11:49 PM
You need to set the .xclbin as argument to the host program. Please open Run Configurations, and check "automatically add binary container(s) to arguments", as shown in below figures.
Then launch sw_emu run again.
03-31-2020 12:55 AM
Thank you very much!That is the solution!It runs flawlessly now!
Is there any way to add similarly the xcl2.cpp ,xcl2.hpp and xcl2.mk?I mean not by just copy and paste to src folder.
And generally is there any guide for these tips and for the whole procedure through Vitis GUI?
Best regards
Stavros
03-31-2020 02:32 AM
xcl2.mk is not required to be added to /src. It looks to me the most easy way is to add xcl2.hpp and xcl2.cpp to /src as they are not in default include directories in the project.
Our Vitis examples seem to be mostly based on make/command line flow. You may take a look at this one in Vitis Tutorial to get a general idea.
https://github.com/Xilinx/Vitis-Tutorials/blob/master/docs/getting-started-rtl-kernels/README.md