[Build Fix]
[processor-sdk/pdk.git] / packages / ti / diag / sdr / test / sdtf-test / makefile.mk
1 #
2 # This file is the makefile for building Software Diagnostics Reference test app
3 #
4 SRCDIR = src \
5                  src/$(BOARD) \
6                  src/$(BOARD)/r5f \
7                  src/$(BOARD)/r5f/baremetal \
8                  src/r5f/
9 INCDIR = ../../ src \
10                  src/$(BOARD) \
11                  src/$(BOARD)/r5f \
12                  src/r5f/
14 # List all the external components/interfaces, whose interface header files
15 #  need to be included for this component
16 INCLUDE_EXTERNAL_INTERFACES = pdk
18 # List all the components required by the application
19 COMP_LIST_COMMON = $(PDK_COMMON_BAREMETAL_COMP)
20 COMP_LIST_COMMON += sdr
22 SRCS_COMMON = sdtf_main.c sdtf_test.c sdtf_init.c sdtf_profile.c sdtf_injecterr.c \
23                           sdtf_registercheck.c sdtf_wdt.c sdtf_esm.c sdtf_ecc.c sdtf_ccm.c \
24                           sdtf_crc.c sdtf_mpu.c
25 SRCS_COMMON += sdtf_platform.c \
26                            sdtf_core.c \
27                            sdtf_exception.c \
28                            sdtf_mpu_default.c \
29                            sdtf_rat.c \
30                            sdtf_utils.c
32 SRCS_ASM_COMMON += sdtf_utils_asm.asm
33 ifeq ($(ISA),$(filter $(ISA), a53, a72))
34   LNKFLAGS_LOCAL_$(CORE) += --entry Entry
35 endif
37 EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/diag/sdr/test/sdtf-test/build/r5f/$(SOC)/linker_r5.lds
39 # Common source files and CFLAGS across all platforms and cores
40 PACKAGE_SRCS_COMMON = . ../ ../../
41 SRCS_COMMON +=
43 CFLAGS_LOCAL_COMMON += $(PDK_CFLAGS)
44 CFLAGS_LOCAL_COMMON += -DUART_PRINTF
46 ifeq ($(SOC),$(filter $(SOC), am65xx j721e))
47  SRCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/Unity/src
48  SRCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/config
49  INCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/Unity/src
50  INCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/config
51  SRCS_COMMON += unity_config.c unity.c
52  CFLAGS_LOCAL_COMMON += -DUNITY_INCLUDE_CONFIG_H
53  CFLAGS_LOCAL_COMMON += -DSDTF_BOARD
54 endif
56 # Core/SoC/platform specific source files and CFLAGS
57 # Example:
58 #   SRCS_<core/SoC/platform-name> =
59 #   CFLAGS_LOCAL_<core/SoC/platform-name> =
61 # Include common make files
62 ifeq ($(MAKERULEDIR), )
63 #Makerule path not defined, define this and assume relative path from ROOTDIR
64   MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
65   export MAKERULEDIR
66 endif
67 include $(MAKERULEDIR)/common.mk
69 # OBJs and libraries are built by using rule defined in rules_<target>.mk
70 #     and need not be explicitly specified here
72 # Nothing beyond this point