# # Copyright (c) 2018, Texas Instruments Incorporated # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of Texas Instruments Incorporated nor the names of # its contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # File: sbl_component.mk # This file is component include make file of SBL. # List of variables set in this file and their purpose: # _RELPATH - This is the relative path of the module, typically from # top-level directory of the package # _PATH - This is the absolute path of the module. It derives from # absolute path of the top-level directory (set in env.mk) # and relative path set above # _INCLUDE - This is the path that has interface header files of the # module. This can be multiple directories (space separated) # _PKG_LIST - Names of the modules (and sub-modules) that are a part # part of this module, including itself. # _BOARD_DEPENDENCY - "yes": means the code for this module depends on # platform and the compiled obj/lib has to be kept # under directory # "no" or "" or if this variable is not defined: means # this module has no platform dependent code and hence # the obj/libs are not kept under dir. # _CORE_DEPENDENCY - "yes": means the code for this module depends on # core and the compiled obj/lib has to be kept # under directory # "no" or "" or if this variable is not defined: means # this module has no core dependent code and hence # the obj/libs are not kept under dir. # _APP_STAGE_FILES - List of source files that belongs to the module # , but that needs to be compiled at application # build stage (in the context of the app). This is # primarily for link time configurations or if the # source file is dependent on options/defines that are # application dependent. This can be left blank or # not defined at all, in which case, it means there # no source files in the module that are required # to be compiled in the application build stage. # ifeq ($(sbl_component_make_include), ) sbl_BOARDLIST = am65xx_evm am65xx_idk sbl_SOCLIST = am65xx sbl_am65xx_CORELIST = mcu1_0 mcu1_1 mpu1_0 mpu1_1 mpu2_0 mpu2_1 ############################ # Only MMCSD supported for IDK # Oveerride even if user inadvertently # tries to build it. ############################ ifeq ($(BOARD), am65xx_idk) override BOOTMODE = mmcsd endif # ifeq ($(BOARD), am65xx_idk) ############################ # sbl package # List of components included under sbl # The components included here are built and will be part of sbl ############################ sbl_LIB_LIST = sbl_lib_$(BOOTMODE) ############################ # sbl example # List of examples under sbl (+= is used at each example definition) # All the tests mentioned in list are built when test target is called # List below all examples for allowed values ############################ sbl_EXAMPLE_LIST = # # SBL Modules # # SBL LIB sbl_lib_$(BOOTMODE)_COMP_LIST = sbl_lib_$(BOOTMODE) sbl_lib_$(BOOTMODE)_RELPATH = ti/boot/sbl sbl_lib_$(BOOTMODE)_PATH = $(PDK_SBL_COMP_PATH) sbl_lib_$(BOOTMODE)_LIBNAME = sbl_lib_$(BOOTMODE) sbl_lib_$(BOOTMODE)_OBJPATH = $(PDK_SBL_COMP_PATH)/obj/$(BOOTMODE) sbl_lib_$(BOOTMODE)_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/$(BOOTMODE) sbl_lib_$(BOOTMODE)_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk export sbl_lib_$(BOOTMODE)_MAKEFILE export sbl_lib_$(BOOTMODE)_LIBNAME export sbl_lib_$(BOOTMODE)_LIBPATH sbl_lib_$(BOOTMODE)_BOARD_DEPENDENCY = yes sbl_lib_$(BOOTMODE)_SOC_DEPENDENCY = yes sbl_lib_$(BOOTMODE)_CORE_DEPENDENCY = yes export sbl_lib_$(BOOTMODE)_COMP_LIST export sbl_lib_$(BOOTMODE)_BOARD_DEPENDENCY export sbl_lib_$(BOOTMODE)_CORE_DEPENDENCY sbl_lib_$(BOOTMODE)_PKG_LIST = sbl_lib_$(BOOTMODE) sbl_lib_$(BOOTMODE)_INCLUDE = $(sbl_lib_$(BOOTMODE)_PATH) sbl_lib_$(BOOTMODE)_SOCLIST = $(sbl_SOCLIST) sbl_lib_$(BOOTMODE)_BOARDLIST = $(sbl_BOARDLIST) export sbl_lib_$(BOOTMODE)_SOCLIST export sbl_lib_$(BOOTMODE)_BOARDLIST sbl_lib_$(BOOTMODE)_$(SOC)_CORELIST = mcu1_0 export sbl_lib_$(BOOTMODE)_$(SOC)_CORELIST # # SBL Examples # # SBL Image sbl_$(BOOTMODE)_img_COMP_LIST = sbl_$(BOOTMODE)_img sbl_$(BOOTMODE)_img_RELPATH = ti/boot/sbl/board/$(SOC) sbl_$(BOOTMODE)_img_OBJPATH = $(PDK_SBL_COMP_PATH)/obj/$(BOOTMODE) sbl_$(BOOTMODE)_img_BINPATH = $(PDK_SBL_COMP_PATH)/img/$(BOOTMODE) sbl_$(BOOTMODE)_img_PATH = $(PDK_SBL_COMP_PATH)/board/$(BOARD) sbl_$(BOOTMODE)_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk export sbl_$(BOOTMODE)_img_MAKEFILE sbl_$(BOOTMODE)_img_BOARD_DEPENDENCY = yes sbl_$(BOOTMODE)_img_CORE_DEPENDENCY = no export sbl_$(BOOTMODE)_img_COMP_LIST export sbl_$(BOOTMODE)_img_BOARD_DEPENDENCY export sbl_$(BOOTMODE)_img_CORE_DEPENDENCY sbl_$(BOOTMODE)_img_PKG_LIST = sbl sbl_$(BOOTMODE)_img_INCLUDE = $(sbl_$(BOOTMODE)_img_PATH) sbl_$(BOOTMODE)_img_BOARDLIST = $(sbl_BOARDLIST) export sbl_$(BOOTMODE)_img_BOARDLIST sbl_$(BOOTMODE)_img_$(SOC)_CORELIST = mcu1_0 export sbl_$(BOOTMODE)_img_$(SOC)_CORELIST sbl_EXAMPLE_LIST += sbl_$(BOOTMODE)_img sbl_$(BOOTMODE)_img_SBL_IMAGEGEN = yes export sbl_$(BOOTMODE)_img_SBL_IMAGEGEN # Individual Core Boot Test sbl_boot_test_COMP_LIST = sbl_boot_test sbl_boot_test_RELPATH = ti/boot/sbl/example/ampMulticoreApp sbl_boot_test_OBJPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/obj sbl_boot_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/img sbl_boot_test_PATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp sbl_boot_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_boot_test.mk export sbl_boot_test_MAKEFILE sbl_boot_test_BOARD_DEPENDENCY = yes sbl_boot_test_CORE_DEPENDENCY = no export sbl_boot_test_COMP_LIST export sbl_boot_test_BOARD_DEPENDENCY export sbl_boot_test_CORE_DEPENDENCY sbl_boot_test_PKG_LIST = sbl_boot_test sbl_boot_test_INCLUDE = $(sbl_boot_test_PATH) sbl_boot_test_BOARDLIST = am65xx_evm am65xx_idk export sbl_boot_test_BOARDLIST sbl_boot_test_$(SOC)_CORELIST = $(sbl_$(SOC)_CORELIST) export sbl_boot_test_$(SOC)_CORELIST sbl_EXAMPLE_LIST += sbl_boot_test sbl_boot_test_SBL_APPIMAGEGEN = yes export sbl_boot_test_SBL_APPIMAGEGEN # Multicore AMP Boot Test sbl_multicore_amp_COMP_LIST = sbl_multicore_amp sbl_multicore_amp_RELPATH = ti/boot/sbl/example/ampMulticoreApp sbl_multicore_amp_OBJPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/obj sbl_multicore_amp_BINPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/img sbl_multicore_amp_PATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp sbl_multicore_amp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_amp.mk export sbl_multicore_amp_MAKEFILE sbl_multicore_amp_BOARD_DEPENDENCY = yes sbl_multicore_amp_CORE_DEPENDENCY = no export sbl_multicore_amp_COMP_LIST export sbl_multicore_amp_BOARD_DEPENDENCY export sbl_multicore_amp_CORE_DEPENDENCY sbl_multicore_amp_PKG_LIST = sbl_multicore_amp sbl_multicore_amp_INCLUDE = $(sbl_multicore_amp_PATH) sbl_multicore_amp_BOARDLIST = am65xx_evm am65xx_idk export sbl_multicore_amp_BOARDLIST sbl_multicore_amp_$(SOC)_CORELIST := $(word $(words $(sbl_am65xx_CORELIST)), $(sbl_am65xx_CORELIST)) export sbl_multicore_amp_$(SOC)_CORELIST sbl_EXAMPLE_LIST += sbl_multicore_amp sbl_multicore_amp_SBL_APPIMAGEGEN = no export sbl_multicore_amp_SBL_APPIMAGEGEN # R5 Lockstep and MPU SMP Boot Test sbl_smp_test_COMP_LIST = sbl_smp_test sbl_smp_test_RELPATH = ti/boot/sbl/example/ampMulticoreApp sbl_smp_test_OBJPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/obj sbl_smp_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/img sbl_smp_test_PATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp sbl_smp_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_smp_test.mk export sbl_smp_test_MAKEFILE sbl_smp_test_BOARD_DEPENDENCY = yes sbl_smp_test_CORE_DEPENDENCY = no export sbl_smp_test_COMP_LIST export sbl_smp_test_BOARD_DEPENDENCY export sbl_smp_test_CORE_DEPENDENCY sbl_smp_test_PKG_LIST = sbl_smp_test sbl_smp_test_INCLUDE = $(sbl_smp_test_PATH) sbl_smp_test_BOARDLIST = am65xx_evm am65xx_idk export sbl_smp_test_BOARDLIST sbl_smp_test_$(SOC)_CORELIST = mcu1_0 mpu1_0 export sbl_smp_test_$(SOC)_CORELIST sbl_EXAMPLE_LIST += sbl_smp_test sbl_smp_test_SBL_APPIMAGEGEN = yes export sbl_smp_test_SBL_APPIMAGEGEN # Multicore SMP Boot Test sbl_multicore_smp_COMP_LIST = sbl_multicore_smp sbl_multicore_smp_RELPATH = ti/boot/sbl/example/ampMulticoreApp sbl_multicore_smp_OBJPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/obj sbl_multicore_smp_BINPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/img sbl_multicore_smp_PATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp sbl_multicore_smp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_smp.mk export sbl_multicore_smp_MAKEFILE sbl_multicore_smp_BOARD_DEPENDENCY = yes sbl_multicore_smp_CORE_DEPENDENCY = no export sbl_multicore_smp_COMP_LIST export sbl_multicore_smp_BOARD_DEPENDENCY export sbl_multicore_smp_CORE_DEPENDENCY sbl_multicore_smp_PKG_LIST = sbl_multicore_smp sbl_multicore_smp_INCLUDE = $(sbl_multicore_smp_PATH) sbl_multicore_smp_BOARDLIST = am65xx_evm am65xx_idk export sbl_multicore_smp_BOARDLIST sbl_multicore_smp_$(SOC)_CORELIST := $(word $(words $(sbl_am65xx_CORELIST)), $(sbl_am65xx_CORELIST)) export sbl_multicore_smp_$(SOC)_CORELIST sbl_EXAMPLE_LIST += sbl_multicore_smp sbl_multicore_smp_SBL_APPIMAGEGEN = no export sbl_multicore_smp_SBL_APPIMAGEGEN PDK_CFLAGS += -DOSAL_NONOS_CONFIGNUM_SEMAPHORE=16 # SBL log level # no logs = 0, only errors =1, normal logs = 2, all logs = 3 SBL_CFLAGS = -DSBL_LOG_LEVEL=2 # BOOTMODE specific CFLAGS ifeq ($(BOOTMODE), mmcsd) SBL_CFLAGS+= -DBOOT_MMCSD endif # ifeq ($(BOOTMODE), mmcsd) ifeq ($(BOOTMODE), ospi) SBL_CFLAGS += -DBOOT_OSPI endif # ifeq ($(BOOTMODE), ospi) ifeq ($(BOOTMODE), qspi) SBL_CFLAGS += -DBOOT_QSPI endif # ifeq ($(BOOTMODE), qspi) ifeq ($(BOOTMODE), spi) SBL_CFLAGS += -DBOOT_SPI endif # ifeq ($(BOOTMODE), spi) export sbl_LIB_LIST export sbl_EXAMPLE_LIST export SBL_CFLAGS sbl_component_make_include := 1 endif