PRSDK-7413: build: Sysbios update to 6.76.03.01
[processor-sdk/pdk.git] / packages / ti / build / Rules.make
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 # Default board
44 # Supported values are printed in "make -s help" option. Below are the list for reference.
45 #                   evmDRA72x, evmDRA75x, evmDRA78x,
46 #                   evmAM572x, idkAM571x, idkAM572x idkAM574x
47 #                   evmK2H, evmK2K, evmK2E, evmK2L, evmK2G, evmC6678, evmC6657,
48 #                   evmAM335x, icev2AM335x, iceAMIC110, skAM335x, bbbAM335x,
49 #                   evmAM437x idkAM437x skAM437x evmOMAPL137 lcdkOMAPL138
50 #                   And also refer $(BOARD_LIST_J6_TDA) below
51 #
52 ifeq ($(LIMIT_BOARDS),)
53   # TDA parts do not define this environment variable, default board and soc for TDA parts
54   export BOARD ?= j721e_evm
55   export SOC ?= j721e
56 else
57 ifeq ($(LIMIT_BOARDS), j721e_evm)
58   export BOARD = j721e_evm
59   export SOC = j721e
60 else
61 ifeq ($(LIMIT_BOARDS), j721e_sim)
62   export BOARD = j721e_sim
63   export SOC = j721e
64 else
65   # default board and soc for Catalog parts
66   export BOARD ?= idkAM572x
67   export SOC   ?= am572x
68 endif
69 endif
70 endif
71 ################################################################################
72 # Other user configurable variables
73 ################################################################################
75 # Default to m4 build depending on BOARD selected!!
76 ifeq ($(BOARD),$(filter $(BOARD), evmAM572x idkAM572x idkAM571x idkAM574x))
77   CORE ?= a15_0
78 endif
79 ifeq ($(BOARD),$(filter $(BOARD), am65xx_sim am65xx_evm am65xx_idk j721e_sim j721e_vhwazebu j721e_qt j721e_evm j7200_evm j7200_sim am64x_evm))
80   CORE ?= mcu1_0
81 endif
82 ifeq ($(BOARD),$(filter $(BOARD), j721e_ccqt j721e_loki))
83   CORE ?= c7x_1
84 endif
85 ifeq ($(BOARD),$(filter $(BOARD), j721e_hostemu j7200_hostemu))
86   CORE = c7x-hostemu
87 endif
88 CORE ?= ipu1_0
89 export CORE
91 # Default Build Profile
92 # Supported Values: debug | release
93 export BUILD_PROFILE ?= release
95 # Treat compiler warning as error
96 # Supported Values: yes | no
97 export TREAT_WARNINGS_AS_ERROR ?= yes
99 #Various boards support for J6 TDA family of devices
100 BOARD_LIST_J6_TDA = tda2xx-evm tda2ex-evm tda3xx-evm tda2px-evm
101 BOARD_LIST_J6_TDA += tda2xx-evm-radar tda2px-evm-radar tda3xx-evm-radar
102 BOARD_LIST_J6_TDA += tda3xx-ar12-booster tda3xx-ar12-alps tda3xx-ar12-rvp
103 BOARD_LIST_J6_TDA += tda2ex-eth-srv tda2xx-rvp tda3xx-rvp
104 BOARD_LIST_J6_TDA += tda2xx-cascade-radar
105 export BOARD_LIST_J6_TDA
107 #Various boards support for J7 TDA family of devices
108 BOARD_LIST_J7_TDA = j721e_sim j721e_hostemu j721e_ccqt j721e_loki j721e_qt j721e_vhwazebu j721e_evm
109 BOARD_LIST_J7_TDA += j7200_sim j7200_hostemu j7200_evm am64x_evm
110 export BOARD_LIST_J7_TDA
112 ################################################################################
113 # Configure toolchain paths
114 ################################################################################
115 ifeq ($(BOARD),$(filter $(BOARD), $(BOARD_LIST_J6_TDA)))
116   # This section applies to J6 TDA SOCs in Processor SDK VISION release.
117   # For remaining SOC/BOARDS skip to the else part.
118   # SoC & Version of PDK for TDA builds
119   PDK_SOC=
120   PDK_VERSION=01_09_00_00
122   #Tool versions for TDA builds
123   GCC_CROSS_TOOL_PREFIX=arm-none-eabi-
124   GCC_CROSS_TOOL_TAG=4_9-2015q3
125   CGT_VERSION=7.4.2
126   GCC_VERSION_FPULIB=4.9.3
127   CGT_ARM_VERSION=16.9.2.LTS
128   CGT_ARP32_VERSION=1.0.7
130   #Component versions for TDA builds
131   BIOS_VERSION=6_46_04_53
132   EDMA_VERSION=02_12_00_20
133   XDC_VERSION=3_32_01_22_core
134   MSHIELD_VERSION=4_5_3
135   export mmwavelink_version=mmwave_dfp_01_01_00_00
137   export GCC_FLOAT_PATH ?= FPU
138 else
139   # This section applies to all broader set of boards with SOCs beyond TDA class
140   # in Processor SDK RTOS release
141   PDK_VERSION_STR=_$(PDK_SOC)_$(PDK_VERSION)
142 ifeq ($(PDK_VERSION),)
143   PDK_VERSION_STR=
144 endif
146   #Tool versions for non-TDA builds
147   GCC_CROSS_TOOL_PREFIX=arm-none-eabi-
148   GCC_CROSS_TOOL_TAG=7-2018-q2-update
149   GCC_ARCH64_VERSION=7.2.1-2017.11
150   CGT_VERSION=8.3.2
152   CGT_C7X_VERSION=1.2.0.STS
153   CGT_ARM_VERSION=18.12.1.LTS
154   GCC_VERSION_HARDLIB=7.3.1
156   CGT_ARP32_VERSION=1.0.8
157   CG_XML_VERSION=2.61.00
159   #Component versions for non-TDA builds
160   BIOS_VERSION=6_76_03_01
161   XDC_VERSION=3_55_02_22_core
163   EDMA_VERSION=2_12_05_30E
164   SECDEV_VERSION=01_06_00_05
165   CGT_PRU_VERSION=2.3.2
167   #Hardcode IPC version if it is not set already
168   IPC_VERSION ?= 3_47_01_00
169   NDK_VERSION=3_61_01_01
170   NS_VERSION=2_60_01_06
172   UIA_VERSION=2_30_01_02
173   XDAIS_VERSION=7_24_00_04
174   AER_VERSION=17_0_0_0
176   # C674x DSP libraries sould be used for OMAPL13x platform
177 ifeq ($(SOC),$(filter $(SOC), omapl137 omapl138))
178   DSPLIB_VERSION ?= c674x_3_4_0_3
179   IMGLIB_VERSION ?= c674x_3_1_1_0
180   MATHLIB_VERSION ?= c674x_3_1_2_3
181 else
182   DSPLIB_VERSION ?= c66x_3_4_0_3
183   IMGLIB_VERSION ?= c66x_3_1_1_0
184   MATHLIB_VERSION ?= c66x_3_1_2_3
185 endif
187   export GCC_FLOAT_PATH ?= HARD
188 endif
190 ################################################################################
191 # Dependent toolchain paths variables
192 ################################################################################
193 # Version of GCC
194 GCC_VERSION=$(GCC_CROSS_TOOL_PREFIX)$(GCC_CROSS_TOOL_TAG)
195 GCC_VERSION_ARM_A15=$(GCC_CROSS_TOOL_PREFIX)$(GCC_CROSS_TOOL_TAG)
196 ifeq ($(BOARD),$(filter $(BOARD), $(BOARD_LIST_J6_TDA)))
197   # This section applies to J6 TDA SOCs in Processor SDK VISION release.
198   # For remaining SOC/BOARDS skip to the else part.
199   ifeq ($(OS),Windows_NT)
200     OS_FOLDER=windows
201   else
202     OS_FOLDER=linux
203   endif
204   export TOOLCHAIN_PATH_GCC        ?= $(SDK_INSTALL_PATH)/ti_components/cg_tools/$(OS_FOLDER)/gcc-$(GCC_VERSION)
205   export TOOLCHAIN_PATH_A15        ?= $(SDK_INSTALL_PATH)/ti_components/cg_tools/$(OS_FOLDER)/gcc-$(GCC_VERSION_ARM_A15)
206   export TOOLCHAIN_PATH_M4         ?= $(SDK_INSTALL_PATH)/ti_components/cg_tools/$(OS_FOLDER)/ti-cgt-arm_$(CGT_ARM_VERSION)
207   export C6X_GEN_INSTALL_PATH      ?= $(SDK_INSTALL_PATH)/ti_components/cg_tools/$(OS_FOLDER)/C6000_$(CGT_VERSION)
208   export TOOLCHAIN_PATH_EVE        ?= $(SDK_INSTALL_PATH)/ti_components/cg_tools/$(OS_FOLDER)/arp32_$(CGT_ARP32_VERSION)
209   export PDK_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/ti_components/drivers/pdk_$(PDK_VERSION)/packages
210   export EDMA3LLD_BIOS6_INSTALLDIR ?= $(SDK_INSTALL_PATH)/ti_components/drivers/edma3_lld_$(EDMA_VERSION)
211   export BIOS_INSTALL_PATH         ?= $(SDK_INSTALL_PATH)/ti_components/os_tools/bios_$(BIOS_VERSION)
212   export XDC_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/ti_components/os_tools/$(OS_FOLDER)/xdctools_$(XDC_VERSION)
213   export RADARLINK_INSTALL_PATH    ?= $(SDK_INSTALL_PATH)/ti_components/radar/$(mmwavelink_version)
214   export MSHIELD_DK_DIR            ?= $(SDK_INSTALL_PATH)/ti_components/mshield-dk_std_$(MSHIELD_VERSION)
215   export TI_SECURE_DEV_PKG         := $(MSHIELD_DK_DIR)
216 else
217   export GCC_VERSION_ARM_A8=$(GCC_CROSS_TOOL_PREFIX)$(GCC_CROSS_TOOL_TAG)
218   export GCC_VERSION_ARM_A9=$(GCC_CROSS_TOOL_PREFIX)$(GCC_CROSS_TOOL_TAG)
219   export CROSS_TOOL_PRFX           ?= $(GCC_CROSS_TOOL_PREFIX)
220   export C6X_GEN_INSTALL_PATH      ?= $(TOOLS_INSTALL_PATH)/ti-cgt-c6000_$(CGT_VERSION)
221   export C7X_GEN_INSTALL_PATH      ?= $(TOOLS_INSTALL_PATH)/ti-cgt-c7000_$(CGT_C7X_VERSION)
222   export CL_PRU_INSTALL_PATH       ?= $(TOOLS_INSTALL_PATH)/ti-cgt-pru_$(CGT_PRU_VERSION)
223   export TOOLCHAIN_PATH_A8         ?= $(TOOLS_INSTALL_PATH)/gcc-$(GCC_VERSION_ARM_A8)
224   export TOOLCHAIN_PATH_A9         ?= $(TOOLS_INSTALL_PATH)/gcc-$(GCC_VERSION_ARM_A9)
225   export TOOLCHAIN_PATH_Arm9       ?= $(TOOLS_INSTALL_PATH)/ti-cgt-arm_$(CGT_ARM_VERSION)
226   export TOOLCHAIN_PATH_A15        ?= $(TOOLS_INSTALL_PATH)/gcc-$(GCC_VERSION_ARM_A15)
227 ifeq ($(OS),Windows_NT)
228   #Paths for windows machine
229   export TOOLCHAIN_PATH_GCC_ARCH64 ?= $(TOOLS_INSTALL_PATH)/gcc-linaro-$(GCC_ARCH64_VERSION)-i686-mingw32_aarch64-elf
230 else
231   #Paths for linux machine
232   export TOOLCHAIN_PATH_GCC_ARCH64 ?= $(TOOLS_INSTALL_PATH)/gcc-linaro-$(GCC_ARCH64_VERSION)-x86_64_aarch64-elf
233 endif
235   export TOOLCHAIN_PATH_QNX_A72    ?= $(QNX_HOST)/usr/bin
236   export TOOLCHAIN_PATH_A53        ?= $(TOOLCHAIN_PATH_GCC_ARCH64)
237   export TOOLCHAIN_PATH_A72        ?= $(TOOLCHAIN_PATH_GCC_ARCH64)
238   export TOOLCHAIN_PATH_EVE        ?= $(TOOLS_INSTALL_PATH)/arp32_$(CGT_ARP32_VERSION)
239   export TOOLCHAIN_PATH_M4         ?= $(TOOLS_INSTALL_PATH)/ti-cgt-arm_$(CGT_ARM_VERSION)
240   export TOOLCHAIN_PATH_R5         ?= $(TOOLS_INSTALL_PATH)/ti-cgt-arm_$(CGT_ARM_VERSION)
241   export BIOS_INSTALL_PATH         ?= $(SDK_INSTALL_PATH)/bios_$(BIOS_VERSION)
242   export DSPLIB_INSTALL_PATH       ?= $(SDK_INSTALL_PATH)/dsplib_$(DSPLIB_VERSION)
243   export EDMA3LLD_BIOS6_INSTALLDIR ?= $(SDK_INSTALL_PATH)/edma3_lld_$(EDMA_VERSION)
244   export IMGLIB_INSTALL_PATH       ?= $(SDK_INSTALL_PATH)/imglib_$(IMGLIB_VERSION)
245   export IPC_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/ipc_$(IPC_VERSION)
246   export MATHLIB_INSTALL_PATH      ?= $(SDK_INSTALL_PATH)/mathlib_$(MATHLIB_VERSION)
247   export NDK_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/ndk_$(NDK_VERSION)
248   export NS_INSTALL_PATH           ?= $(SDK_INSTALL_PATH)/ns_$(NS_VERSION)
249   export PDK_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/pdk$(PDK_VERSION_STR)/packages
250   export UIA_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/uia_$(UIA_VERSION)
251   export XDC_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/xdctools_$(XDC_VERSION)
252   export UTILS_INSTALL_DIR         ?= $(XDC_INSTALL_PATH)/bin
253   export RADARLINK_INSTALL_PATH    ?= $(SDK_INSTALL_PATH)/$(mmwavelink_version)
254   export CG_XML_BIN_INSTALL_PATH   ?= $(SDK_INSTALL_PATH)/cg_xml_$(CG_XML_VERSION)/bin
255   export TI_SECURE_DEV_PKG         ?= $(SDK_INSTALL_PATH)/proc-sdk-secdev_$(SECDEV_VERSION)
256   export XDAIS_INSTALL_PATH        ?= $(SDK_INSTALL_PATH)/xdais_$(XDAIS_VERSION)
257   export AER_INSTALL_PATH          ?= $(SDK_INSTALL_PATH)/aer_c64Px_obj_$(AER_VERSION)
258   export GCC_ARM_NONE_TOOLCHAIN    ?= $(SDK_INSTALL_PATH)/gcc-$(GCC_CROSS_TOOL_PREFIX)$(GCC_CROSS_TOOL_TAG)
259   export TI_CGT6x_INSTALL_DIR      ?= $(SDK_INSTALL_PATH)/c6000_7.4.16
260   export M4_TOOLCHAIN_INSTALL_DIR  ?= $(TOOLCHAIN_PATH_M4)
261 endif
263 ifeq ($(SOC),$(filter $(SOC), am335x))
264   export HARDLIB_PATH ?= $(TOOLCHAIN_PATH_A8)/lib/gcc/arm-none-eabi/$(GCC_VERSION_HARDLIB)/hard
265   export FPULIB_PATH ?= $(TOOLCHAIN_PATH_A8)/lib/gcc/arm-none-eabi/$(GCC_VERSION_FPULIB)/fpu
266 else ifeq  ($(SOC),$(filter $(SOC), am437x))
267   export HARDLIB_PATH ?= $(TOOLCHAIN_PATH_A9)/lib/gcc/arm-none-eabi/$(GCC_VERSION_HARDLIB)/hard
268   export FPULIB_PATH ?= $(TOOLCHAIN_PATH_A9)/lib/gcc/arm-none-eabi/$(GCC_VERSION_FPULIB)/fpu
269 else
270   export HARDLIB_PATH ?= $(TOOLCHAIN_PATH_A15)/lib/gcc/arm-none-eabi/$(GCC_VERSION_HARDLIB)/hard
271   export FPULIB_PATH ?= $(TOOLCHAIN_PATH_A15)/lib/gcc/arm-none-eabi/$(GCC_VERSION_FPULIB)/fpu
272 endif
274 export CGTOOLS=$(C6X_GEN_INSTALL_PATH)
275 export XDCCGROOT=$(C6X_GEN_INSTALL_PATH)
277 # Utilities directory. This is required only if the build machine is Windows.
278 #   - specify the installation directory of utility which supports POSIX commands
279 #     (eg: Cygwin installation or MSYS installation).
280 # This could be in CCS install directory as in c:/ti/ccsv<ver>/utils/cygwin or
281 # the XDC install bin folder represented by  $(UTILS_INSTALL_DIR)
282 ifeq ($(OS),Windows_NT)
283   export utils_PATH ?= $(UTILS_INSTALL_DIR)
284 endif
286 ################################################################################
287 # Other advanced configurable variables
288 ################################################################################
290 # Set Core Build Profile depending on BUILD_PROFILE value
291 export BUILD_PROFILE_$(CORE) ?= $(BUILD_PROFILE)
293 # Default PACKAGE_SELECT build flag
294 # Supported values: all, vps-hal-only, vps-vip-only, vps-vpe-only, vps-dss-only, vps-vip-dss, vps-vip-vpe
295 export PACKAGE_SELECT ?= all
297 # Disable recursive building of example dependencies
298 export DISABLE_RECURSE_DEPS ?= no
300 # Default C++ build flag, yes or no
301 export CPLUSPLUS_BUILD ?= no
303 #use <module>_PATH variable as makefile internally expects PATH variable this way for external component path
304 export pdk_PATH := $(PDK_INSTALL_PATH)
305 export bios_PATH := $(BIOS_INSTALL_PATH)
306 export xdc_PATH := $(XDC_INSTALL_PATH)
307 export edma3_lld_PATH := $(EDMA3LLD_BIOS6_INSTALLDIR)
308 export ndk_PATH := $(NDK_INSTALL_PATH)
309 export radarLink_PATH := $(RADARLINK_INSTALL_PATH)
311 export ROOTDIR := $(pdk_PATH)
312 XDCPATH =
313 ifeq ($(BUILD_OS_TYPE),tirtos)
314   XDCPATH = $(bios_PATH)/packages;$(xdc_PATH)/packages;$(edma3_lld_PATH)/packages;$(ndk_PATH)/packages;$(pdk_PATH);
315 endif
316 export XDCPATH
318 #Default SECTTI SIZE INFORMATION
319 export SECTTI_SIZE_INFO ?= no
321 #Default SECTTI tool
322 export SECTTI ?= $(CG_XML_BIN_INSTALL_PATH)/sectti
324 # Build for HS devices if secdev package is found
325 ifneq ("$(wildcard $(TI_SECURE_DEV_PKG)/scripts/secure-binary-image.sh)","")
326   export SECUREMODE ?= yes
327 endif
329 # include other dependent files
330 include $(PDK_INSTALL_PATH)/ti/build/comp_paths.mk
331 ifeq ($(MAKERULEDIR), )
332   #Makerule path not defined, define this and assume relative path from ROOTDIR
333   export MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
334 endif
335 include $(MAKERULEDIR)/build_config.mk
336 include $(MAKERULEDIR)/platform.mk
337 include $(MAKERULEDIR)/env.mk