Skip to content

Commit

Permalink
Merge pull request Xilinx#97 from sgrace/2021.1_next
Browse files Browse the repository at this point in the history
Updated Makefiles for SPRITE
  • Loading branch information
Alvin Clark authored and GitHub Enterprise committed Jun 22, 2021
2 parents beb6069 + 9e1b7d2 commit 6de4019
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ ifndef PLATFORM_REPO_PATHS
export PLATFORM_REPO_PATHS
endif

EMBEDDED_PLATFORM=$(lastword $(subst :, ,$(PLATFORM_REPO_PATHS)))
SYSROOT:=$(EMBEDDED_PLATFORM)/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX:=$(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SYSROOT}

XF_PROJ_ROOT ?= $(shell bash -c 'export MK_PATH=$(MK_PATH); echo $${MK_PATH%/AI_Engine_Development/*}')

# Makefile input options
Expand All @@ -38,11 +34,15 @@ CONFIG_FILE := system.cfg

TEST := SPRITE
ifeq (${TEST}, SPRITE)
EMBEDDED_PLATFORM=$(lastword $(subst :, ,$(PLATFORM_REPO_PATHS)))
SYSROOT:=$(EMBEDDED_PLATFORM)/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX:=$(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SYSROOT}

BASE_PLATFORM := /wrk/vitis_collateral/vck190_artifacts/vck190_xpfm/vck190_custom.xpfm
ROOTFS := /wrk/vitis_collateral/vck190_artifacts/vck190_xpfm/rootfs.ext4
IMAGE := /wrk/vitis_collateral/vck190_artifacts/vck190_xpfm/Image
else
SYSROOT := ../../../Vitis_Platform_Creation/Introduction/03_Edge_VCK190/ref_files/step3_pfm/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux
SDKTARGETSYSROOT := ../../../Vitis_Platform_Creation/Introduction/03_Edge_VCK190/ref_files/step3_pfm/sw_comp/sysroots/cortexa72-cortexa53-xilinx-linux
BASE_PLATFORM := ../../../Vitis_Platform_Creation/Introduction/03_Edge_VCK190/ref_files/step3_pfm/platform_repo/vck190_custom/export/vck190_custom/vck190_custom.xpfm
ROOTFS :=../../../Vitis_Platform_Creation/Introduction/03_Edge_VCK190/ref_files/step3_pfm/sw_comp/rootfs.ext4
IMAGE := ../../../Vitis_Platform_Creation/Introduction/03_Edge_VCK190/ref_files/step3_pfm/sw_comp/Image
Expand Down Expand Up @@ -124,14 +124,25 @@ host: guard-SYSROOT guard-CXX
# Depending on the TARGET, it'll either generate the PDI for hw_emu or hw.
package: guard-IMAGE guard-ROOTFS
cd ./sw
v++ -p -t ${TARGET} \
-f ${BASE_PLATFORM} \
--package.rootfs=${ROOTFS} \
--package.image_format=ext4 \
--package.boot_mode=sd \
--package.kernel_image=${IMAGE} \
--package.defer_aie_run \
--package.sd_file host.exe ../tutorial.xclbin ../libadf.a
ifeq (${TEST}, SPRITE)
v++ -p -t ${TARGET} \
-f ${BASE_PLATFORM} \
--package.rootfs=${ROOTFS} \
--package.image_format=ext4 \
--package.boot_mode=sd \
--package.kernel_image=${IMAGE} \
--package.defer_aie_run \
--package.sd_file host.exe ../tutorial.xclbin ../libadf.a
else
v++ -p -t ${TARGET} \
-f ..${BASE_PLATFORM} \
--package.rootfs=../${ROOTFS} \
--package.image_format=ext4 \
--package.boot_mode=sd \
--package.kernel_image=../${IMAGE} \
--package.defer_aie_run \
--package.sd_file host.exe ../tutorial.xclbin ../libadf.a
endif
###################################################################################################

###########################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ ifndef IMAGE
export IMAGE
endif

SDKTARGETSYSROOT = ${PLATFORM_REPO_PATHS}/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX = $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SDKTARGETSYSROOT}
TEST :=
ifeq (${TEST}, SPRITE)
SDKTARGETSYSROOT := ${PLATFORM_REPO_PATHS}/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX := $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SDKTARGETSYSROOT}
endif

XF_PROJ_ROOT ?= $(shell bash -c 'export MK_PATH=$(MK_PATH); echo $${MK_PATH%/AI_Engine_Development/*}')

Expand Down Expand Up @@ -59,8 +62,6 @@ GCC_LIB := -lxaiengine -ladf_api_xrt -lxrt_core -lxrt_coreutil \

LDCLFLAGS := $(GCC_LIB)

XF_PROJ_ROOT := .

.ONESHELL:
.PHONY: clean all kernels aie xclbin host package run_emu

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ ifndef IMAGE
export IMAGE
endif

SDKTARGETSYSROOT = ${PLATFORM_REPO_PATHS}/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX = $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SDKTARGETSYSROOT}
TEST :=
ifeq (${TEST}, SPRITE)
SDKTARGETSYSROOT := ${PLATFORM_REPO_PATHS}/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX := $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SDKTARGETSYSROOT}
endif

XF_PROJ_ROOT ?= $(shell bash -c 'export MK_PATH=$(MK_PATH); echo $${MK_PATH%/AI_Engine_Development/*}')

Expand Down Expand Up @@ -126,6 +129,9 @@ xclbin: guard-PLATFORM_REPO_PATHS $(GRAPH_O) $(KERNEL_XO)
host: guard-CXX guard-SDKTARGETSYSROOT
cd ./sw
$(CXX) $(GCC_FLAGS) $(GCC_INCLUDES) -o aie_control_xrt.o ../Work/ps/c_rts/aie_control_xrt.cpp
ifeq (${TEST},SPRITE)
$(CXX) $(GCC_FLAGS) $(GCC_INCLUDES) -o main.o /wrk/vitis_collateral/06-versal-system-design-clocking/host.cpp
endif
$(CXX) $(GCC_FLAGS) $(GCC_INCLUDES) -o main.o host.cpp
$(CXX) *.o $(GCC_LIB) -std=c++14 -o host.exe
@echo "COMPLETE: Host application created."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ ifndef IMAGE
export IMAGE
endif

SDKTARGETSYSROOT = ${PLATFORM_REPO_PATHS}/sw/versal/Xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX = $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SDKTARGETSYSROOT}
TEST :=
ifeq (${TEST}, SPRITE)
SDKTARGETSYSROOT := ${PLATFORM_REPO_PATHS}/sw/versal/xilinx-versal-common-v2021.1/sysroots/aarch64-xilinx-linux
CXX := $(XILINX_VITIS)/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ --sysroot=${SDKTARGETSYSROOT}
endif

XF_PROJ_ROOT ?= $(shell bash -c 'export MK_PATH=$(MK_PATH); echo $${MK_PATH%/AI_Engine_Development/*}')

Expand Down Expand Up @@ -64,8 +67,6 @@ GCC_LIB := -lxaiengine -ladf_api_xrt -lxrt_core -lxrt_coreutil \
.ONESHELL:
.PHONY: clean all kernels aie xclbin host package run_emu



###
# Guarding Checks. Do not modify.
###
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 6de4019

Please sign in to comment.