cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tofumanjeff
Observer
Observer
475 Views
Registered: ‎01-20-2021

Failed to build project in Vitis 2020.2

Jump to solution

Hello,

I'm practicing the following lab in Vitis targeting U50 platform:

tofumanjeff_0-1625739654648.png

I can build the project and run software emulation successfully in 2019.2, but now I have to upgrade to 2020.2 for the upcoming course use.

In 2020.2, I have imported corresponding source files into each project and added the binary container and hardware functions, as shown below:

tofumanjeff_1-1625740767034.pngtofumanjeff_2-1625747011471.png

However, when I build the project for software emulation, an error occurs without any information, and the project is not built.

tofumanjeff_3-1625748357158.png

This is the makefile generated by Vitis after I built the kernel project:

#
# this file was created by a computer. trust it.
#

# compiler tools
XILINX_VITIS ?= /opt/Xilinx/Vitis/2020.2
XILINX_XRT ?= /opt/xilinx/xrt
XILINX_VIVADO ?= /opt/Xilinx/Vivado/2020.2
XILINX_VIVADO_HLS ?= $(XILINX_VITIS)/Vivado_HLS

VPP ?= ${XILINX_VITIS}/bin/v++
RM = rm -f
RMDIR = rm -rf

VITIS_PLATFORM = xilinx_u50_gen3x16_xdma_201920_3
VITIS_PLATFORM_PATH = $(VITIS_PLATFORM)

TARGET = sw_emu
VPP_OPTS = --target $(TARGET)

#
# Hw kernel files
#


BUILD_SUBDIRS += build
HW_KERNEL_OBJS += build/KA.xo
SRC_KERNEL_OBJS += build/KA.xo
BUILD_SUBDIRS += build
HW_KERNEL_OBJS += build/KB.xo
SRC_KERNEL_OBJS += build/KB.xo
BUILD_SUBDIRS += build
HW_KERNEL_OBJS += build/KCalc.xo
SRC_KERNEL_OBJS += build/KCalc.xo
BUILD_SUBDIRS += build
HW_KERNEL_OBJS += build/KVConstAdd.xo
SRC_KERNEL_OBJS += build/KVConstAdd.xo
BUILD_SUBDIRS += build
HW_KERNEL_OBJS += build/KpB.xo
SRC_KERNEL_OBJS += build/KpB.xo

ALL_MESSAGE_FILES = $(subst .xo,.o,.mdb,$(SRC_KERNEL_OBJS))

#
# primary build targets
#

.PHONY: all clean
all: $(HW_KERNEL_OBJS)


clean:
	-$(RM) $(SRC_KERNEL_OBJS) $(ALL_MESSAGE_FILES) 
	-$(RMDIR) $(BUILD_SUBDIRS)
	-$(RMDIR) .Xil

.PHONY: incremental
incremental: all


nothing:

#
# Hw Kernels compile;
#

build/KA.xo: ../src/K_KA.cpp ../src/kernel.h KA-compile.cfg
	-@mkdir -p $(@D)
	-@$(RM) $@
	$(VPP) $(VPP_OPTS) --compile -I"$(<D)" --config KA-compile.cfg -o"$@" "$<"

build/KB.xo: ../src/K_KB.cpp ../src/kernel.h KB-compile.cfg
	-@mkdir -p $(@D)
	-@$(RM) $@
	$(VPP) $(VPP_OPTS) --compile -I"$(<D)" --config KB-compile.cfg -o"$@" "$<"

build/KCalc.xo: ../src/K_KCalc.cpp ../src/kernel.h KCalc-compile.cfg
	-@mkdir -p $(@D)
	-@$(RM) $@
	$(VPP) $(VPP_OPTS) --compile -I"$(<D)" --config KCalc-compile.cfg -o"$@" "$<"

build/KVConstAdd.xo: ../src/K_KVConstAdd.cpp ../src/kernel.h KVConstAdd-compile.cfg
	-@mkdir -p $(@D)
	-@$(RM) $@
	$(VPP) $(VPP_OPTS) --compile -I"$(<D)" --config KVConstAdd-compile.cfg -o"$@" "$<"

build/KpB.xo: ../src/K_KpB.cpp ../src/kernel.h KpB-compile.cfg
	-@mkdir -p $(@D)
	-@$(RM) $@
	$(VPP) $(VPP_OPTS) --compile -I"$(<D)" --config KpB-compile.cfg -o"$@" "$<"

Here is my environment:

  • Ubuntu 18.04.5 (running in Oracle VM VirtualBox on a Windows 10 PC)
  • Vitis 2019.2 / 2020.2
  • Platform: xilinx_u50_gen3x16_xdma_201920_3

Why does this error occur, and how can I solve it?

Thanks for any advice.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
yangc
Xilinx Employee
Xilinx Employee
304 Views
Registered: ‎02-27-2019

Add kernel.h to the host prj, host.cpp defines the kernel.h in line 45. The design runs successfully on my end. If necessary, I can share the project.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

6 Replies
yangc
Xilinx Employee
Xilinx Employee
373 Views
Registered: ‎02-27-2019

which stage did the error occur? kernel, link, or host

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
tofumanjeff
Observer
Observer
336 Views
Registered: ‎01-20-2021

Hi @yangc,

Thanks for your reply.

I’m new to Vitis, so I’m not sure if I understand correctly; I should build the project through kernel -> hw_link -> host, right?

The error shown above occurred on the kernel stage. If I ignored the error and kept building other stages, the same error occurred, too. None of them is built.

0 Kudos
yangc
Xilinx Employee
Xilinx Employee
331 Views
Registered: ‎02-27-2019

Hi @tofumanjeff ,

Can you share the source file with me? I try it on my end.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
tofumanjeff
Observer
Observer
329 Views
Registered: ‎01-20-2021

Hi @yangc,

The source files are attached. Thank you!

0 Kudos
yangc
Xilinx Employee
Xilinx Employee
305 Views
Registered: ‎02-27-2019

Add kernel.h to the host prj, host.cpp defines the kernel.h in line 45. The design runs successfully on my end. If necessary, I can share the project.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

tofumanjeff
Observer
Observer
267 Views
Registered: ‎01-20-2021

Hi @yangc,

After I add kernel.h to the host project, the kernel project can be built successfully.

However, I try to create a new project and do not add kernel.h to the host project, and the kernel project can still be built.

So I still don't know why this weird error occurred...lol.

Anyway, I really appreciate your help.

But now I face another problem. After I build all projects, I'm going to modify the run configuration.

Unlike in 2019.2 the Project menu shows the project name, the only choice in the menu is <None> in 2020.2, as shown below.

2019_2_configuration.PNG2020_2_configuration.PNG

If I ignore this and keep running the emulation, I can still finish the execution.

However, now I need to open the run summary in Vitis Analyzer to check the timeline, but I can not find it.

tofumanjeff_0-1626282252773.png

Is there any setting I have to modify to enable the run summary?

0 Kudos