blob: b8466ead511b23d07228afc55d2d86870ff6abd6 [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 Okhrimenko883cb5b2024-03-28 17:22:33 +020028# supported platforms list
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
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020031PLATFORMS := $(PSOC_06X) CYW20829 CYW89829 $(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 Okhrimenko883cb5b2024-03-28 17:22:33 +020042else ifeq ($(PLATFORM), CYW89829)
43FAMILY := CYW20829
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030044else ifeq ($(PLATFORM), $(filter $(PLATFORM), $(XMC7000)))
45FAMILY := XMC7000
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020046endif
47
Roman Okhrimenko977b3752022-03-31 14:40:48 +030048# include family related makefile into build
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000049include platforms/$(FAMILY).mk
Roman Okhrimenko977b3752022-03-31 14:40:48 +030050
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020051DEFINES += $(PLATFORM)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030052DEFINES += $(FAMILY)
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020053
54# Convert defines to regular -DMY_NAME style
55ifneq ($(DEFINES),)
Roman Okhrimenko977b3752022-03-31 14:40:48 +030056 PLATFORM_DEFINES := $(addprefix -D, $(subst -,_,$(DEFINES)))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020057endif
58
Roman Okhrimenko977b3752022-03-31 14:40:48 +030059###############################################################################
60# Print debug information about all settings used and/or set in this file
61ifeq ($(VERBOSE), 1)
62$(info #### platforms.mk ####)
63$(info DEFINES <-> $(DEFINES))
64$(info FAMILY <-> $(FAMILY))
65$(info PLATFORM <-- $(PLATFORM))
66$(info PLATFORMS <-> $(PLATFORMS))
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000067$(info PLATFORM_DEFINES --> $(PLATFORM_DEFINES))
68$(info PSOC_06X <-> $(PSOC_06X))
Roman Okhrimenko4bc28102021-02-01 19:31:41 +020069endif