]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/board/diag/uart/build/makefile
Merge pull request #860 in PROCESSOR-SDK/pdk from don/makefile_common_comp to master
[processor-sdk/pdk.git] / packages / ti / board / diag / uart / build / makefile
1 # Copyright (C) 2019-2020 Texas Instruments Incorporated - http://www.ti.com/
2 #
3 #
4 #  Redistribution and use in source and binary forms, with or without
5 #  modification, are permitted provided that the following conditions
6 #  are met:
7 #
8 #    Redistributions of source code must retain the above copyright
9 #    notice, this list of conditions and the following disclaimer.
10 #
11 #    Redistributions in binary form must reproduce the above copyright
12 #    notice, this list of conditions and the following disclaimer in the
13 #    documentation and/or other materials provided with the
14 #    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
21 #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 #  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #
33 # Macro definitions referenced below
34 #
36 #
37 # This file is the makefile for building uart diag test.
38 #
39 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
41 # Board diag parameters which can be controlled outside this makefile
42 DIAGNAME ?= uart
43 PROFILE ?= release
44 TESTMODE ?= FUNCTIONAL_TEST
45 MODENAME ?=
46 BOARD_DIAG_CFLAGS ?=
47 APP_NAME ?= board_diag_$(DIAGNAME)
49 BUILD_PROFILE_$(CORE) = $(PROFILE)
51 BUILD_OS_TYPE = baremetal
52 LNKFLAGS_LOCAL_mpu1_0  += --entry Entry
53 EXTERNAL_INTERFACES =
54 XDC_CFG_FILE_mpu1_0 =
55 XDC_CFG_FILE_mcu1_0 =
57 SRCDIR = ../src ../../common/$(SOC) ./$(BOARD)
58 INCDIR = ../../../../board ../src ../../../src/$(BOARD)/include ../../../src/$(BOARD) ../../../src/flash ../../common/$(SOC) ../../../src/evmKeystone3/include
60 # List all the external components/interfaces, whose interface header files
61 # need to be included for this component
62 INCLUDE_EXTERNAL_INTERFACES = pdk csl
64 # List all the components required by the application
65 COMP_LIST_COMMON = $(PDK_COMMON_BAREMETAL_COMP)
67 # Common source files and CFLAGS across all platforms and cores
68 PACKAGE_SRCS_COMMON = ../src makefile
69 PACKAGE_SRCS_COMMON += ../../common/$(SOC)
70 PACKAGE_SRCS_COMMON += ../../board_diag_component.mk
71 PACKAGE_SRCS_COMMON += ../../create_sd.bat ../../create_sd.sh
73 SRCS_COMMON += uart_diag.c diag_common_cfg.c
75 ifeq ($(CORE),$(filter $(CORE), mcu1_0))
76 SRCS_ASM_COMMON += diag_entry_r5.asm
77 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_$(CORE).lds
78 endif
80 ifeq ($(CORE),$(filter $(CORE), mpu1_0))
81 SRCS_ASM_COMMON += diag_entry.asm
82 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_$(CORE).lds
83 endif
85 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) -DDIAG_$(TESTMODE) $(BOARD_DIAG_CFLAGS)
87 # Include common make files
88 ifeq ($(MAKERULEDIR), )
89 #Makerule path not defined, define this and assume relative path from ROOTDIR
90   MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
91   export MAKERULEDIR
92 endif
93 include $(MAKERULEDIR)/common.mk
95 # OBJs and libraries are built by using rule defined in rules_<target>.mk
96 #     and need not be explicitly specified here
98 # Nothing beyond this point