9bc400bb4a1bc73274d57ca2a3269b7c6666ef05
1 #
2 # This file is the makefile for building FreeRTOS Unit Test
3 #
4 ifeq ($(RULES_MAKE), )
5 include $(PDK_INSTALL_PATH)/ti/build/Rules.make
6 else
7 include $(RULES_MAKE)
8 endif
11 APP_NAME = freertos_test_ut
12 BUILD_OS_TYPE=baremetal
13 CFLAGS_TEST_DEFINES =
16 SRCDIR = .
17 INCDIR = ${FREERTOS_KERNEL_INSTALL_PATH}/FreeRTOS-Kernel/include
18 INCDIR += $(PDK_FREERTOS_COMP_PATH)/freertos/portable/TI_CGT/$(ISA)
19 INCDIR += $(PDK_FREERTOS_COMP_PATH)/freertos/config/$(SOC)/$(ISA)
20 INCDIR += $(PDK_FREERTOS_COMP_PATH)/freertos/dpl/common
22 # List all the external components/interfaces, whose interface header files
23 # need to be included for this component
24 INCLUDE_EXTERNAL_INTERFACES = pdk
25 ifeq ($(BUILD_OS_TYPE), baremetal)
26 COMP_LIST_COMMON = $(PDK_COMMON_BAREMETAL_COMP)
27 else
28 # List all the components required by the application
29 endif
31 COMP_LIST_COMMON += freertos
33 ifeq ($(ISA),$(filter $(ISA), c66))
34 EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/build/$(SOC)/linker_c66_freertos.cmd
35 endif
36 ifeq ($(ISA),$(filter $(ISA), r5f))
37 EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/build/$(SOC)/linker_r5_freertos.lds
38 endif
40 ifeq ($(SOC),$(filter $(SOC), tpr12))
41 # Append local auxillary linker command file
42 APPEND_LNKCMD_FILE = ../build/$(SOC)/linker_$(ISA).cmd
43 endif
45 # Common source files and CFLAGS across all platforms and cores
46 PACKAGE_SRCS_COMMON = .
47 SRCS_COMMON += main.c test_freertos.c
49 SRCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/Unity/src $(PDK_INSTALL_PATH)/ti/build/unit-test/config
50 INCDIR += $(PDK_INSTALL_PATH)/ti/build/unit-test/Unity/src $(PDK_INSTALL_PATH)/ti/build/unit-test/config
51 SRCS_COMMON += unity_config.c unity.c
53 CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(CFLAGS_TEST_DEFINES)
54 CFLAGS_LOCAL_COMMON += -DUNITY_INCLUDE_CONFIG_H
55 CFLAGS_LOCAL_COMMON += --c99
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