1 # Makefile for UART unit test app
2 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
5 ifeq ($(IS_BAREMETAL),yes)
6 BUILD_OS_TYPE = baremetal
7 CFLAGS_OS_DEFINES =
8 LNKFLAGS_LOCAL_mpu1_0 += --entry Entry
9 COMP_LIST_COMMON = osal_nonos
10 ifeq ($(ARCH),c66x)
11 COMP_LIST_COMMON += csl_intc
12 else
13 COMP_LIST_COMMON += csl_init
14 endif
15 EXTERNAL_INTERFACES =
16 XDC_CFG_FILE_mpu1_0 =
17 XDC_CFG_FILE_mcu1_0 =
18 else
19 BUILD_OS_TYPE = tirtos
20 CFLAGS_OS_DEFINES = -DUSE_BIOS
21 EXTERNAL_INTERFACES = bios xdc
22 COMP_LIST_COMMON = osal_tirtos
23 XDC_CFG_FILE_mpu1_0 = ./$(SOC)/uartUnitTest_$(ISA).cfg
24 XDC_CFG_FILE_mcu1_0 = ./$(SOC)/uartUnitTest_r5.cfg
25 ifeq ($(SOC),$(filter $(SOC), j721e j7200))
26 XDC_CFG_FILE_$(CORE) = $(PDK_INSTALL_PATH)/ti/build/$(SOC)/sysbios_$(ISA).cfg
27 endif
28 endif
30 SRCDIR = . src
31 INCDIR = . src
32 # Common source files across all platforms and cores
33 SRCS_COMMON += main_uart_test.c
35 # List all the external components/interfaces, whose interface header files
36 # need to be included for this component
37 INCLUDE_EXTERNAL_INTERFACES = pdk $(EXTERNAL_INTERFACES)
40 ifeq ($(BUILD_OS_TYPE), tirtos)
41 UART_OS_TYPE=
42 else
43 UART_OS_TYPE=_Baremetal
44 endif
46 # DMA enabled build
47 ifeq ($(DMA), enable)
48 ifeq ($(SMP), enable)
49 #Name of the directory created under packages/ti/binary/
50 APP_NAME = UART$(UART_OS_TYPE)_DMA_SMP_TestApp
51 # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
52 LOCAL_APP_NAME = UART$(UART_OS_TYPE)_DMA_$(BOARD)_$(CORE)_SMP_TestApp
53 else
54 #Name of the directory created under packages/ti/binary/
55 APP_NAME = UART$(UART_OS_TYPE)_DMA_TestApp
56 # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
57 LOCAL_APP_NAME = UART$(UART_OS_TYPE)_DMA_$(BOARD)_$(CORE)TestApp
58 endif
59 COMP_LIST_COMMON += uart_dma udma sciclient i2c
60 #COMP_LIST_COMMON += uart_dma_profile udma
61 CFLAGS_UART_DMA = -DUART_DMA_ENABLE
62 else
63 ifeq ($(SMP), enable)
64 #Name of the directory created under packages/ti/binary/
65 APP_NAME = UART$(UART_OS_TYPE)_SMP_TestApp
66 # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
67 LOCAL_APP_NAME = UART$(UART_OS_TYPE)_$(BOARD)_$(CORE)_SMP_TestApp
68 else
69 #Name of the directory created under packages/ti/binary/
70 APP_NAME = UART$(UART_OS_TYPE)_TestApp
71 # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>
72 LOCAL_APP_NAME = UART$(UART_OS_TYPE)_$(BOARD)_$(CORE)TestApp
73 endif
74 COMP_LIST_COMMON += uart
76 ifeq ($(SOC),$(filter $(SOC), am65xx j721e j7200))
77 COMP_LIST_COMMON += sciclient i2c
78 endif
80 #COMP_LIST_COMMON += uart_profile
81 CFLAGS_UART_DMA =
82 endif
83 # List all the components required by the application
84 COMP_LIST_COMMON += csl board
85 #COMP_LIST_COMMON += osal_tirtos csl board profiling
87 PACKAGE_SRCS_COMMON = .
88 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(CFLAGS_UART_DMA) $(CFLAGS_OS_DEFINES)
90 # Include common make files
91 ifeq ($(MAKERULEDIR), )
92 #Makerule path not defined, define this and assume relative path from ROOTDIR
93 MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
94 export MAKERULEDIR
95 endif
96 include $(MAKERULEDIR)/common.mk
98 # OBJs and libraries are built by using rule defined in rules_<target>.mk
99 # and need not be explicitly specified here
101 # Nothing beyond this point