8

解决Vitis导入自制IP导致无法构建Platform

 2 years ago
source link: https://www.taterli.com/8656/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

解决Vitis导入自制IP导致无法构建Platform

  • TaterLi
  • 2022年2月27日2022年2月27日

最近也不知道发什么神经,就打算试试最新的Vitis,结果还是很失望,如果工程导入了自制IP,那么他可能会出现一些奇怪的错误.

其中因为一个Makefile错误,就会使得如果自制IP引入,就无法编译通过,我能理解原厂的想法,大概是希望我们能做一个完整的驱动再编译进去,但是有时候真的为了方便并没顾得那么多,只会想尽快测试.

错误复现,首先IP中有一个自制IP.

一路导出生成硬件描述文件,然后按照导出文件生成工程,构建过程就出错了.

错误主要内容.

arm-xilinx-eabi-gcc.exe: error: *.c: Invalid argument
arm-xilinx-eabi-gcc.exe: fatal error: no input files
compilation terminated.
make[2]: *** [Makefile:18: libs] Error 1
make[1]: *** [Makefile:46: ps7_cortexa9_0/libsrc/myip_v1_0/src/make.libs] Error 2
make: *** [Makefile:18: all] Error 2

修改Makefile.

修改如下:

参考代码:

COMPILER=
ARCHIVER=
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a

RELEASEDIR=../../../lib
INCLUDEDIR=../../../include
INCLUDES=-I./. -I${INCLUDEDIR}

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

OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c *.cpp)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))

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}

第二个文件在fsbl.

第三个文件在硬件驱动.

image-30.png

那么现在就构建成功了.

image-31.png

并且应用也正常了.

image-34.png

发表评论 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

评论 *

显示名称 *

电子邮箱地址 *

网站地址

通过邮件订阅评论


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK