]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/ipc/examples/common/makefile.mk
5e240c7b641f8ece8d686bc76fd5324055cf5667
[processor-sdk/pdk.git] / packages / ti / drv / ipc / examples / common / makefile.mk
1 #
2 # This file is the makefile for building IPC example app for TI RTOS
3 #
4 SRCDIR += . ../common/src
5 INCDIR =
7 # List all the external components/interfaces, whose interface header files
8 #  need to be included for this component
9 INCLUDE_EXTERNAL_INTERFACES = pdk
11 # List all the components required by the application
12 COMP_LIST_COMMON = csl sciclient
13 COMP_LIST_COMMON += board i2c uart
14 ifeq ($(BUILD_OS_TYPE), baremetal)
15   COMP_LIST_COMMON += csl_init osal_nonos
16   COMP_LIST_COMMON += ipc_baremetal
17   SRCS_COMMON += main_baremetal.c
18   ifeq ($(ISA),$(filter $(ISA), a53, a72))
19     LNKFLAGS_LOCAL_$(CORE) += --entry Entry
20   endif
21   ifeq ($(SOC),$(filter $(SOC), j721e j7200 am65xx))
22           EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/$(SOC)/linker_$(ISA)_$(CORE).lds
23   endif
24 else
25   INCLUDE_EXTERNAL_INTERFACES += xdc bios
26   COMP_LIST_COMMON += ipc osal_tirtos
27   SRCS_COMMON += main_tirtos.c
28   # Enable XDC build for application by providing XDC CFG File per core
29   XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/build/$(SOC)/sysbios_$(ISA).cfg
30 ifeq ($(SOC),$(filter $(SOC), j721e j7200))
31   XDC_CFG_UPDATE_$(CORE) = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/ipc_override.cfg
32   ifeq ($(ECHO_TEST_BTCM), 1)
33     ifeq ($(ISA), r5f)
34       ifeq ($(CORE),mcu1_0)
35             XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/sysbios_$(ISA)_btcm.cfg
36             SRCS_ASM_COMMON += ipcCopyVecs2Exc.asm
37       else
38             XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/sysbios_$(ISA).cfg
39       endif
40           EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/linker_$(ISA)_$(CORE)_btcm_sysbios.lds
41     else
42           EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/linker_$(ISA)_$(CORE)_sysbios.lds
43     endif
44   else
45     ifeq ($(ISA), r5f)
46           XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/sysbios_$(ISA).cfg
47     endif
48         EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/j721e/linker_$(ISA)_$(CORE)_sysbios.lds
49   endif
50 endif
51 ifeq ($(SOC),$(filter $(SOC), am65xx))
52   XDC_CFG_UPDATE_$(CORE) = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/am65xx/ipc_override.cfg
53   ifeq ($(ISA), r5f)
54     XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/am65xx/sysbios_$(ISA).cfg
55   endif
56   EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/ipc/examples/common/am65xx/linker_$(ISA)_$(CORE)_sysbios.lds
57 endif
58 endif
60 # Common source files and CFLAGS across all platforms and cores
61 PACKAGE_SRCS_COMMON = . ../common ../../common
62 ifneq ($(BUILD_OS_TYPE), baremetal)
63 SRCS_COMMON += ipc_utils.c ipc_testsetup.c
64 else
65 SRCS_COMMON += ipc_trace.c ipctest_baremetal.c
66 endif
68 CFLAGS_LOCAL_COMMON += $(PDK_CFLAGS)
70 # Core/SoC/platform specific source files and CFLAGS
71 # Example:
72 #   SRCS_<core/SoC/platform-name> =
73 #   CFLAGS_LOCAL_<core/SoC/platform-name> =
75 # Include common make files
76 ifeq ($(MAKERULEDIR), )
77 #Makerule path not defined, define this and assume relative path from ROOTDIR
78   MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
79   export MAKERULEDIR
80 endif
81 include $(MAKERULEDIR)/common.mk
83 # OBJs and libraries are built by using rule defined in rules_<target>.mk
84 #     and need not be explicitly specified here
86 # Nothing beyond this point