]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/osal/test/baremetal/makefile
abf3abf1c463ffad4e9c813748e37863a8e20793
[processor-sdk/pdk.git] / packages / ti / osal / test / baremetal / makefile
1 #
2 # This file is the makefile for building CSL timer app.
3 #
4 ifeq ($(RULES_MAKE), )
5 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
6 else
7 include $(RULES_MAKE)
8 endif
10 #Name of the directory created under packages/ti/binary/
11 APP_NAME = OSAL_Baremetal_TestApp
12 # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
13 LOCAL_APP_NAME =  OSAL_Baremetal_$(BOARD)_$(CORE)TestApp
14 BUILD_OS_TYPE = baremetal
16 SRCDIR = ../src
17 INCDIR = ../src
19 # List all the external components/interfaces, whose interface header files
20 #  need to be included for this component
21 INCLUDE_EXTERNAL_INTERFACES = pdk csl_arch
23 # List all the components required by the application
24 ifeq ($(SOC),$(filter $(SOC), tpr12))
25   COMP_LIST_COMMON += board osal_nonos
26 else
27   COMP_LIST_COMMON += board uart osal_nonos i2c
28 endif
29 COMP_LIST_c66x = csl_intc
30 COMP_LIST_c66xdsp_1 = csl_intc
31 COMP_LIST_c66xdsp_2 = csl_intc
32 COMP_LIST_c674x = csl_intc
33 COMP_LIST_COMMON += csl
34 COMP_LIST_a15_0   = csl_init
35 COMP_LIST_arm9_0 = csl_init
36 COMP_LIST_mpu1_0  = csl_init
37 COMP_LIST_mcu1_0  = csl_init
38 COMP_LIST_mcu1_1  = csl_init
39 COMP_LIST_mcu2_0  = csl_init
40 COMP_LIST_mcu2_1  = csl_init
41 COMP_LIST_mcu3_0  = csl_init
42 COMP_LIST_mcu3_1  = csl_init
43 COMP_LIST_m4f_0   = csl_init
45 ifeq ($(SOC),$(filter $(SOC), am65xx j721e j7200 am64x))
46   COMP_LIST_COMMON += sciclient
47 endif
49 # Common source files and CFLAGS across all platforms and cores
50 PACKAGE_SRCS_COMMON = . ../src
51 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) -DBARE_METAL
53 ifeq ($(MANUAL_CACHE_TEST),YES)
54   CFLAGS_LOCAL_COMMON += -DMANUAL_CACHE_TEST
55 endif
57 ifeq ($(SOC),$(filter $(SOC), k2h k2k k2l k2e k2g c6678 c6657 am571x am572x am574x am437x am335x omapl137 omapl138 am65xx j721e j7200 am64x tpr12))
58   CFLAGS_LOCAL_COMMON += -DENABLE_TIMER_TEST
59 endif
61 SRCS_COMMON += main_osal_test.c
62 ifeq ($(CORE),a8host)
63   # Additional Source and Include for AM335x for init/entry source files
64   SRCDIR      += $(PDK_OSAL_COMP_PATH)/test/am335x/armv7/nonos
65   INCDIR      += $(PDK_OSAL_COMP_PATH)/test/am335x/armv7/nonos
66   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include
67   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include/hw
68   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include/armv7a
69   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include/am335x
70   SRCS_COMMON += example_utils_mmu.c mmu_arm.c app_startup.c
71   SRCS_ASM_COMMON += init.asm exceptionhandler.asm
72   #Indicate gcc compilation for starterware header files
73   CFLAGS_LOCAL_COMMON += -Dgcc
74 endif
76 ifeq ($(CORE),a9host)
77   # Additional Source and Include for AM437x for init/entry source files
78   SRCDIR += $(PDK_OSAL_COMP_PATH)/test/am437x/armv7/nonos
79   INCDIR += $(PDK_OSAL_COMP_PATH)/test/am437x/armv7/nonos
80   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include
81   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include/hw
82   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include/armv7a
83   INCDIR += $(PDK_INSTALL_PATH)/ti/starterware/include/am43xx
84   SRCS_COMMON += example_utils_mmu.c mmu_arm.c app_startup.c
85   SRCS_ASM_COMMON += init.asm exceptionhandler.asm
86   #Indicate gcc compilation for starterware header files
87   CFLAGS_LOCAL_COMMON += -Dgcc
88 endif
91 ifeq ($(SOC),$(filter $(SOC), k2g k2e k2h k2k k2l))
92   ifeq ($(CORE),a15_0)
93    LNKCMD_FILE = $(PDK_OSAL_COMP_PATH)/test/k2g/armv7/nonos/k2g_lnk.cmd
94   endif
95 else
96   ifeq ($(CORE),a15_0)
97    LNKCMD_FILE = $(PDK_CSL_COMP_PATH)/example/lnk_a15.cmd
98   endif
99 endif
101 ifeq ($(CORE),ipu1_0)
102  LNKCMD_FILE = $(PDK_CSL_COMP_PATH)/example/lnk_m4.cmd
103 endif
104 ifeq ($(CORE),c66x)
105  LNKCMD_FILE = $(PDK_CSL_COMP_PATH)/example/lnk_dsp.cmd
106 endif
108 ifeq ($(CORE),c674x)
109    LNKCMD_FILE = $(PDK_OSAL_COMP_PATH)/test/$(SOC)/c674x/nonos/lnk_c674x.cmd
110 endif
112 ifeq ($(CORE),a8host)
113  LNKCMD_FILE = $(PDK_OSAL_COMP_PATH)/test/am335x/armv7/nonos/am335x_ddr.lds
114 endif
116 ifeq ($(CORE),a9host)
117  LNKCMD_FILE = $(PDK_OSAL_COMP_PATH)/test/am437x/armv7/nonos/am43xx_ddr.lds
118 endif
120 ifeq ($(CORE), arm9_0)
121  LNKCMD_FILE = $(PDK_OSAL_COMP_PATH)/test/$(SOC)/arm9/nonos/lnk_arm9.cmd
122 endif
124 LNKFLAGS_LOCAL_a15_0  += --entry Entry
125 LNKFLAGS_LOCAL_a8host += --entry Entry
126 LNKFLAGS_LOCAL_a9host += --entry Entry
127 LNKFLAGS_LOCAL_mpu1_0 += --entry Entry
130 # Core/SoC/platform specific source files and CFLAGS
131 # Example:
132 #   SRCS_<core/SoC/platform-name> =
133 #   CFLAGS_LOCAL_<core/SoC/platform-name> =
135 # Include common make files
136 ifeq ($(MAKERULEDIR), )
137 #Makerule path not defined, define this and assume relative path from ROOTDIR
138   MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
139   export MAKERULEDIR
140 endif
141 include $(MAKERULEDIR)/common.mk
143 # OBJs and libraries are built by using rule defined in rules_<target>.mk
144 #     and need not be explicitly specified here
146 # Nothing beyond this point