Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 1 | ################################################################################ |
| 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 | |
| 26 | include host.mk |
| 27 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 28 | # supported platforms list |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame] | 29 | PSOC_06X := PSOC_061_2M PSOC_061_1M PSOC_061_512K PSOC_062_2M PSOC_062_1M PSOC_062_512K PSOC_063_1M |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 30 | XMC7000 := XMC7200 XMC7100 |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 31 | PLATFORMS := $(PSOC_06X) CYW20829 CYW89829 $(XMC7000) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 32 | |
| 33 | ifneq ($(filter $(PLATFORM), $(PLATFORMS)),) |
| 34 | else |
| 35 | $(error Not supported platform: '$(PLATFORM)') |
| 36 | endif |
| 37 | |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame] | 38 | ifeq ($(PLATFORM), $(filter $(PLATFORM), $(PSOC_06X))) |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 39 | FAMILY := PSOC6 |
| 40 | else ifeq ($(PLATFORM), CYW20829) |
| 41 | FAMILY := CYW20829 |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 42 | else ifeq ($(PLATFORM), CYW89829) |
| 43 | FAMILY := CYW20829 |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 44 | else ifeq ($(PLATFORM), $(filter $(PLATFORM), $(XMC7000))) |
| 45 | FAMILY := XMC7000 |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 46 | endif |
| 47 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 48 | # include family related makefile into build |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame] | 49 | include platforms/$(FAMILY).mk |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 50 | |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 51 | DEFINES += $(PLATFORM) |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 52 | DEFINES += $(FAMILY) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 53 | |
| 54 | # Convert defines to regular -DMY_NAME style |
| 55 | ifneq ($(DEFINES),) |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 56 | PLATFORM_DEFINES := $(addprefix -D, $(subst -,_,$(DEFINES))) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 57 | endif |
| 58 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 59 | ############################################################################### |
| 60 | # Print debug information about all settings used and/or set in this file |
| 61 | ifeq ($(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) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame] | 67 | $(info PLATFORM_DEFINES --> $(PLATFORM_DEFINES)) |
| 68 | $(info PSOC_06X <-> $(PSOC_06X)) |
Roman Okhrimenko | 4bc2810 | 2021-02-01 19:31:41 +0200 | [diff] [blame] | 69 | endif |