2020-02-28 23:05:55 +08:00
|
|
|
################################################################################
|
2021-02-02 01:31:41 +08:00
|
|
|
# \file platforms.mk
|
2020-02-28 23:05:55 +08:00
|
|
|
# \version 1.0
|
|
|
|
#
|
|
|
|
# \brief
|
|
|
|
# Makefile to describe supported boards and platforms for Cypress MCUBoot based applications.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
# \copyright
|
|
|
|
# Copyright 2018-2019 Cypress Semiconductor Corporation
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
################################################################################
|
|
|
|
|
2021-02-02 01:31:41 +08:00
|
|
|
include host.mk
|
|
|
|
|
|
|
|
# Target platform is built for. PSOC_062_2M is set by default
|
|
|
|
# Supported:
|
2020-02-28 23:05:55 +08:00
|
|
|
# - PSOC_062_2M
|
2021-02-02 01:31:41 +08:00
|
|
|
# - PSOC_062_1M
|
|
|
|
# - PSOC_062_512K
|
2020-02-28 23:05:55 +08:00
|
|
|
|
|
|
|
# default PLATFORM
|
|
|
|
PLATFORM ?= PSOC_062_2M
|
|
|
|
|
2021-02-02 01:31:41 +08:00
|
|
|
# supported platforms
|
|
|
|
PLATFORMS := PSOC_062_2M PSOC_062_1M PSOC_062_512K
|
|
|
|
|
|
|
|
ifneq ($(filter $(PLATFORM), $(PLATFORMS)),)
|
|
|
|
else
|
|
|
|
$(error Not supported platform: '$(PLATFORM)')
|
|
|
|
endif
|
2020-02-28 23:05:55 +08:00
|
|
|
|
2021-02-02 01:31:41 +08:00
|
|
|
# For which core this application is built
|
|
|
|
CORE ?= CM0P
|
2020-02-28 23:05:55 +08:00
|
|
|
|
|
|
|
# MCU device selection, based on target device.
|
|
|
|
# Default chips are used for supported platforms
|
|
|
|
# This can be redefined in case of other chip usage
|
|
|
|
ifeq ($(PLATFORM), PSOC_062_2M)
|
2021-02-02 01:31:41 +08:00
|
|
|
# base kit CY8CPROTO-062-4343W
|
2020-02-28 23:05:55 +08:00
|
|
|
DEVICE ?= CY8C624ABZI-D44
|
|
|
|
PLATFORM_SUFFIX := 02
|
2021-02-02 01:31:41 +08:00
|
|
|
else ifeq ($(PLATFORM), PSOC_062_1M)
|
|
|
|
# base kit CY8CKIT-062-WIFI-BT
|
|
|
|
DEVICE ?= CY8C6247BZI-D54
|
|
|
|
PLATFORM_SUFFIX := 01
|
|
|
|
else ifeq ($(PLATFORM), PSOC_062_512K)
|
|
|
|
# base kit CY8CPROTO-062S3-4343W
|
|
|
|
DEVICE ?= CY8C6245LQI-S3D72
|
|
|
|
PLATFORM_SUFFIX := 03
|
2020-02-28 23:05:55 +08:00
|
|
|
endif
|
|
|
|
|
2020-04-15 23:03:43 +08:00
|
|
|
# Add device name to defines
|
2020-02-28 23:05:55 +08:00
|
|
|
DEFINES += $(DEVICE)
|
|
|
|
DEFINES += $(PLATFORM)
|
|
|
|
|
2021-02-02 01:31:41 +08:00
|
|
|
# Convert defines to regular -DMY_NAME style
|
2020-02-28 23:05:55 +08:00
|
|
|
ifneq ($(DEFINES),)
|
|
|
|
DEFINES_PLATFORM :=$(addprefix -D, $(subst -,_,$(DEFINES)))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MAKEINFO) , 1)
|
2021-02-02 01:31:41 +08:00
|
|
|
$(info $(PLATFORM_SUFFIX))
|
|
|
|
$(info $(DEVICE))
|
|
|
|
$(info $(DEFINES_PLATFORM))
|
2020-02-28 23:05:55 +08:00
|
|
|
endif
|