summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 62c31eb)
raw | patch | inline | side by side (parent: 62c31eb)
author | Jianzhong Xu <a0869574local@uda0869574b> | |
Wed, 16 Dec 2015 15:20:41 +0000 (10:20 -0500) | ||
committer | Jianzhong Xu <a0869574local@uda0869574b> | |
Wed, 16 Dec 2015 15:20:41 +0000 (10:20 -0500) |
index 2fdce29258924dc15533c5f88a272dc38ee5165b..b18c9dabfb1d25a8f8419939e8cb28d91b30f4a8 100644 (file)
.SILENT:
+#
+# Check if required environment variables are defined
+#
+ifneq ($(MAKECMDGOALS),clean)
+
+# Platform file
+ifeq ($(TARGET),SOC_AM572x)
+export PDK_DIR=$(AM572_PDK_DIR)
+XDCPLATFORM = ti.runtime.openmp.platforms.am57x
+else ifeq ($(TARGET),SOC_C6678)
+export PDK_DIR=$(C6678_PDK_DIR)
+XDCPLATFORM = ti.runtime.openmp.platforms.evm6678
+else ifeq ($(TARGET),SOC_K2H)
+export PDK_DIR=$(C6636_PDK_DIR)
+XDCPLATFORM = ti.runtime.openmp.platforms.evmTCI6636K2H
+endif
+
+
+ifeq ($(TARGET),SOC_AM572x)
+PDK_DIR = AM572_PDK_DIR
+else ifeq ($(TARGET),SOC_K2H)
+PDK_DIR = C6636_PDK_DIR
+else ifeq ($(TARGET),SOC_C6678)
+PDK_DIR = C6678_PDK_DIR
+else
+$(call error, ERROR - TARGET NOT DEFINED. Must specify one of: TARGET=SOC_K2H,TARGET=SOC_C6678,TARGET=SOC_AM572X)
+endif
+
+# Path to C6000 compiler tools
+ifeq ($(CGTROOT),)
+$(call error,ERROR - CGTROOT NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(XDC_DIR),)
+$(call error,ERROR - XDC_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(XDAIS_DIR),)
+$(call error,ERROR - XDAIS_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(BIOS_DIR),)
+$(call error,ERROR - BIOS_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(IPC_DIR),)
+$(call error,ERROR - IPC_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(OMP_DIR),)
+$(call error,ERROR - OMP_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($($(PDK_DIR)),)
+$(call error,ERROR - $(PDK_DIR) NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(FC_DIR),)
+$(call error,ERROR - FC_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(EDMA3_DIR),)
+$(call error,ERROR - EDMA3_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(LIBARCH_DIR),)
+$(call error,ERROR - LIBARCH_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+ifeq ($(LINALG_DIR),)
+$(call error,ERROR - LINALG_DIR NOT DEFINED, PLEASE REFER TO README.txt)
+endif
+
+endif
+
MFS = $(wildcard */Makefile)
DIRS = $(patsubst %/Makefile,%,$(MFS))
index 15eba50b9f8ce661fb87d9797a5f994d125acf24..5af6a1f72b27f5b1de13e7a0eac91b1356f809ee 100644 (file)
# Default to RTSC mode
-USE_BIOS ?= 1
testfiles = dgemm_test.c config_c6678.c
outfile = dgemm_test.out
diff --git a/examples/dsponly/dgemm_test/Makefile.common b/examples/dsponly/dgemm_test/Makefile.common
index 4e12e51d90af24a967858ec4a4813d29f0bc7f92..2f0b8d4e1cf39a71ff009cc1570afe1f1f330230 100644 (file)
OPT_CMD = $(CFGDIR)/compiler.opt
CL_OPTS = -@ $(OPT_CMD) -mv6600 --omp -I $(OMP_DIR)/packages/ti/runtime/openmp
CL_OPTS += -I$(FC_DIR)/packages -I$(XDAIS_DIR)/packages -I$(EDMA3_DIR)/packages -I$(LIBARCH_DIR) -I$(LINALG_DIR)/include
+CL_OPTS += -D$(TARGET) -DLIB_RTOS
LNK_OPTS = -x -c --priority -w
CL = $(CGTROOT)/bin/cl6x
RTS_LIB = $(CGTROOT)/lib/libc.a
CL_OPTS += -o3
endif
-
-ifneq ($(MAKECMDGOALS),clean)
-ifeq ($(TARGET),SOC_AM572x)
-CL_OPTS += -DTI_AM572 -DDEVICE_AM572x
-else ifeq ($(TARGET),SOC_K2H)
-CL_OPTS += -DTI_C6636 -DDEVICE_K2H
-else ifeq ($(TARGET),SOC_C6678)
-CL_OPTS += -DTI_C6678 -DDEVICE_C6678 -DLIB_RTOS
-else
-$(error must specify one of: \
- TARGET=SOC_K2H \
- TARGET=SOC_C6678 \
- TARGET=SOC_AM572X
-endif
-endif
all: $(outfile)
-
%.out: $(testfiles) libomp_config
echo compiling $<
$(CL) $(CL_OPTS) $< $(testfiles) -z $(LNK_OPTS) -o $@ -m $*.map $(LNK_CMD) $(RTS_LIB) $(LIBARCH_LIB) $(LINALG_LIB)
diff --git a/examples/dsponly/dgemm_test/Makefile.libomp b/examples/dsponly/dgemm_test/Makefile.libomp
index 48b23afd39280e7879a7e4831339e521af2bf33d..683d3b8a3df340d781459bf40de2c946cc0343d7 100644 (file)
# Makefile.libomp
#
-
-#
-# Check if required environment variables are defined
-#
-
-ifneq ($(MAKECMDGOALS),clean)
-ifeq ($(OMP_DIR),)
-$(call error,ERROR - OMP_DIR NOT DEFINED)
-endif
-
-ifeq ($(XDC_DIR),)
-$(call error,ERROR - XDC_DIR NOT DEFINED)
-endif
-
-# Path to C6000 compiler tools
-ifeq ($(CGTROOT),)
-$(call error,ERROR - CGTROOT NOT DEFINED)
-endif
-
-# Paths to BIOS, IPC modules
-ifeq ($(USE_BIOS),1)
-ifeq ($(BIOS_DIR),)
-$(call error,ERROR - BIOS_DIR NOT DEFINED)
-endif
-ifeq ($(IPC_DIR),)
-$(call error,ERROR - IPC_DIR NOT DEFINED)
-endif
-endif
-endif
-
-
# Configuration file used (without the .cfg extension)
-ifeq ($(USE_BIOS),1)
CFGDIR = omp_config
-else
-CFGDIR = omp_config_bm
-endif
# Set BUILD_TYPE to debug/release to pick appropriate libraries
BUILD_TYPE = release
# Include . to find config.bld
-ifeq ($(USE_BIOS),1)
XDCPATH = $(PDK_DIR)/packages;$(OMP_DIR)/packages;$(BIOS_DIR)/packages;$(IPC_DIR)/packages;$(FC_DIR)/packages;$(XDAIS_DIR)/packages;$(EDMA3_DIR)/packages;.
-else
-XDCPATH = $(PDK_DIR)/packages;$(OMP_DIR)/packages;$(BIOS_DIR)/packages;.
-endif
XS = $(XDC_DIR)/xs
XDC = $(XDC_DIR)/xdc
diff --git a/examples/dsponly/readme.txt b/examples/dsponly/readme.txt
--- /dev/null
@@ -0,0 +1,17 @@
+To build linalg examples, follow instructions below:
+
+1. A target must be defined, e.g. make TARGET=SOC_C6678 or make TARGET=SOC_K2H or make TARGET=SOC_AM572x
+2. Following environment variables must be defined (version numbers just serve as an example):
+export BIOS_DIR=<installation_folder>/bios_6_45_00_17
+export IPC_DIR=<installation_folder>/ipc_3_41_00_06_eng
+export XDC_DIR=<installation_folder>/xdctools_3_31_02_38_core
+export OMP_DIR=<installation_folder>/openmp_dsp_c667x_2_02_00_02
+export C6636_PDK_DIR=<installation_folder>/pdk_k2hk_4_0_0
+export C6678_PDK_DIR=<installation_folder>/pdk_c667x_2_0_0
+export PDK_DIR=<installation_folder>/pdk_c667x_2_0_0
+export CGTROOT=<installation_folder>/ti-cgt-c6000_8.0.3
+export XDAIS_DIR=<installation_folder>/xdais_7_24_00_04
+export FC_DIR=<installation_folder>/framework_components_3_40_01_04
+export LIBARCH_DIR=<installation_folder>/libarch
+export EDMA3_DIR=<installation_folder>/edma3_lld_02_12_01_22
+export PATH=<installation_folder>/ti-cgt-c6000_8.0.3/bin:$PATH
\ No newline at end of file
index 7153d11748c95911507e5587a3606e34b750dc1d..c059177954faa081b25824c29b5cbe8325afd070 100755 (executable)
#!/bin/bash
+export CGTROOT="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/cgt-c6x"
+export XDC_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-xdctools-tree"
+export XDAIS_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-xdais-tree"
export BIOS_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-sysbios-tree"
export IPC_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-ipc-tree"
-export XDC_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-xdctools-tree"
export OMP_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-omp-tree"
export C6678_PDK_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-pdk-tree"
-export PDK_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-pdk-tree"
-export CGTROOT="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/cgt-c6x"
-export XDAIS_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-xdais-tree"
export FC_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-framework-components-tree"
-export LIBARCH_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-libarch-tree"
export EDMA3_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-edma3lld-tree"
+export LIBARCH_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-libarch-tree"
export LINALG_DIR="/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-linalg-tree"
export PATH="/home/a0869574local/yocoto/tisdk-rtos/sources/oe-core/scripts:/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin/arm-linux-gnueabi:/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/bin/crossscripts:/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/sbin:/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/bin:/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/sbin:/home/a0869574local/yocoto/tisdk-rtos/build/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/bin:/home/a0869574local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin:/home/a0869574local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin:/home/a0869574local/yocoto/tisdk-rtos/sources/oe-core/scripts:/home/a0869574local/yocoto/tisdk-rtos/sources/bitbake/bin:/home/a0869574local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin:/home/a0869574local/yocoto/tisdk-rtos/sources/oe-core/scripts:/home/a0869574local/yocoto/tisdk-rtos/sources/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"