AR# 75527

|

Drivers created in Create or Import Wizard in Vivado fail in Vitis

Description

I am migrating a Vivado project that contains a custom IP to the 2020.1 version, and then exporting to Vitis and building a domain.

However I am seeing compile errors. What is the cause of these errors?

Solution

This issue can be related to the makefile used in the driver, whether it was created manually, or by the tools.

You can check if this is the case by comparing it to the highlighted sections in the example Makefile below which will fail:

INCLUDEFILES=*.h
LIBSOURCES=*.c
OUTS = *.o


libs:
echo "Compiling myip"
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} $(OUTS)
make clean

include:
${CP} $(INCLUDEFILES) $(INCLUDEDIR)

clean:
rm -rf ${OUTS}

This is due to the OUTS = .o. In the latest mingw toolchains .o will not work. The rules will need to be updated.

For example:

INCLUDEFILES=*.h
LIBSOURCES=*.c
OUTS = *.o
OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))

libs:
echo "Compiling myip"
$(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
$(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OBJECTS} ${ASSEMBLY_OBJECTS}
make clean

include:
${CP} $(INCLUDEFILES) $(INCLUDEDIR)

clean:
rm -rf ${OBJECTS} ${ASSEMBLY_OBJECTS}

If the driver is added as part of the XSA file, then you can just extract this and add it manually.

Steps to add the driver manually:

Create the folder hierarchy below, and place the driver into the drivers folder:

repo\XilinxProcessorIPLib\drivers

Then in Vitis, select Tools -> Repository. Select New, and point to the repo folder.

Note: the two levels are needed.

Then if you re-create your domain, the driver in the repo should be used instead of the one in the XSA.

AR# 75527
Date 11/12/2020
Status Active
Type General Article
Devices More Less
Tools
People Also Viewed