]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/board/diag/current_monitor/build/makefile
Adding Early CAN Response in Boot App.
[processor-sdk/pdk.git] / packages / ti / board / diag / current_monitor / build / makefile
1 # Copyright (C) 2019-2021 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 CSL uart app.
38 #
39 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
41 # Board diag parameters which can be controlled outside this makefile
42 DIAGNAME ?= currentMonitor
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 ifeq ($(MODENAME), )
58 ifeq ($(TESTMODE), STRESS_TEST)
59 MODENAME = Stress
60 endif
61 endif
63 SRCDIR = ../src ../../common/$(SOC) ./$(BOARD)
64 INCDIR = ../../../../board ../src ../../../src/$(BOARD)/include ../../../src/$(BOARD) ../../../src/flash ../../common/$(SOC)
66 # List all the external components/interfaces, whose interface header files
67 # need to be included for this component
68 INCLUDE_EXTERNAL_INTERFACES = pdk
70 # List all the components required by the application
71 COMP_LIST_COMMON = $(PDK_COMMON_BAREMETAL_COMP)
73 # Common source files and CFLAGS across all platforms and cores
74 PACKAGE_SRCS_COMMON = ../src makefile
75 PACKAGE_SRCS_COMMON += ../../common/$(SOC)
76 PACKAGE_SRCS_COMMON += ../../board_diag_component.mk
77 PACKAGE_SRCS_COMMON += ../../create_sd.bat ../../create_sd.sh
79 SRCS_COMMON += current_monitor_test.c diag_common_cfg.c
80 ifeq ($(SOC), $(filter $(SOC), j721e j7200 j721s2))
81 SRCS_COMMON += current_monitor_config.c
82 PACKAGE_SRCS_COMMON += $(BOARD)
83 endif
85 ifeq ($(CORE),$(filter $(CORE), mcu1_0))
86 SRCS_ASM_COMMON += diag_entry_r5.asm
87 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_$(CORE).lds
88 endif
90 ifeq ($(CORE),$(filter $(CORE), mpu1_0))
91 SRCS_ASM_COMMON += diag_entry.asm
92 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_$(CORE).lds
93 endif
95 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) -DDIAG_$(TESTMODE) $(BOARD_DIAG_CFLAGS)
97 # Include common make files
98 ifeq ($(MAKERULEDIR), )
99 #Makerule path not defined, define this and assume relative path from ROOTDIR
100   MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
101   export MAKERULEDIR
102 endif
103 include $(MAKERULEDIR)/common.mk
105 # OBJs and libraries are built by using rule defined in rules_<target>.mk
106 #     and need not be explicitly specified here
108 # Nothing beyond this point