1 # Copyright (C) 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 ?= octalNand
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)
72 COMP_LIST_COMMON += spi
74 # Common source files and CFLAGS across all platforms and cores
75 # Common source files and CFLAGS across all platforms and cores
76 PACKAGE_SRCS_COMMON = ../src $(BOARD) makefile
77 PACKAGE_SRCS_COMMON += ../../common/$(SOC)
78 PACKAGE_SRCS_COMMON += ../../board_diag_component.mk
79 PACKAGE_SRCS_COMMON += ../../create_sd.bat ../../create_sd.sh
81 SRCS_COMMON += octal_nand_test.c diag_common_cfg.c ospi_mux_gpio_pin_config.c
83 ifeq ($(CORE),$(filter $(CORE), mcu1_0))
84 SRCS_ASM_COMMON += diag_entry_r5.asm
85 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_$(CORE).lds
86 endif
88 ifeq ($(CORE),$(filter $(CORE), mpu1_0))
89 SRCS_ASM_COMMON += diag_entry.asm
90 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_$(CORE).lds
91 endif
93 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) -DDIAG_$(TESTMODE) $(BOARD_DIAG_CFLAGS)
95 # Include common make files
96 ifeq ($(MAKERULEDIR), )
97 #Makerule path not defined, define this and assume relative path from ROOTDIR
98 MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
99 export MAKERULEDIR
100 endif
101 include $(MAKERULEDIR)/common.mk
103 # OBJs and libraries are built by using rule defined in rules_<target>.mk
104 # and need not be explicitly specified here
106 # Nothing beyond this point