731d22631fed5b05d2ddb2c9c382f4efbbcb8631
1 #
2 # This file is the makefile for building Software Diagnostics ESM Example app.
3 #
4 # Copyright (c) Texas Instruments Incorporated 2020
5 #
6 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
8 APP_NAME = diag_ex_esm_example_app
10 BUILD_OS_TYPE=baremetal
12 SRCDIR = . ../common
13 INCDIR =
15 INCDIR += $(SOC)/. ../common
17 # List all the external components/interfaces, whose interface header files
18 # need to be included for this component
19 INCLUDE_EXTERNAL_INTERFACES = pdk sdr
21 # List all the components required by the application
22 COMP_LIST_COMMON = csl_utils_common csl_uart_console
23 COMP_LIST_COMMON += sdr
25 ifeq ($(SOC),$(filter $(SOC), j721e am64x))
26 COMP_LIST_COMMON += $(PDK_COMMON_BAREMETAL_COMP)
27 endif
29 ifeq ($(CSL_BUILD),$(filter $(CSL_BUILD), CSL))
30 ifneq ($(SOC),$(filter $(SOC), j721e am64x))
31 COMP_LIST_COMMON = csl
32 endif
33 else
34 COMP_LIST_COMMON = csl2 csl_trim
35 endif
37 # Common source files and CFLAGS across all platforms and cores
38 PACKAGE_SRCS_COMMON = .
40 ifeq ($(SOC),$(filter $(SOC), j721e am64x))
41 SRCS_COMMON = main.c esm.c event_trig.c diag_utils.c
42 endif
43 LNKFLAGS_LOCAL_mpu1_0 += --entry Entry
44 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS)
46 CFLAGS_LOCAL_COMMON += -DUART_PRINTF
48 # To print events to UART during the flow of the Use Case itself,
49 # uncomment this line
50 # By default, tests are done with pin triggering with 100usec minimum
51 # interval time, i.e. this macro is disabled
52 #CFLAGS_LOCAL_COMMON += -DPRINT_EVENTS
53 # To print more verbose prints, uncomment this build flag
54 #CFLAGS_LOCAL_COMMON += -DDEBUG_PRINT
56 ifeq ($(SOC),$(filter $(SOC), j721e am64x))
57 SRCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/Unity/src
58 SRCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/config
59 INCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/Unity/src
60 INCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/config
61 SRCS_COMMON += unity_config.c unity.c
62 CFLAGS_LOCAL_COMMON += -DUNITY_INCLUDE_CONFIG_H
63 endif
66 # Core/SoC/platform specific source files and CFLAGS
67 # Example:
68 # SRCS_<core/SoC/platform-name> =
69 # CFLAGS_LOCAL_<core/SoC/platform-name> =
71 # Include common make files
72 ifeq ($(MAKERULEDIR), )
73 #Makerule path not defined, define this and assume relative path from ROOTDIR
74 MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
75 export MAKERULEDIR
76 endif
77 include $(MAKERULEDIR)/common.mk
79 # OBJs and libraries are built by using rule defined in rules_<target>.mk
80 # and need not be explicitly specified here
82 # Nothing beyond this point