1 #
2 # Copyright (c) 2013-2018, Texas Instruments Incorporated
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
8 #
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #
12 # * Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15 #
16 # * Neither the name of Texas Instruments Incorporated nor the names of
17 # its contributors may be used to endorse or promote products derived
18 # from this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #
33 #Default build environment, (Windows_NT / linux)
34 #if nothing is defined, default to linux as in windows this variable is defined
35 export OS ?= linux
37 SDK_INSTALL_PATH ?= $(abspath ../../../../)
38 TOOLS_INSTALL_PATH ?= $(SDK_INSTALL_PATH)
40 #Default BUILD_OS_TYPE (tirtos/baremetal/qnx)
41 export BUILD_OS_TYPE ?= tirtos
43 include $(PDK_INSTALL_PATH)/ti/build/procsdk_defs.mk
45 # Default board
46 # Supported values are printed in "make -s help" option. Below are the list for reference.
47 # evmDRA72x, evmDRA75x, evmDRA78x,
48 # evmAM572x, idkAM571x, idkAM572x idkAM574x
49 # evmK2H, evmK2K, evmK2E, evmK2L, evmK2G, evmC6678, evmC6657,
50 # evmAM335x, icev2AM335x, iceAMIC110, skAM335x, bbbAM335x,
51 # evmAM437x idkAM437x skAM437x evmOMAPL137 lcdkOMAPL138
53 ################################################################################
54 # Other user configurable variables
55 ################################################################################
57 #if LIMIT_BOARDS is defined, BOARD from the LIMIT_BOARDS
58 ifneq ($(LIMIT_BOARDS),)
59 BOARD ?= $(firstword $(LIMIT_BOARDS))
60 SOC ?= $(firstword $(LIMIT_SOCS))
61 CORE ?= $(firstword $(LIMIT_CORES))
62 else
63 #if LIMIT_BOARDS is not defined, default BOARD and SOC to the below
64 export BOARD ?= j721e_evm
65 export SOC ?= j721e
66 endif
67 # Default to m4 build depending on BOARD selected!!
68 ifeq ($(BOARD),$(filter $(BOARD), evmAM572x idkAM572x idkAM571x idkAM574x))
69 CORE ?= a15_0
70 endif
71 ifeq ($(BOARD),$(filter $(BOARD), am65xx_sim am65xx_evm am65xx_idk j721e_sim j721e_vhwazebu j721e_qt j721e_evm j7200_evm j7200_sim am64x_evm am64x_svb))
72 CORE ?= mcu1_0
73 endif
74 ifeq ($(BOARD),$(filter $(BOARD), j721e_ccqt j721e_loki))
75 CORE ?= c7x_1
76 endif
77 ifeq ($(BOARD),$(filter $(BOARD), j721e_hostemu j7200_hostemu))
78 CORE = c7x-hostemu
79 endif
80 ifeq ($(BOARD),$(filter $(BOARD), tpr12_evm tpr12_qt awr294x_evm))
81 CORE ?= mcu1_0
82 endif
83 CORE ?= ipu1_0
84 export CORE
86 # Default Build Profile
87 # Supported Values: debug | release
88 export BUILD_PROFILE ?= release
90 # Treat compiler warning as error
91 # Supported Values: yes | no
92 export TREAT_WARNINGS_AS_ERROR ?= yes
94 #Various boards support for J7 TDA family of devices
95 BOARD_LIST_J7_TDA = j721e_sim j721e_hostemu j721e_ccqt j721e_loki j721e_qt j721e_vhwazebu j721e_evm
96 BOARD_LIST_J7_TDA += j7200_sim j7200_hostemu j7200_evm am64x_evm am64x_svb
97 BOARD_LIST_J7_TDA += am65xx_evm
98 export BOARD_LIST_J7_TDA
100 #Various boards support for TPR12 family of devices
101 export BOARD_LIST_TPR12 = tpr12_evm tpr12_qt awr294x_evm
103 ################################################################################
104 # Other advanced configurable variables
105 ################################################################################
107 # Set Core Build Profile depending on BUILD_PROFILE value
108 export BUILD_PROFILE_$(CORE) ?= $(BUILD_PROFILE)
110 # Default PACKAGE_SELECT build flag
111 # Supported values: all, vps-hal-only, vps-vip-only, vps-vpe-only, vps-dss-only, vps-vip-dss, vps-vip-vpe
112 export PACKAGE_SELECT ?= all
114 # Disable recursive building of example dependencies
115 ifeq ($(BUILD_PROFILE),release)
116 #Below is converted to yes in release script
117 DISABLE_RECURSE_DEPS ?= no
118 else
119 #We don't generate debug lib. So force recursive build for debug build.
120 DISABLE_RECURSE_DEPS ?= no
121 endif
122 export DISABLE_RECURSE_DEPS
124 # Default C++ build flag, yes or no
125 export CPLUSPLUS_BUILD ?= no
127 include $(PDK_INSTALL_PATH)/ti/build/pdk_tools_path.mk
129 #use <module>_PATH variable as makefile internally expects PATH variable this way for external component path
130 export pdk_PATH := $(PDK_INSTALL_PATH)
131 export bios_PATH := $(BIOS_INSTALL_PATH)
132 export xdc_PATH := $(XDC_INSTALL_PATH)
133 export edma3_lld_PATH := $(EDMA3LLD_BIOS6_INSTALLDIR)
134 export ndk_PATH := $(NDK_INSTALL_PATH)
135 export ns_PATH := $(NS_INSTALL_PATH)
136 export radarLink_PATH := $(RADARLINK_INSTALL_PATH)
137 export ipc_PATH := $(IPC_INSTALL_PATH)
138 export uia_PATH := $(UIA_INSTALL_PATH)
140 export ROOTDIR := $(pdk_PATH)
141 XDCPATH =
142 ifeq ($(BUILD_OS_TYPE),tirtos)
143 XDCPATH = $(bios_PATH)/packages;$(xdc_PATH)/packages;$(edma3_lld_PATH)/packages;$(ndk_PATH)/packages;$(ns_PATH)/;$(pdk_PATH);$(ipc_PATH)/packages;$(uia_PATH)/packages;
144 endif
145 export XDCPATH
147 #Default SECTTI SIZE INFORMATION
148 export SECTTI_SIZE_INFO ?= no
150 #Default SECTTI tool
151 export SECTTI ?= $(CG_XML_BIN_INSTALL_PATH)/sectti
153 # Build for HS devices if secdev package is found
154 ifneq ("$(wildcard $(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh)","")
155 export SECUREMODE ?= yes
156 endif
158 # include other dependent files
159 include $(PDK_INSTALL_PATH)/ti/build/comp_paths.mk
160 ifeq ($(MAKERULEDIR), )
161 #Makerule path not defined, define this and assume relative path from ROOTDIR
162 export MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
163 endif
164 include $(MAKERULEDIR)/build_config.mk
165 include $(MAKERULEDIR)/platform.mk
166 include $(MAKERULEDIR)/env.mk
168 export PRUCORE_LIST = $(CORE_LIST_PRU)
170 ################################################################################
171 # Build Tools Configuration
172 ################################################################################
174 ifeq ($(OS),Windows_NT)
175 PATH := $(PATH)
176 endif
178 # Compiler Tools:
179 # PATH := $(C6X_GEN_INSTALL_PATH)/bin;$(PATH)
181 # XDC Tools location:
182 PATH := $(XDC_INSTALL_PATH);$(XDC_INSTALL_PATH)/bin;$(XDC_INSTALL_PATH)/packages/xdc/services/io/release;$(PATH)
184 ifeq ($(OS),Windows_NT)
185 PATH := $(subst /,\,$(PATH))
186 else
187 PATH := $(subst ;,:,$(PATH))
188 endif
190 export PATH
192 LIBDIR ?= ./lib
193 export LIBDIR