I am working on a camera project and we're using a custom Zynq-7000 board (xc7z030sbg485-3). I have followed Xilinx's official guidelines to migrate an old SDK project into Vitis 2020.2. However, when I try to build the platform, it fails with the following errors:
make[2]: *** [Makefile:66: standalone_libs] Error 1 make[1]: *** [Makefile:46: ps7_cortexa9_0/libsrc/standalone_v6_8/src/make.libs] Error 2 make: *** [Makefile:18: all] Error 2
Full makefile:
# Makefile generated by Xilinx.
DRIVER_LIB_VERSION = 1.0
PROCESSOR = ps7_cortexa9_0
LIBRARIES = ${PROCESSOR}/lib/libxil.a
BSP_MAKEFILES := $(wildcard $(PROCESSOR)/libsrc/*/src/Makefile)
SUBDIRS := $(patsubst %/Makefile, %, $(BSP_MAKEFILES))
BSP_SEQUENTIAL_MAKEFILES := ps7_cortexa9_0/libsrc/coresightps_dcc_v1_4/src/Makefile ps7_cortexa9_0/libsrc/cpu_cortexa9_v2_7/src/Makefile ps7_cortexa9_0/libsrc/devcfg_v3_5/src/Makefile ps7_cortexa9_0/libsrc/dmaps_v2_4/src/Makefile ps7_cortexa9_0/libsrc/gpiops_v3_4/src/Makefile ps7_cortexa9_0/libsrc/gpio_v4_3/src/Makefile ps7_cortexa9_0/libsrc/iicps_v3_8/src/Makefile ps7_cortexa9_0/libsrc/mipicsiss_v1_2/src/Makefile ps7_cortexa9_0/libsrc/qspips_v3_5/src/Makefile ps7_cortexa9_0/libsrc/scugic_v3_10/src/Makefile ps7_cortexa9_0/libsrc/scutimer_v2_1/src/Makefile ps7_cortexa9_0/libsrc/scuwdt_v2_1/src/Makefile ps7_cortexa9_0/libsrc/standalone_v6_8/src/Makefile ps7_cortexa9_0/libsrc/uartps_v3_7/src/Makefile ps7_cortexa9_0/libsrc/xadcps_v2_3/src/Makefile ps7_cortexa9_0/libsrc/xilffs_v4_0/src/Makefile ps7_cortexa9_0/libsrc/xilrsa_v1_5/src/Makefile
BSP_PARALLEL_MAKEFILES := $(filter-out $(BSP_SEQUENTIAL_MAKEFILES),$(BSP_MAKEFILES))
SEQ_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_SEQUENTIAL_MAKEFILES))
PAR_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_PARALLEL_MAKEFILES))
ifneq (,$(findstring win,$(RDI_PLATFORM)))
SHELL = CMD
endif
all:
$(MAKE) --no-print-directory seq_libs
$(MAKE) -j --no-print-directory par_libs
$(MAKE) --no-print-directory archive
@echo 'Finished building libraries'
include: $(addsuffix /make.include,$(SUBDIRS))
seq_libs: $(addsuffix /make.libs,$(SEQ_SUBDIRS))
@echo 'Finished building libraries sequentially.'
par_libs: $(addsuffix /make.libs,$(PAR_SUBDIRS))
@echo 'Finished building libraries parallelly.'
archive:
arm-none-eabi-ar -r $(LIBRARIES) $(wildcard $(PROCESSOR)/lib/*.o)
clean: $(addsuffix /make.clean,$(SUBDIRS))
rm -f ${PROCESSOR}/lib/libxil.a
$(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a
cp -f $< $@
%/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)
@echo "Running Make include in $(subst /make.include,,$@)"
$(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS= -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -g -Wall -Wextra"
%/make.libs: include
@echo "Running Make libs in $(subst /make.libs,,$@)"
$(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS= -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -g -Wall -Wextra"
%/make.clean:
$(MAKE) -C $(subst /make.clean,,$@) -s clean
From Xilinx's official training material, I understand that the purpose of the Makefile is to help automate the compilation process and it includes all the source code files for the project.
I would really appreciate any guidance on how to resolve these Makefile errors. Thank you in advance!
I found standalone related makefile => "make[1]: *** [Makefile:46: ps7_cortexa9_0/libsrc/standalone_v6_8/src/make.libs] Error 2"
###############################################################################
Copyright (C) 2011 - 2015 Xilinx, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Except as contained in this notice, the name of the Xilinx shall not be used
in advertising or otherwise to promote the sale, use or other dealings in
this Software without prior written authorization from Xilinx.
###############################################################################
include config.make
CC=$(COMPILER)
AR=$(ARCHIVER)
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a
CC_FLAGS = $(subst -pg, -DPROFILING, $(COMPILER_FLAGS))
ECC_FLAGS = $(subst -pg, -DPROFILING, $(EXTRA_COMPILER_FLAGS))
ifeq (($(notdir $(CC))) , arm-xilinx-eabi-gcc)
ECC_FLAGS += -nostartfiles\
-march=armv7-a \
-mfloat-abi=soft \
-mfpu=neon
endif
ifeq (($(notdir $(CC))) , arm-none-eabi-gcc)
ECC_FLAGS += -nostartfiles
endif
RELEASEDIR=../../../lib
INCLUDEDIR=../../../include
INCLUDES=-I./. -I${INCLUDEDIR}
OUTS = *.o
OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))
INCLUDEFILES=*.h
libs: $(LIBS)
standalone_libs: $(LIBSOURCES)
echo "Compiling standalone"
$(CC) $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) $^
$(AR) -r ${RELEASEDIR}/${LIB} ${OUTS}
profile_libs:
$(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(AR)" libs
.PHONY: include
include: standalone_includes profile_includes
standalone_includes:
${CP} ${INCLUDEFILES} ${INCLUDEDIR}
profile_includes:
$(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(AR)" include
clean:
rm -rf ${OBJECTS}
rm -rf ${ASSEMBLY_OBJECTS}
$(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(AR)" clean