blob: 8122d94fa8f3167ab7e9a93f25f2d6bfbbc16ac3 [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
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000029PSOC_06X := PSOC_061_2M PSOC_061_1M PSOC_061_512K PSOC_062_2M PSOC_062_1M PSOC_062_512K PSOC_063_1M
30PLATFORMS := $(PSOC_06X) CYW20829
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020031
32ifneq ($(filter $(PLATFORM), $(PLATFORMS)),)
33else
34$(error Not supported platform: '$(PLATFORM)')
35endif
36
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000037ifeq ($(PLATFORM), $(filter $(PLATFORM), $(PSOC_06X)))
Roman Okhrimenko977b3752022-03-31 14:40:48 +030038FAMILY := PSOC6
39else ifeq ($(PLATFORM), CYW20829)
40FAMILY := CYW20829
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020041endif
42
Roman Okhrimenko977b3752022-03-31 14:40:48 +030043# include family related makefile into build
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000044include platforms/$(FAMILY).mk
Roman Okhrimenko977b3752022-03-31 14:40:48 +030045
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020046DEFINES += $(PLATFORM)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030047DEFINES += $(FAMILY)
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020048
49# Convert defines to regular -DMY_NAME style
50ifneq ($(DEFINES),)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030051 PLATFORM_DEFINES := $(addprefix -D, $(subst -,_,$(DEFINES)))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020052endif
53
Roman Okhrimenko977b3752022-03-31 14:40:48 +030054###############################################################################
55# Print debug information about all settings used and/or set in this file
56ifeq ($(VERBOSE), 1)
57$(info #### platforms.mk ####)
58$(info DEFINES <-> $(DEFINES))
59$(info FAMILY <-> $(FAMILY))
60$(info PLATFORM <-- $(PLATFORM))
61$(info PLATFORMS <-> $(PLATFORMS))
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000062$(info PLATFORM_DEFINES --> $(PLATFORM_DEFINES))
63$(info PSOC_06X <-> $(PSOC_06X))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020064endif