blob: 56421c2a29beb9ee357b7a490c14485ff537aafb [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
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030030XMC7000 := XMC7200 XMC7100
31PLATFORMS := $(PSOC_06X) CYW20829 $(XMC7000)
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020032
33ifneq ($(filter $(PLATFORM), $(PLATFORMS)),)
34else
35$(error Not supported platform: '$(PLATFORM)')
36endif
37
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000038ifeq ($(PLATFORM), $(filter $(PLATFORM), $(PSOC_06X)))
Roman Okhrimenko977b3752022-03-31 14:40:48 +030039FAMILY := PSOC6
40else ifeq ($(PLATFORM), CYW20829)
41FAMILY := CYW20829
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030042else ifeq ($(PLATFORM), $(filter $(PLATFORM), $(XMC7000)))
43FAMILY := XMC7000
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020044endif
45
Roman Okhrimenko977b3752022-03-31 14:40:48 +030046# include family related makefile into build
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000047include platforms/$(FAMILY).mk
Roman Okhrimenko977b3752022-03-31 14:40:48 +030048
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020049DEFINES += $(PLATFORM)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030050DEFINES += $(FAMILY)
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020051
52# Convert defines to regular -DMY_NAME style
53ifneq ($(DEFINES),)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030054 PLATFORM_DEFINES := $(addprefix -D, $(subst -,_,$(DEFINES)))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020055endif
56
Roman Okhrimenko977b3752022-03-31 14:40:48 +030057###############################################################################
58# Print debug information about all settings used and/or set in this file
59ifeq ($(VERBOSE), 1)
60$(info #### platforms.mk ####)
61$(info DEFINES <-> $(DEFINES))
62$(info FAMILY <-> $(FAMILY))
63$(info PLATFORM <-- $(PLATFORM))
64$(info PLATFORMS <-> $(PLATFORMS))
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000065$(info PLATFORM_DEFINES --> $(PLATFORM_DEFINES))
66$(info PSOC_06X <-> $(PSOC_06X))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020067endif