blob: 281c34c02e4bf94cb4389c95e52de551e1d93179 [file] [log] [blame]
Roman Okhrimenko4bc28102021-02-01 19:31:41 +02001################################################################################
2# \file platforms.mk
3# \version 1.0
4#
5# \brief
6# Makefile to describe supported boards and platforms for Cypress MCUBoot based applications.
7#
8################################################################################
9# \copyright
10# Copyright 2018-2019 Cypress Semiconductor Corporation
11# SPDX-License-Identifier: Apache-2.0
12#
13# Licensed under the Apache License, Version 2.0 (the "License");
14# you may not use this file except in compliance with the License.
15# You may obtain a copy of the License at
16#
17# http://www.apache.org/licenses/LICENSE-2.0
18#
19# Unless required by applicable law or agreed to in writing, software
20# distributed under the License is distributed on an "AS IS" BASIS,
21# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22# See the License for the specific language governing permissions and
23# limitations under the License.
24################################################################################
25
26include host.mk
27
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020028# supported platforms
Roman Okhrimenko977b3752022-03-31 14:40:48 +030029PLATFORMS := PSOC_062_2M PSOC_062_1M PSOC_062_512K CYW20829
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020030
31ifneq ($(filter $(PLATFORM), $(PLATFORMS)),)
32else
33$(error Not supported platform: '$(PLATFORM)')
34endif
35
Roman Okhrimenko977b3752022-03-31 14:40:48 +030036ifeq ($(PLATFORM), $(filter $(PLATFORM), PSOC_062_2M PSOC_062_1M PSOC_062_512K))
37FAMILY := PSOC6
38else ifeq ($(PLATFORM), CYW20829)
39FAMILY := CYW20829
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020040endif
41
Roman Okhrimenko977b3752022-03-31 14:40:48 +030042# include family related makefile into build
43include platforms/$(FAMILY)/$(FAMILY).mk
44
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020045DEFINES += $(PLATFORM)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030046DEFINES += $(FAMILY)
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020047
48# Convert defines to regular -DMY_NAME style
49ifneq ($(DEFINES),)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030050 PLATFORM_DEFINES := $(addprefix -D, $(subst -,_,$(DEFINES)))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020051endif
52
Roman Okhrimenko977b3752022-03-31 14:40:48 +030053###############################################################################
54# Print debug information about all settings used and/or set in this file
55ifeq ($(VERBOSE), 1)
56$(info #### platforms.mk ####)
57$(info DEFINES <-> $(DEFINES))
58$(info FAMILY <-> $(FAMILY))
59$(info PLATFORM <-- $(PLATFORM))
60$(info PLATFORMS <-> $(PLATFORMS))
61$(info PLATFORM_DEFINES <-> $(PLATFORM_DEFINES))
62$(info PLATFORM_SUFFIX <-- $(PLATFORM_SUFFIX))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020063endif