1################################################################################
2# \file bsp.mk
3#
4################################################################################
5# \copyright
6# Copyright 2019-2023 Cypress Semiconductor Corporation (an Infineon company) or
7# an affiliate of Cypress Semiconductor Corporation
8#
9# SPDX-License-Identifier: Apache-2.0
10#
11# Licensed under the Apache License, Version 2.0 (the "License");
12# you may not use this file except in compliance with the License.
13# You may obtain a copy of the License at
14#
15#     http://www.apache.org/licenses/LICENSE-2.0
16#
17# Unless required by applicable law or agreed to in writing, software
18# distributed under the License is distributed on an "AS IS" BASIS,
19# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20# See the License for the specific language governing permissions and
21# limitations under the License.
22################################################################################
23
24ifeq ($(WHICHFILE),true)
25$(info Processing $(lastword $(MAKEFILE_LIST)))
26endif
27
28ifneq (,$(filter XMC7x_CM0P_SLEEP, $(BSP_COMPONENTS)))
29BSP_LINKER_CORE:=linker
30else
31BSP_LINKER_CORE:=linker_d
32endif
33ifeq ($(TOOLCHAIN),GCC_ARM)
34	BSP_LINKER_SCRIPT_EXT:=ld
35else ifeq ($(TOOLCHAIN),ARM)
36	BSP_LINKER_SCRIPT_EXT:=sct
37else ifeq ($(TOOLCHAIN),IAR)
38	BSP_LINKER_SCRIPT_EXT:=icf
39endif
40MTB_BSP__LINKER_SCRIPT:=$(MTB_TOOLS__TARGET_DIR)/TOOLCHAIN_$(TOOLCHAIN)/$(BSP_LINKER_CORE).$(BSP_LINKER_SCRIPT_EXT)
41$(info "Using linker $(MTB_BSP__LINKER_SCRIPT)")
42# Any additional components to apply when using this board.
43BSP_COMPONENTS:=
44
45# Any additional defines to apply when using this board.
46BSP_DEFINES:=
47
48# Path to the flash loaders to patch for this board
49CY_QSPI_FLM_DIR=$(MTB_TOOLS__TARGET_DIR)/config/FlashLoaders/
50
51# Path to the patched flash loaders for this board
52CY_QSPI_FLM_DIR_OUTPUT=$(MTB_TOOLS__TARGET_DIR)/config/GeneratedSource/
53
54################################################################################
55# ALL ITEMS BELOW THIS POINT ARE AUTO GENERATED BY THE BSP ASSISTANT TOOL.
56# DO NOT MODIFY DIRECTLY. CHANGES SHOULD BE MADE THROUGH THE BSP ASSISTANT.
57################################################################################
58
59# Board device selection. MPN_LIST tracks what was selected in the BSP Assistant
60# All other variables are derived by BSP Assistant based on the MPN_LIST.
61MPN_LIST:=
62