]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/board/diag/norflash/build/makefile
board-rtos: add to PDK
[processor-sdk/pdk.git] / packages / ti / board / diag / norflash / build / makefile
1 # Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/\r
2 #\r
3 #\r
4 #  Redistribution and use in source and binary forms, with or without\r
5 #  modification, are permitted provided that the following conditions\r
6 #  are met:\r
7 #\r
8 #    Redistributions of source code must retain the above copyright\r
9 #    notice, this list of conditions and the following disclaimer.\r
10 #\r
11 #    Redistributions in binary form must reproduce the above copyright\r
12 #    notice, this list of conditions and the following disclaimer in the\r
13 #    documentation and/or other materials provided with the\r
14 #    distribution.\r
15 #\r
16 #    Neither the name of Texas Instruments Incorporated nor the names of\r
17 #    its contributors may be used to endorse or promote products derived\r
18 #    from this software without specific prior written permission.\r
19 #\r
20 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
21 #  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
22 #  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
23 #  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
24 #  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
25 #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
26 #  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
27 #  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
28 #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
29 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
30 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
31 \r
32 #\r
33 # Macro definitions referenced below\r
34 #\r
35 \r
36 #\r
37 # This file is the makefile for building CSL uart app.\r
38 #\r
39 include $(PDK_INSTALL_PATH)/ti/build/Rules.make\r
40 \r
41 # Board diag parameters which can be controlled outside this makefile\r
42 DIAGNAME ?= norflash\r
43 PROFILE ?= release\r
44 TESTMODE ?= FUNCTIONAL_TEST\r
45 MODENAME ?=\r
46 BOARD_DIAG_CFLAGS ?=\r
47 APP_NAME ?= $(DIAGNAME)_board_diag\r
48 \r
49 BUILD_PROFILE_$(CORE) = $(PROFILE)\r
50 \r
51 BUILD_OS_TYPE = baremetal\r
52 LNKFLAGS_LOCAL_mpu1_0  += --entry Entry\r
53 EXTERNAL_INTERFACES =\r
54 XDC_CFG_FILE_mpu1_0 =\r
55 XDC_CFG_FILE_mcu1_0 =\r
56 \r
57 ifeq ($(MODENAME), )\r
58 ifeq ($(TESTMODE), STRESS_TEST)\r
59 MODENAME = Stress\r
60 endif\r
61 endif\r
62 \r
63 # Name of the binary if different from the default (APP_NAME)_$(BOARD_$(CORE)_<build_profile>\r
64 LOCAL_APP_NAME =  $(DIAGNAME)$(MODENAME)_DiagExample_$(BOARD)_$(CORE)\r
65 \r
66 SRCDIR = $(PDK_INSTALL_PATH)/ti/board/diag/$(DIAGNAME)/src $(PDK_INSTALL_PATH)/ti/board/diag/$(DIAGNAME)/build/$(BOARD) $(PDK_INSTALL_PATH)/ti/board/diag/common/$(SOC) $(PDK_INSTALL_PATH)/ti/csl\r
67 INCDIR = $(PDK_INSTALL_PATH)/ti/board/ $(PDK_INSTALL_PATH)/ti/csl $(PDK_INSTALL_PATH)/ti/board/diag/$(DIAGNAME)/src $(PDK_INSTALL_PATH)/ti/board/src/$(BOARD)/include $(PDK_INSTALL_PATH)/ti/board/diag/common/$(SOC)\r
68 \r
69 ifeq ($(BOARD), $(filter $(BOARD), j721e_evm))\r
70 SRCDIR += ./$(BOARD)\r
71 INCDIR += ./$(BOARD)\r
72 endif\r
73 \r
74 # List all the external components/interfaces, whose interface header files\r
75 # need to be included for this component\r
76 INCLUDE_EXTERNAL_INTERFACES = pdk\r
77 \r
78 # List all the components required by the application\r
79 COMP_LIST_COMMON = board csl csl_init osal_nonos uart gpio spi i2c\r
80 ifeq ($(SOC), $(filter $(SOC), j721e))\r
81 COMP_LIST_COMMON += sciclient udma\r
82 endif\r
83 \r
84 \r
85 # Common source files and CFLAGS across all platforms and cores\r
86 PACKAGE_SRCS_COMMON = ../src/ospi_quad_test.c ../src/ospi_quad_test.h makefile\r
87 PACKAGE_SRCS_COMMON += ../../common/$(SOC)\r
88 PACKAGE_SRCS_COMMON += ../../board_diag_component.mk\r
89 PACKAGE_SRCS_COMMON += ../../create_sd.bat ../../create_sd.sh\r
90 \r
91 SRCS_COMMON += ospi_quad_test.c diag_common_cfg.c\r
92 \r
93 ifeq ($(CORE),$(filter $(CORE), mcu1_0))\r
94 SRCS_ASM_COMMON += diag_entry_r5.asm\r
95 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_r5_mcu1_0.lds\r
96 endif\r
97 \r
98 ifeq ($(CORE),$(filter $(CORE), mpu1_0))\r
99 SRCS_ASM_COMMON += diag_entry.asm\r
100 EXTERNAL_LNKCMD_FILE_LOCAL = ../../common/$(SOC)/linker_a72_mpu1_0.lds\r
101 endif\r
102 \r
103 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) -DDIAG_$(TESTMODE) $(BOARD_DIAG_CFLAGS)\r
104 \r
105 # Include common make files\r
106 ifeq ($(MAKERULEDIR), )\r
107 #Makerule path not defined, define this and assume relative path from ROOTDIR\r
108   MAKERULEDIR := $(ROOTDIR)/ti/build/makerules\r
109   export MAKERULEDIR\r
110 endif\r
111 include $(MAKERULEDIR)/common.mk\r
112 \r
113 # OBJs and libraries are built by using rule defined in rules_<target>.mk\r
114 #     and need not be explicitly specified here\r
115 \r
116 # Nothing beyond this point\r